[GRASS-SVN] r46532 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 3 03:41:45 EDT 2011


Author: martinl
Date: 2011-06-03 00:41:45 -0700 (Fri, 03 Jun 2011)
New Revision: 46532

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI: minor changes in preferences dialog
       (merge r46531 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2011-06-03 07:38:53 UTC (rev 46531)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2011-06-03 07:41:45 UTC (rev 46532)
@@ -351,7 +351,7 @@
                 continue
             
             if self.seltree.ItemHasChildren(mapset_node):
-                sel = UserSettings.Get(group='general', key='elementListExpand',
+                sel = UserSettings.Get(group='appearance', key='elementListExpand',
                                        subkey='selection')
                 collapse = True
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2011-06-03 07:38:53 UTC (rev 46531)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2011-06-03 07:41:45 UTC (rev 46532)
@@ -89,10 +89,6 @@
                          globalvar.MAP_WINDOW_SIZE[0],
                          globalvar.MAP_WINDOW_SIZE[1])
                     },
-                # expand/collapse element list
-                'elementListExpand' : {
-                    'selection' : 0 
-                    },
                 # workspace
                 'workspace' : {
                     'posDisplay' : {
@@ -125,6 +121,10 @@
                     'type' : 'Courier New',
                     'size': '10',
                     },
+                # expand/collapse element list
+                'elementListExpand' : {
+                    'selection' : 0 
+                    },
                 'menustyle' : {
                     'selection' : 1
                     },
@@ -620,7 +620,7 @@
                 self.internalSettings[group][key] = {}
 
         # self.internalSettings['general']["mapsetPath"]['value'] = self.GetMapsetPath()
-        self.internalSettings['general']['elementListExpand']['choices'] = \
+        self.internalSettings['appearance']['elementListExpand']['choices'] = \
             (_("Collapse all except PERMANENT and current"),
              _("Collapse all except PERMANENT"),
              _("Collapse all except current"),
@@ -1076,53 +1076,7 @@
         notebook.AddPage(page = panel, text = _("General"))
         
         border = wx.BoxSizer(wx.VERTICAL)
-        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("General settings"))
-        sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
-        
-        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
-        gridSizer.AddGrowableCol(0)
-        
         #
-        # expand element list
-        #
-        row = 0
-        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
-                                           label = _("Element list:")),
-                      flag = wx.ALIGN_LEFT |
-                      wx.ALIGN_CENTER_VERTICAL,
-                      pos = (row, 0))
-        elementList = wx.Choice(parent = panel, id = wx.ID_ANY, 
-                                choices = self.settings.Get(group = 'general', key = 'elementListExpand',
-                                                            subkey = 'choices', internal = True),
-                                name = "GetSelection")
-        elementList.SetSelection(self.settings.Get(group = 'general', key = 'elementListExpand',
-                                                   subkey = 'selection'))
-        self.winId['general:elementListExpand:selection'] = elementList.GetId()
-
-        gridSizer.Add(item = elementList,
-                      flag = wx.ALIGN_RIGHT |
-                      wx.ALIGN_CENTER_VERTICAL,
-                      pos = (row, 1))
-
-        #
-        # default window layout
-        #
-        row += 1
-        defaultPos = wx.CheckBox(parent = panel, id = wx.ID_ANY,
-                                 label = _("Save current window layout as default"),
-                                 name = 'IsChecked')
-        defaultPos.SetValue(self.settings.Get(group = 'general', key = 'defWindowPos', subkey = 'enabled'))
-        defaultPos.SetToolTip(wx.ToolTip (_("Save current position and size of Layer Manager window and opened "
-                                            "Map Display window(s) and use as default for next sessions.")))
-        self.winId['general:defWindowPos:enabled'] = defaultPos.GetId()
-
-        gridSizer.Add(item = defaultPos,
-                      pos = (row, 0), span = (1, 2))
-        
-        sizer.Add(item = gridSizer, proportion = 1, flag = wx.ALL | wx.EXPAND, border = 5)
-        border.Add(item = sizer, proportion = 0, flag = wx.ALL | wx.EXPAND, border = 3)
-
-        #
         # Layer Manager settings
         #
         box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Layer Manager settings"))
@@ -1155,7 +1109,7 @@
                       pos = (row, 0), span = (1, 2))
         
         sizer.Add(item = gridSizer, proportion = 1, flag = wx.ALL | wx.EXPAND, border = 5)
-        border.Add(item = sizer, proportion = 0, flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 3)
+        border.Add(item = sizer, proportion = 0, flag = wx.ALL | wx.EXPAND, border = 3)
         
         #
         # workspace
@@ -1177,7 +1131,7 @@
         gridSizer.Add(item = posDisplay,
                       pos = (row, 0), span = (1, 2))
         
-        row +=1 
+        row += 1 
         
         posManager = wx.CheckBox(parent = panel, id = wx.ID_ANY,
                                  label = _("Suppress positioning Layer Manager window"),
@@ -1189,6 +1143,18 @@
         gridSizer.Add(item = posManager,
                       pos = (row, 0), span = (1, 2))
         
+        row += 1
+        defaultPos = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                 label = _("Save current window layout as default"),
+                                 name = 'IsChecked')
+        defaultPos.SetValue(self.settings.Get(group = 'general', key = 'defWindowPos', subkey = 'enabled'))
+        defaultPos.SetToolTip(wx.ToolTip (_("Save current position and size of Layer Manager window and opened "
+                                            "Map Display window(s) and use as default for next sessions.")))
+        self.winId['general:defWindowPos:enabled'] = defaultPos.GetId()
+        
+        gridSizer.Add(item = defaultPos,
+                      pos = (row, 0), span = (1, 2))
+        
         sizer.Add(item = gridSizer, proportion = 1, flag = wx.ALL | wx.EXPAND, border = 5)
         border.Add(item = sizer, proportion = 0, flag = wx.ALL | wx.EXPAND, border = 3)
         
@@ -1247,7 +1213,25 @@
         # menu style
         #
         row = 0
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                           label = _("Element list:")),
+                      flag = wx.ALIGN_LEFT |
+                      wx.ALIGN_CENTER_VERTICAL,
+                      pos = (row, 0))
+        elementList = wx.Choice(parent = panel, id = wx.ID_ANY, size = (325, -1),
+                                choices = self.settings.Get(group = 'appearance', key = 'elementListExpand',
+                                                            subkey = 'choices', internal = True),
+                                name = "GetSelection")
+        elementList.SetSelection(self.settings.Get(group = 'appearance', key = 'elementListExpand',
+                                                   subkey = 'selection'))
+        self.winId['appearance:elementListExpand:selection'] = elementList.GetId()
+
+        gridSizer.Add(item = elementList,
+                      flag = wx.ALIGN_RIGHT |
+                      wx.ALIGN_CENTER_VERTICAL,
+                      pos = (row, 1))
         
+        row += 1
         gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
                                          label = _("Menu style:")),
                       flag = wx.ALIGN_LEFT |
@@ -1256,7 +1240,7 @@
         listOfStyles = self.settings.Get(group = 'appearance', key = 'menustyle',
                                          subkey = 'choices', internal = True)
         
-        menuItemText = wx.Choice(parent = panel, id = wx.ID_ANY, size = (300, -1),
+        menuItemText = wx.Choice(parent = panel, id = wx.ID_ANY, size = (325, -1),
                                  choices = listOfStyles,
                                  name = "GetSelection")
         menuItemText.SetSelection(self.settings.Get(group = 'appearance', key = 'menustyle', subkey = 'selection'))



More information about the grass-commit mailing list