[GRASS-SVN] r46706 - grass/branches/releasebranch_6_4/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 14 08:26:04 EDT 2011


Author: mmetz
Date: 2011-06-14 05:26:03 -0700 (Tue, 14 Jun 2011)
New Revision: 46706

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
Log:
revert r44181, add TODO

Modified: grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py	2011-06-14 12:05:50 UTC (rev 46705)
+++ grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py	2011-06-14 12:26:03 UTC (rev 46706)
@@ -1631,18 +1631,27 @@
         
         wx.Yield()
         
+        ### TODO: adjust initial window layout if necessary
         w, h = wx.GetDisplaySize()
-        if globalvar.MAP_WINDOW_SIZE[0] + globalvar.GM_WINDOW_SIZE[0] > w:
-            gmX = w - globalvar.GM_WINDOW_SIZE[0]
-            dim = '%d,0,%d,%d,0,0,%d,%d' % \
-                (gmX,
-                 globalvar.GM_WINDOW_SIZE[0],
-                 globalvar.GM_WINDOW_SIZE[1],
-                 globalvar.MAP_WINDOW_SIZE[0],
-                 globalvar.MAP_WINDOW_SIZE[1])
-            UserSettings.Set(group = 'general', key = 'defWindowPos',
-                             subkey = 'dim', value = dim)
+        # only neccessary if one of the windows is falling out of
+        # the current display size
         
+        # check if settings file exists
+        # if settings file exists, check if we should use the stored settings
+        #     if we should use stored settings, use stored settings
+        #     else use default settings
+        # else if settings file does not exist, use default settings
+        # check if any of the windows is falling out of the current display
+        # if yes, pull it in
+        #   falling out to the right
+        #   x pos = display width - window width
+        #   falling out to the bottom
+        #   y pos = 0
+        # update settings
+        # if settings file exists, update settings but keep settings for
+        # additional map display windows, or update them too
+        # do not erase settings for additional map display windows !
+        
         # create and show main frame
         mainframe = GMFrame(parent = None, id = wx.ID_ANY,
                             workspace = self.workspaceFile)



More information about the grass-commit mailing list