From 209b24057c6a1acace70301454c6f574a4e789e1 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 30 May 2012 03:24:21 +0000 Subject: [PATCH] col --> colour in Python version so API matches wrapped version git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- etg/pickers.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/etg/pickers.py b/etg/pickers.py index 6db27511..173525ce 100644 --- a/etg/pickers.py +++ b/etg/pickers.py @@ -179,7 +179,7 @@ def run(): ''' #-------------------------------------------------- class ColourPickerButton(BitmapButton): - def __init__(self, parent, id=-1, col=wx.BLACK, + def __init__(self, parent, id=-1, colour=wx.BLACK, pos=wx.DefaultPosition, size=wx.DefaultSize, style = CLRP_DEFAULT_STYLE, validator = wx.DefaultValidator, @@ -187,7 +187,7 @@ def run(): wx.BitmapButton.__init__(self, parent, id, wx.Bitmap(1,1), pos, size, style, validator, name) - self.SetColour(col) + self.SetColour(colour) self.InvalidateBestSize() self.SetInitialSize(size) self.Bind(wx.EVT_BUTTON, self.OnButtonClick) @@ -202,8 +202,8 @@ def run(): _colourData.SetCustomColour(i, c) grey += 16 - def SetColour(self, col): - self.colour = col + def SetColour(self, colour): + self.colour = colour bmp = self._makeBitmap() self.SetBitmapLabel(bmp) @@ -240,18 +240,18 @@ def run(): #-------------------------------------------------- - def __init__(self, parent, id=-1, col=wx.BLACK, + def __init__(self, parent, id=-1, colour=wx.BLACK, pos=wx.DefaultPosition, size=wx.DefaultSize, style = CLRP_DEFAULT_STYLE, validator = wx.DefaultValidator, name = "colourpicker"): - if type(col) != wx.Colour: - col = wx.Colour(col) + if type(colour) != wx.Colour: + colour = wx.Colour(colour) wx.PickerBase.__init__(self) - self.CreateBase(parent, id, col.GetAsString(), + self.CreateBase(parent, id, colour.GetAsString(), pos, size, style, validator, name) widget = ColourPickerCtrl.ColourPickerButton( - self, -1, col, style=self.GetPickerStyle(style)) + self, -1, colour, style=self.GetPickerStyle(style)) self.SetPickerCtrl(widget) widget.Bind(wx.EVT_COLOURPICKER_CHANGED, self.OnColourChange) self.PostCreation() @@ -262,9 +262,9 @@ def run(): return self.GetPickerCtrl().GetColour() - def SetColour(self, col): + def SetColour(self, colour): '''Returns the currently selected colour.''' - self.GetPickerCtrl().SetColour(col) + self.GetPickerCtrl().SetColour(colour) self.UpdateTextCtrlFromPicker()