]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/filebrowsebutton.py
docstring update
[wxWidgets.git] / wxPython / wx / lib / filebrowsebutton.py
index 0a492fd7fcc21f5161e0cdcc4cd3f574a90e4bc5..ca3338f462ee0b82c4c6339decdefd2da5934d35 100644 (file)
@@ -68,12 +68,6 @@ class FileBrowseButton(wx.Panel):
         self.callCallback = True
 
 
         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.
         # 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
 
         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( )
         box = wx.BoxSizer(wx.HORIZONTAL)
 
         self.label = self.createLabel( )
@@ -304,8 +289,10 @@ class FileBrowseButtonWithHistory( FileBrowseButton ):
         """Return the current history list"""
         if self.historyCallBack != None:
             return self.historyCallBack()
         """Return the current history list"""
         if self.historyCallBack != None:
             return self.historyCallBack()
-        else:
+        elif self.history:
             return list( self.history )
             return list( self.history )
+        else:
+            return []
 
 
     def OnSetFocus(self, event):
 
 
     def OnSetFocus(self, event):