[GRASS-SVN] r47209 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 21 10:43:14 EDT 2011


Author: annakrat
Date: 2011-07-21 07:43:13 -0700 (Thu, 21 Jul 2011)
New Revision: 47209

Modified:
   grass/trunk/gui/wxpython/gui_modules/nviz_tools.py
Log:
wxNviz: change name of style parameter of FoldPanelBar for different wxPython versions

Modified: grass/trunk/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_tools.py	2011-07-21 12:35:46 UTC (rev 47208)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_tools.py	2011-07-21 14:43:13 UTC (rev 47209)
@@ -424,8 +424,18 @@
 ##        style = fpb.CaptionBarStyle()
 ##        style.SetCaptionStyle(fpb.CAPTIONBAR_FILLED_RECTANGLE)
 ##        style.SetFirstColour(wx.Color(250,250,250))
-        self.foldpanelData = fpb.FoldPanelBar(parent = self.mainPanelData, id = wx.ID_ANY,
-                                              style = fpb.FPB_SINGLE_FOLD)
+        try:# wxpython <= 2.8.10
+            self.foldpanelData = fpb.FoldPanelBar(parent = self.mainPanelData, id = wx.ID_ANY,
+                                                  style = fpb.FPB_DEFAULT_STYLE,
+                                                  extraStyle = fpb.FPB_SINGLE_FOLD)
+        except:
+            try:# wxpython >= 2.8.11
+                self.foldpanelData = fpb.FoldPanelBar(parent = self.mainPanelData, id = wx.ID_ANY,                               
+                                                      agwStyle = fpb.FPB_SINGLE_FOLD)
+            except: # to be sure
+                self.foldpanelData = fpb.FoldPanelBar(parent = self.mainPanelData, id = wx.ID_ANY,                               
+                                                      style = fpb.FPB_SINGLE_FOLD)
+            
                      
         self.foldpanelData.Bind(fpb.EVT_CAPTIONBAR, self.OnPressCaption)
 



More information about the grass-commit mailing list