[GRASS-SVN] r64150 - in grass/trunk/gui/wxpython: core mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 13 15:22:35 PST 2015


Author: martinl
Date: 2015-01-13 15:22:35 -0800 (Tue, 13 Jan 2015)
New Revision: 64150

Modified:
   grass/trunk/gui/wxpython/core/globalvar.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI: fix statusbar prop for wxPython3


Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py	2015-01-13 22:41:33 UTC (rev 64149)
+++ grass/trunk/gui/wxpython/core/globalvar.py	2015-01-13 23:22:35 UTC (rev 64150)
@@ -41,7 +41,7 @@
 
 from grass.script.core import get_commands
 
-def CheckWxVersion(version = [2, 8, 11, 0]):
+def CheckWxVersion(version):
     """Check wx version"""
     ver = wx.version().split(' ')[0]
     if map(int, ver.split('.')) < version:
@@ -206,7 +206,8 @@
 toolbarSize = (24, 24)
 
 """@Check version of wxPython, use agwStyle for 2.8.11+"""
-hasAgw = CheckWxVersion()
+hasAgw = CheckWxVersion([2, 8, 11, 0])
+wxPython3 = CheckWxVersion([3, 0, 0, 0])
 
 """@Add GUIDIR/scripts into path"""
 os.environ['PATH'] = os.path.join(GUIDIR, 'scripts') + os.pathsep + os.environ['PATH']

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2015-01-13 22:41:33 UTC (rev 64149)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2015-01-13 23:22:35 UTC (rev 64150)
@@ -231,7 +231,12 @@
         
         # create statusbar and its manager
         statusbar = self.CreateStatusBar(number = 4, style = 0)
-        statusbar.SetStatusWidths([-5, -2, -1, -1])
+        if globalvar.wxPython3:
+            statusbar.SetMinHeight(24)
+            prop = [-6, -2, -1, -2]
+        else:
+            prop = [-5, -2, -1, -1]
+        statusbar.SetStatusWidths(prop)
         self.statusbarManager = sb.SbManager(mapframe = self, statusbar = statusbar)
         
         # fill statusbar manager



More information about the grass-commit mailing list