X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/280432a984cca430e01e38af9e4d00ac2ce2e0cd..16541a4ef4c409e27a047f898f9d770bdcfa9f30:/wxPython/wx/lib/filebrowsebutton.py diff --git a/wxPython/wx/lib/filebrowsebutton.py b/wxPython/wx/lib/filebrowsebutton.py index 0a492fd7fc..0620161d11 100644 --- a/wxPython/wx/lib/filebrowsebutton.py +++ b/wxPython/wx/lib/filebrowsebutton.py @@ -68,12 +68,6 @@ class FileBrowseButton(wx.Panel): self.callCallback = True - # get background to match it - try: - self._bc = parent.GetBackgroundColour() - except: - pass - # create the dialog self.createDialog(parent, id, pos, size, style ) # Setting a value causes the changeCallback to be called. @@ -88,15 +82,6 @@ class FileBrowseButton(wx.Panel): wx.Panel.__init__ (self, parent, id, pos, size, style) self.SetMinSize(size) # play nice with sizers - # try to set the background colour - try: - #Question: is this still needed on other platforms? - #It should have transparent background on Mac - if wx.Platform != "__WXMAC__": - self.SetBackgroundColour(self._bc) - except: - pass - box = wx.BoxSizer(wx.HORIZONTAL) self.label = self.createLabel( ) @@ -257,8 +242,8 @@ class FileBrowseButtonWithHistory( FileBrowseButton ): textControl.SetToolTipString( self.toolTip ) textControl.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus) if self.changeCallback: - textControl.Bind(wx.EVT_TEXT, self.changeCallback) - textControl.Bind(wx.EVT_COMBOBOX, self.changeCallback) + textControl.Bind(wx.EVT_TEXT, self.OnChanged) + textControl.Bind(wx.EVT_COMBOBOX, self.OnChanged) if self.history: history=self.history self.history=None @@ -304,8 +289,10 @@ class FileBrowseButtonWithHistory( FileBrowseButton ): """Return the current history list""" if self.historyCallBack != None: return self.historyCallBack() - else: + elif self.history: return list( self.history ) + else: + return [] def OnSetFocus(self, event):