[GRASS-SVN] r57518 - in grass/trunk/gui/wxpython: core lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 27 08:11:11 PDT 2013


Author: wenzeslaus
Date: 2013-08-27 08:11:11 -0700 (Tue, 27 Aug 2013)
New Revision: 57518

Modified:
   grass/trunk/gui/wxpython/core/globalvar.py
   grass/trunk/gui/wxpython/lmgr/frame.py
Log:
wxGUI/lmgr: increasing width for some platforms because of missing menu items (#1742)

Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py	2013-08-27 12:28:10 UTC (rev 57517)
+++ grass/trunk/gui/wxpython/core/globalvar.py	2013-08-27 15:11:11 UTC (rev 57518)
@@ -116,8 +116,22 @@
 DIALOG_COLOR_SIZE = (30, 30)
 
 MAP_WINDOW_SIZE = (800, 600)
-GM_WINDOW_SIZE = (525, 600)
 
+GM_WINDOW_MIN_SIZE = (525, 400)
+# small for ms window which wraps the menu
+# small for max os x which has the global menu
+# small for ubuntu when menuproxy is defined
+# not defined UBUNTU_MENUPROXY on linux means standard menu,
+# so the probably problem
+# UBUNTU_MENUPROXY= means ubuntu with disabled global menu [1]
+# use UBUNTU_MENUPROXY=0 to disbale global menu on ubuntu but in the same time
+# to get smaller lmgr
+# [1] https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationMenu#Troubleshooting
+if sys.platform in ('win32', 'darwin') or os.environ.get('UBUNTU_MENUPROXY'):
+    GM_WINDOW_SIZE = (GM_WINDOW_MIN_SIZE[0], 600)
+else:
+    GM_WINDOW_SIZE = (600, 600)
+
 if sys.platform == 'win32':
     BIN_EXT = '.exe'
     SCT_EXT = '.py'

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2013-08-27 12:28:10 UTC (rev 57517)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2013-08-27 15:11:11 UTC (rev 57518)
@@ -172,7 +172,7 @@
         self._giface.updateMap.connect(self._updateCurrentMap)
 
         # minimal frame size
-        self.SetMinSize((globalvar.GM_WINDOW_SIZE[0], 400))
+        self.SetMinSize(globalvar.GM_WINDOW_MIN_SIZE)
 
         # AUI stuff
         self._auimgr.AddPane(self.notebook, wx.aui.AuiPaneInfo().



More information about the grass-commit mailing list