[GRASS-SVN] r46430 - in grass/trunk/gui/wxpython: gui_modules icons

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 28 09:31:28 EDT 2011


Author: martinl
Date: 2011-05-28 06:31:28 -0700 (Sat, 28 May 2011)
New Revision: 46430

Modified:
   grass/trunk/gui/wxpython/gui_modules/goutput.py
   grass/trunk/gui/wxpython/gui_modules/preferences.py
   grass/trunk/gui/wxpython/icons/icon.py
Log:
wxGUI: update preferences.py to follow wxGUI coding standards
       re-orgranize preferences dialog tabs (move 'workspace' to 'general')
       various minor fixes


Modified: grass/trunk/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/goutput.py	2011-05-27 15:49:38 UTC (rev 46429)
+++ grass/trunk/gui/wxpython/gui_modules/goutput.py	2011-05-28 13:31:28 UTC (rev 46430)
@@ -1000,10 +1000,10 @@
 
         settings = preferences.Settings()
         
-        typeface = settings.Get(group='display', key='outputfont', subkey='type')   
+        typeface = settings.Get(group='appearance', key='outputfont', subkey='type')   
         if typeface == "": typeface = "Courier New"
                            
-        typesize = settings.Get(group='display', key='outputfont', subkey='size')
+        typesize = settings.Get(group='appearance', key='outputfont', subkey='size')
         if typesize == None or typesize <= 0: typesize = 10
         typesize = float(typesize)
 

Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2011-05-27 15:49:38 UTC (rev 46429)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2011-05-28 13:31:28 UTC (rev 46430)
@@ -16,7 +16,7 @@
  - MapsetAccess
  - NvizPreferencesDialog
 
-(C) 2007-2010 by the GRASS Development Team
+(C) 2007-2011 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS
 for details.
@@ -39,7 +39,7 @@
 
 ### i18N
 import gettext
-gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
+gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
 
 import wx
 import wx.lib.filebrowsebutton as filebrowse
@@ -60,9 +60,7 @@
 class Settings:
     """!Generic class where to store settings"""
     def __init__(self):
-        #
         # key/value separator
-        #
         self.sep = ';'
         
         try:
@@ -92,6 +90,15 @@
                 'elementListExpand' : {
                     'selection' : 0 
                     },
+                # workspace
+                'workspace' : {
+                    'posDisplay' : {
+                        'enabled' : False
+                        },
+                    'posManager' : {
+                        'enabled' : False
+                        },
+                    },
                 },
             'manager' : {
                 # show opacity level widget
@@ -237,17 +244,6 @@
                     },
                 },
             #
-            # Workspace
-            #
-            'workspace' : {
-                'posDisplay' : {
-                    'enabled' : False
-                    },
-                'posManager' : {
-                    'enabled' : False
-                    },
-                },
-            #
             # vdigit
             #
             'vdigit' : {
@@ -670,7 +666,7 @@
         self.internalSettings['vdigit']['bgmap'] = {}
         self.internalSettings['vdigit']['bgmap']['value'] = ''
         
-    def ReadSettingsFile(self, settings=None):
+    def ReadSettingsFile(self, settings = None):
         """!Reads settings file (mapset, location, gisdbase)"""
         if settings is None:
             settings = self.userSettings
@@ -683,15 +679,15 @@
         
         filePath = os.path.join(os.path.expanduser("~"), '.grass7', 'wx') # MS Windows fix ?
         
-        self.__ReadFile(filePath, settings)
+        self._readFile(filePath, settings)
         
         # set environment variables
-        os.environ["GRASS_FONT"] = self.Get(group='display',
-                                            key='font', subkey='type')
-        os.environ["GRASS_ENCODING"] = self.Get(group='display',
-                                                key='font', subkey='encoding')
+        os.environ["GRASS_FONT"] = self.Get(group = 'display',
+                                            key = 'font', subkey = 'type')
+        os.environ["GRASS_ENCODING"] = self.Get(group = 'display',
+                                                key = 'font', subkey = 'encoding')
         
-    def __ReadFile(self, filename, settings=None):
+    def _readFile(self, filename, settings = None):
         """!Read settings from file to dict
 
         @param filename settings file path
@@ -724,7 +720,7 @@
                     else:
                         subkey = kv[idx]
                     value = kv[idx+1]
-                    value = self.__parseValue(value, read=True)
+                    value = self._parseValue(value, read = True)
                     self.Append(settings, group, key, subkey, value)
                     idx += 2
         except ValueError, e:
@@ -739,18 +735,13 @@
         file.close()
         return True
 
-    def SaveToFile(self, settings=None):
+    def SaveToFile(self, settings = None):
         """!Save settings to the file"""
         if settings is None:
             settings = self.userSettings
         
         home = os.path.expanduser("~") # MS Windows fix ?
         
-        gisenv = grass.gisenv()
-        gisdbase = gisenv['GISDBASE']
-        location_name = gisenv['LOCATION_NAME']
-        mapset_name = gisenv['MAPSET']
-        
         dirPath = os.path.join(home, '.grass7')
         if os.path.exists(dirPath) == False:
             try:
@@ -765,8 +756,8 @@
             file = open(filePath, "w")
             for group in settings.keys():
                 for key in settings[group].keys():
-                    file.write('%s%s%s%s' % (group, self.sep, key, self.sep))
                     subkeys = settings[group][key].keys()
+                    file.write('%s%s%s%s' % (group, self.sep, key, self.sep))
                     for idx in range(len(subkeys)):
                         value = settings[group][key][subkeys[idx]]
                         if type(value) == types.DictType:
@@ -776,15 +767,15 @@
                             kvalues = settings[group][key][subkeys[idx]].keys()
                             srange = range(len(kvalues))
                             for sidx in srange:
-                                svalue = self.__parseValue(settings[group][key][subkeys[idx]][kvalues[sidx]])
+                                svalue = self._parseValue(settings[group][key][subkeys[idx]][kvalues[sidx]])
                                 file.write('%s%s%s' % (kvalues[sidx], self.sep,
                                                        svalue))
                                 if sidx < len(kvalues) - 1:
                                     file.write('%s' % self.sep)
-                            if idx < len(subkeys) - 1:
-                                file.write('%s%s%s%s%s' % (os.linesep, group, self.sep, key, self.sep))
+#                            if len(subkeys) > 4 and idx < len(subkeys) - 1:
+#                                file.write('%s%s%s%s%s' % (os.linesep, group, self.sep, key, self.sep))
                         else:
-                            value = self.__parseValue(settings[group][key][subkeys[idx]])
+                            value = self._parseValue(settings[group][key][subkeys[idx]])
                             file.write('%s%s%s' % (subkeys[idx], self.sep, value))
                             if idx < len(subkeys) - 1 and \
                                     type(settings[group][key][subkeys[idx + 1]]) != types.DictType:
@@ -801,7 +792,7 @@
         
         return filePath
 
-    def __parseValue(self, value, read=False):
+    def _parseValue(self, value, read = False):
         """!Parse value to be store in settings file"""
         if read: # -> read settings (cast values)
             if value == 'True':
@@ -831,7 +822,7 @@
                 
         return value
 
-    def Get(self, group, key=None, subkey=None, internal=False):
+    def Get(self, group, key = None, subkey = None, internal = False):
         """!Get value by key/subkey
 
         Raise KeyError if key is not found
@@ -949,7 +940,7 @@
                            style = style)
         
         # notebook
-        self.notebook = wx.Notebook(parent=self, id=wx.ID_ANY, style=wx.BK_DEFAULT)
+        self.notebook = wx.Notebook(parent = self, id = wx.ID_ANY, style = wx.BK_DEFAULT)
         
         # dict for window ids
         self.winId = {}
@@ -982,8 +973,8 @@
         """!Layout window"""
         # sizers
         btnSizer = wx.BoxSizer(wx.HORIZONTAL)
-        btnSizer.Add(item=self.btnDefault, proportion=1,
-                     flag=wx.ALL, border=5)
+        btnSizer.Add(item = self.btnDefault, proportion = 1,
+                     flag = wx.ALL, border = 5)
         btnStdSizer = wx.StdDialogButtonSizer()
         btnStdSizer.AddButton(self.btnCancel)
         btnStdSizer.AddButton(self.btnSave)
@@ -991,11 +982,11 @@
         btnStdSizer.Realize()
         
         mainSizer = wx.BoxSizer(wx.VERTICAL)
-        mainSizer.Add(item=self.notebook, proportion=1, flag=wx.EXPAND | wx.ALL, border=5)
-        mainSizer.Add(item=btnSizer, proportion=0,
-                      flag=wx.EXPAND, border=0)
-        mainSizer.Add(item=btnStdSizer, proportion=0,
-                      flag=wx.EXPAND | wx.ALL | wx.ALIGN_RIGHT, border=5)
+        mainSizer.Add(item = self.notebook, proportion = 1, flag = wx.EXPAND | wx.ALL, border = 5)
+        mainSizer.Add(item = btnSizer, proportion = 0,
+                      flag = wx.EXPAND, border = 0)
+        mainSizer.Add(item = btnStdSizer, proportion = 0,
+                      flag = wx.EXPAND | wx.ALL | wx.ALIGN_RIGHT, border = 5)
         
         self.SetSizer(mainSizer)
         mainSizer.Fit(self)
@@ -1075,10 +1066,10 @@
                 value = win.GetValue()
 
             if key == 'keycolumn' and value == '':
-                wx.MessageBox(parent=self,
-                              message=_("Key column cannot be empty string."),
-                              caption=_("Error"), style=wx.OK | wx.ICON_ERROR)
-                win.SetValue(self.settings.Get(group='atm', key='keycolumn', subkey='value'))
+                wx.MessageBox(parent = self,
+                              message = _("Key column cannot be empty string."),
+                              caption = _("Error"), style = wx.OK | wx.ICON_ERROR)
+                win.SetValue(self.settings.Get(group = 'atm', key = 'keycolumn', subkey = 'value'))
                 return False
 
             if subkey1:
@@ -1097,150 +1088,187 @@
                                        settings = settings)
         
         # create notebook pages
-        self._CreateGeneralPage(self.notebook)
-        self._CreateAppearancePage(self.notebook)
-        self._CreateDisplayPage(self.notebook)
-        self._CreateCmdPage(self.notebook)
-        self._CreateAttributeManagerPage(self.notebook)
-        self._CreateProjectionPage(self.notebook)
-        self._CreateWorkspacePage(self.notebook)
+        self._createGeneralPage(self.notebook)
+        self._createAppearancePage(self.notebook)
+        self._createDisplayPage(self.notebook)
+        self._createCmdPage(self.notebook)
+        self._createAttributeManagerPage(self.notebook)
+        self._createProjectionPage(self.notebook)
         
         self.SetMinSize(self.GetBestSize())
         self.SetSize(self.size)
         
-    def _CreateGeneralPage(self, notebook):
+    def _createGeneralPage(self, notebook):
         """!Create notebook page for general settings"""
-        panel = wx.Panel(parent=notebook, id=wx.ID_ANY)
-        notebook.AddPage(page=panel, text=_("General"))
-
+        panel = wx.Panel(parent = notebook, id = wx.ID_ANY)
+        notebook.AddPage(page = panel, text = _("General"))
+        
         border = wx.BoxSizer(wx.VERTICAL)
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("General settings"))
+        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 = 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 |
+        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'))
+                      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 |
+        gridSizer.Add(item = elementList,
+                      flag = wx.ALIGN_RIGHT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 1))
+                      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 = 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))
+        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)
+        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"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Layer Manager settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(0)
-
-
+        
         #
         # ask when removing map layer from layer tree
         #
         row = 0
-        askOnRemoveLayer = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                       label=_("Ask when removing map layer from layer tree"),
-                                       name='IsChecked')
-        askOnRemoveLayer.SetValue(self.settings.Get(group='manager', key='askOnRemoveLayer', subkey='enabled'))
+        askOnRemoveLayer = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                       label = _("Ask when removing map layer from layer tree"),
+                                       name = 'IsChecked')
+        askOnRemoveLayer.SetValue(self.settings.Get(group = 'manager', key = 'askOnRemoveLayer', subkey = 'enabled'))
         self.winId['manager:askOnRemoveLayer:enabled'] = askOnRemoveLayer.GetId()
-
-        gridSizer.Add(item=askOnRemoveLayer,
-                      pos=(row, 0), span=(1, 2))
-
+        
+        gridSizer.Add(item = askOnRemoveLayer,
+                      pos = (row, 0), span = (1, 2))
+        
         row += 1
-        askOnQuit = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                label=_("Ask when quiting wxGUI or closing display"),
-                                name='IsChecked')
-        askOnQuit.SetValue(self.settings.Get(group='manager', key='askOnQuit', subkey='enabled'))
+        askOnQuit = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                label = _("Ask when quiting wxGUI or closing display"),
+                                name = 'IsChecked')
+        askOnQuit.SetValue(self.settings.Get(group = 'manager', key = 'askOnQuit', subkey = 'enabled'))
         self.winId['manager:askOnQuit:enabled'] = askOnQuit.GetId()
-
-        gridSizer.Add(item=askOnQuit,
-                      pos=(row, 0), span=(1, 2))
         
+        gridSizer.Add(item = askOnQuit,
+                      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)
+        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)
+        
+        #
+        # workspace
+        #
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Workspace settings"))
+        sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
+        
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
+        gridSizer.AddGrowableCol(0)
+        
+        row = 0
+        posDisplay = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                 label = _("Suppress positioning Map Display Window(s)"),
+                                 name = 'IsChecked')
+        posDisplay.SetValue(self.settings.Get(group = 'general', key = 'workspace',
+                                              subkey = ['posDisplay', 'enabled']))
+        self.winId['general:workspace:posDisplay:enabled'] = posDisplay.GetId()
+        
+        gridSizer.Add(item = posDisplay,
+                      pos = (row, 0), span = (1, 2))
+        
+        row +=1 
+        
+        posManager = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                 label = _("Suppress positioning Layer Manager window"),
+                                 name = 'IsChecked')
+        posManager.SetValue(self.settings.Get(group = 'general', key = 'workspace',
+                                              subkey = ['posManager', 'enabled']))
+        self.winId['general:workspace:posManager:enabled'] = posManager.GetId()
+        
+        gridSizer.Add(item = posManager,
+                      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)
+        
+        panel.SetSizer(border)
+        
+        return panel
+    
 
         panel.SetSizer(border)
         
         return panel
 
-    def _CreateAppearancePage(self, notebook):
+    def _createAppearancePage(self, notebook):
         """!Create notebook page for display settings"""
    
-        panel = wx.Panel(parent=notebook, id=wx.ID_ANY)
-        notebook.AddPage(page=panel, text=_("Appearance"))
+        panel = wx.Panel(parent = notebook, id = wx.ID_ANY)
+        notebook.AddPage(page = panel, text = _("Appearance"))
 
         border = wx.BoxSizer(wx.VERTICAL)
 
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Font settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Font settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(0)
 
         #
         # font settings
         #
-        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)
+        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)
 
         row = 0
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Font for command output:")),
-                      flag=wx.ALIGN_LEFT |
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Font for command output:")),
+                      flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 0))
-        outfontButton = wx.Button(parent=panel, id=wx.ID_ANY,
-                               label=_("Set font"), size=(100, -1))
-        gridSizer.Add(item=outfontButton,
-                      flag=wx.ALIGN_RIGHT |
+                      pos = (row, 0))
+        outfontButton = wx.Button(parent = panel, id = wx.ID_ANY,
+                               label = _("Set font"), size = (100, -1))
+        gridSizer.Add(item = outfontButton,
+                      flag = wx.ALIGN_RIGHT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 1))
+                      pos = (row, 1))
 
         #
         # appearence
         #
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Appearance settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Appearance settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer  =  wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(0)
 
         #
@@ -1259,70 +1287,70 @@
         menuItemText = wx.Choice(parent = panel, id = wx.ID_ANY, size = (300, -1),
                                  choices = listOfStyles,
                                  name = "GetSelection")
-        menuItemText.SetSelection(self.settings.Get(group='appearance', key='menustyle', subkey='selection'))
+        menuItemText.SetSelection(self.settings.Get(group = 'appearance', key = 'menustyle', subkey = 'selection'))
         
         self.winId['appearance:menustyle:selection'] = menuItemText.GetId()
         
-        gridSizer.Add(item=menuItemText,
-                      flag=wx.ALIGN_RIGHT,
-                      pos=(row, 1))
+        gridSizer.Add(item = menuItemText,
+                      flag = wx.ALIGN_RIGHT,
+                      pos = (row, 1))
         
         #
         # gselect.TreeCtrlComboPopup height
         #
         row += 1
         
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Height of map selection popup window (in pixels):")),
-                      flag=wx.ALIGN_LEFT |
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Height of map selection popup window (in pixels):")),
+                      flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 0))
-        min = self.settings.Get(group='appearance', key='gSelectPopupHeight', subkey='min', internal=True)
-        max = self.settings.Get(group='appearance', key='gSelectPopupHeight', subkey='max', internal=True)
-        value = self.settings.Get(group='appearance', key='gSelectPopupHeight', subkey='value')
+                      pos = (row, 0))
+        min = self.settings.Get(group = 'appearance', key = 'gSelectPopupHeight', subkey = 'min', internal = True)
+        max = self.settings.Get(group = 'appearance', key = 'gSelectPopupHeight', subkey = 'max', internal = True)
+        value = self.settings.Get(group = 'appearance', key = 'gSelectPopupHeight', subkey = 'value')
         
-        popupHeightSpin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(100, -1))
+        popupHeightSpin = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (100, -1))
         popupHeightSpin.SetRange(min,max)
         popupHeightSpin.SetValue(value)
         
         self.winId['appearance:gSelectPopupHeight:value'] = popupHeightSpin.GetId()
         
-        gridSizer.Add(item=popupHeightSpin,
-                      flag=wx.ALIGN_RIGHT,
-                      pos=(row, 1))
+        gridSizer.Add(item = popupHeightSpin,
+                      flag = wx.ALIGN_RIGHT,
+                      pos = (row, 1))
         
         
         #
         # icon theme
         #
         row += 1
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Icon theme:")),
-                       flag=wx.ALIGN_LEFT |
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Icon theme:")),
+                       flag = wx.ALIGN_LEFT |
                        wx.ALIGN_CENTER_VERTICAL,
-                       pos=(row, 0))
-        iconTheme = wx.Choice(parent=panel, id=wx.ID_ANY, size=(100, -1),
-                              choices=self.settings.Get(group='appearance', key='iconTheme',
-                                                        subkey='choices', internal=True),
-                              name="GetStringSelection")
-        iconTheme.SetStringSelection(self.settings.Get(group='appearance', key='iconTheme', subkey='type'))
+                       pos = (row, 0))
+        iconTheme = wx.Choice(parent = panel, id = wx.ID_ANY, size = (100, -1),
+                              choices = self.settings.Get(group = 'appearance', key = 'iconTheme',
+                                                        subkey = 'choices', internal = True),
+                              name = "GetStringSelection")
+        iconTheme.SetStringSelection(self.settings.Get(group = 'appearance', key = 'iconTheme', subkey = 'type'))
         self.winId['appearance:iconTheme:type'] = iconTheme.GetId()
 
-        gridSizer.Add(item=iconTheme,
-                      flag=wx.ALIGN_RIGHT |
+        gridSizer.Add(item = iconTheme,
+                      flag = wx.ALIGN_RIGHT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 1))
+                      pos = (row, 1))
         
         row += 1
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Note: For changing the icon theme, "
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Note: For changing the icon theme, "
                                                  "you must save the settings and restart this GUI.")),
-                      flag=wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 0), span=(1, 2))
+                      flag = wx.ALIGN_CENTER_VERTICAL,
+                      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)
+        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)
         
         panel.SetSizer(border)
                 
@@ -1333,46 +1361,46 @@
 
 
 
-    def _CreateDisplayPage(self, notebook):
+    def _createDisplayPage(self, notebook):
         """!Create notebook page for display settings"""
    
-        panel = wx.Panel(parent=notebook, id=wx.ID_ANY)
-        notebook.AddPage(page=panel, text=_("Map Display"))
+        panel = wx.Panel(parent = notebook, id = wx.ID_ANY)
+        notebook.AddPage(page = panel, text = _("Map Display"))
 
         border = wx.BoxSizer(wx.VERTICAL)
 
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Font settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Font settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(0)
 
         #
         # font settings
         #
         row = 0
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Default font for GRASS displays:")),
-                      flag=wx.ALIGN_LEFT |
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Default font for GRASS displays:")),
+                      flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 0))
-        fontButton = wx.Button(parent=panel, id=wx.ID_ANY,
-                               label=_("Set font"), size=(100, -1))
-        gridSizer.Add(item=fontButton,
-                      flag=wx.ALIGN_RIGHT |
+                      pos = (row, 0))
+        fontButton = wx.Button(parent = panel, id = wx.ID_ANY,
+                               label = _("Set font"), size = (100, -1))
+        gridSizer.Add(item = fontButton,
+                      flag = wx.ALIGN_RIGHT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 1))
+                      pos = (row, 1))
 
-        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)
+        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)
 
         #
         # display settings
         #
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Default display settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Default display settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(0)
 
         
@@ -1380,102 +1408,102 @@
         # display driver
         #
         row = 0
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Display driver:")),
-                      flag=wx.ALIGN_LEFT |
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Display driver:")),
+                      flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 0))
-        listOfDrivers = self.settings.Get(group='display', key='driver', subkey='choices', internal=True)
-        driver = wx.Choice(parent=panel, id=wx.ID_ANY, size=(150, -1),
-                           choices=listOfDrivers,
-                           name="GetStringSelection")
-        driver.SetStringSelection(self.settings.Get(group='display', key='driver', subkey='type'))
+                      pos = (row, 0))
+        listOfDrivers = self.settings.Get(group = 'display', key = 'driver', subkey = 'choices', internal = True)
+        driver = wx.Choice(parent = panel, id = wx.ID_ANY, size = (150, -1),
+                           choices = listOfDrivers,
+                           name = "GetStringSelection")
+        driver.SetStringSelection(self.settings.Get(group = 'display', key = 'driver', subkey = 'type'))
         self.winId['display:driver:type'] = driver.GetId()
         
-        gridSizer.Add(item=driver,
-                      flag=wx.ALIGN_RIGHT,
-                      pos=(row, 1))
+        gridSizer.Add(item = driver,
+                      flag = wx.ALIGN_RIGHT,
+                      pos = (row, 1))
         
         #
         # Statusbar mode
         #
         row += 1
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Statusbar mode:")),
-                      flag=wx.ALIGN_LEFT |
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Statusbar mode:")),
+                      flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 0))
-        listOfModes = self.settings.Get(group='display', key='statusbarMode', subkey='choices', internal=True)
-        statusbarMode = wx.Choice(parent=panel, id=wx.ID_ANY, size=(150, -1),
-                                  choices=listOfModes,
-                                  name="GetSelection")
-        statusbarMode.SetSelection(self.settings.Get(group='display', key='statusbarMode', subkey='selection'))
+                      pos = (row, 0))
+        listOfModes = self.settings.Get(group = 'display', key = 'statusbarMode', subkey = 'choices', internal = True)
+        statusbarMode = wx.Choice(parent = panel, id = wx.ID_ANY, size = (150, -1),
+                                  choices = listOfModes,
+                                  name = "GetSelection")
+        statusbarMode.SetSelection(self.settings.Get(group = 'display', key = 'statusbarMode', subkey = 'selection'))
         self.winId['display:statusbarMode:selection'] = statusbarMode.GetId()
 
-        gridSizer.Add(item=statusbarMode,
-                      flag=wx.ALIGN_RIGHT,
-                      pos=(row, 1))
+        gridSizer.Add(item = statusbarMode,
+                      flag = wx.ALIGN_RIGHT,
+                      pos = (row, 1))
 
         #
         # Background color
         #
         row += 1
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Background color:")),
-                      flag=wx.ALIGN_LEFT |
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Background color:")),
+                      flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 0))
-        bgColor = csel.ColourSelect(parent=panel, id=wx.ID_ANY,
-                                    colour=self.settings.Get(group='display', key='bgcolor', subkey='color'),
-                                    size=globalvar.DIALOG_COLOR_SIZE)
+                      pos = (row, 0))
+        bgColor = csel.ColourSelect(parent = panel, id = wx.ID_ANY,
+                                    colour = self.settings.Get(group = 'display', key = 'bgcolor', subkey = 'color'),
+                                    size = globalvar.DIALOG_COLOR_SIZE)
         bgColor.SetName('GetColour')
         self.winId['display:bgcolor:color'] = bgColor.GetId()
         
-        gridSizer.Add(item=bgColor,
-                      flag=wx.ALIGN_RIGHT,
-                      pos=(row, 1))
+        gridSizer.Add(item = bgColor,
+                      flag = wx.ALIGN_RIGHT,
+                      pos = (row, 1))
         
         #
         # Use computation resolution
         #
         row += 1
-        compResolution = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                    label=_("Constrain display resolution to computational settings"),
-                                    name="IsChecked")
-        compResolution.SetValue(self.settings.Get(group='display', key='compResolution', subkey='enabled'))
+        compResolution = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                    label = _("Constrain display resolution to computational settings"),
+                                    name = "IsChecked")
+        compResolution.SetValue(self.settings.Get(group = 'display', key = 'compResolution', subkey = 'enabled'))
         self.winId['display:compResolution:enabled'] = compResolution.GetId()
 
-        gridSizer.Add(item=compResolution,
-                      pos=(row, 0), span=(1, 2))
+        gridSizer.Add(item = compResolution,
+                      pos = (row, 0), span = (1, 2))
 
         #
         # auto-rendering
         #
         row += 1
-        autoRendering = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                    label=_("Enable auto-rendering"),
-                                    name="IsChecked")
-        autoRendering.SetValue(self.settings.Get(group='display', key='autoRendering', subkey='enabled'))
+        autoRendering = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                    label = _("Enable auto-rendering"),
+                                    name = "IsChecked")
+        autoRendering.SetValue(self.settings.Get(group = 'display', key = 'autoRendering', subkey = 'enabled'))
         self.winId['display:autoRendering:enabled'] = autoRendering.GetId()
 
-        gridSizer.Add(item=autoRendering,
-                      pos=(row, 0), span=(1, 2))
+        gridSizer.Add(item = autoRendering,
+                      pos = (row, 0), span = (1, 2))
         
         #
         # auto-zoom
         #
         row += 1
-        autoZooming = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                  label=_("Enable auto-zooming to selected map layer"),
-                                  name="IsChecked")
-        autoZooming.SetValue(self.settings.Get(group='display', key='autoZooming', subkey='enabled'))
+        autoZooming = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                  label = _("Enable auto-zooming to selected map layer"),
+                                  name = "IsChecked")
+        autoZooming.SetValue(self.settings.Get(group = 'display', key = 'autoZooming', subkey = 'enabled'))
         self.winId['display:autoZooming:enabled'] = autoZooming.GetId()
 
-        gridSizer.Add(item=autoZooming,
-                      pos=(row, 0), span=(1, 2))
+        gridSizer.Add(item = autoZooming,
+                      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)
+        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)
         
         panel.SetSizer(border)
                 
@@ -1484,16 +1512,16 @@
         
         return panel
 
-    def _CreateCmdPage(self, notebook):
+    def _createCmdPage(self, notebook):
         """!Create notebook page for commad dialog settings"""
-        panel = wx.Panel(parent=notebook, id=wx.ID_ANY)
-        notebook.AddPage(page=panel, text=_("Command"))
+        panel = wx.Panel(parent = notebook, id = wx.ID_ANY)
+        notebook.AddPage(page = panel, text = _("Command"))
         
         border = wx.BoxSizer(wx.VERTICAL)
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Command dialog settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Command dialog settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
         
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(0)
         
         #
@@ -1501,359 +1529,359 @@
         #
         row = 0
         # overwrite
-        overwrite = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                label=_("Allow output files to overwrite existing files"),
-                                name="IsChecked")
-        overwrite.SetValue(self.settings.Get(group='cmd', key='overwrite', subkey='enabled'))
+        overwrite = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                label = _("Allow output files to overwrite existing files"),
+                                name = "IsChecked")
+        overwrite.SetValue(self.settings.Get(group = 'cmd', key = 'overwrite', subkey = 'enabled'))
         self.winId['cmd:overwrite:enabled'] = overwrite.GetId()
         
-        gridSizer.Add(item=overwrite,
-                      pos=(row, 0), span=(1, 2))
+        gridSizer.Add(item = overwrite,
+                      pos = (row, 0), span = (1, 2))
         row += 1
         # close
-        close = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                            label=_("Close dialog when command is successfully finished"),
-                            name="IsChecked")
-        close.SetValue(self.settings.Get(group='cmd', key='closeDlg', subkey='enabled'))
+        close = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                            label = _("Close dialog when command is successfully finished"),
+                            name = "IsChecked")
+        close.SetValue(self.settings.Get(group = 'cmd', key = 'closeDlg', subkey = 'enabled'))
         self.winId['cmd:closeDlg:enabled'] = close.GetId()
         
-        gridSizer.Add(item=close,
-                      pos=(row, 0), span=(1, 2))
+        gridSizer.Add(item = close,
+                      pos = (row, 0), span = (1, 2))
         row += 1
         # add layer
-        add = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                          label=_("Add created map into layer tree"),
-                          name="IsChecked")
-        add.SetValue(self.settings.Get(group='cmd', key='addNewLayer', subkey='enabled'))
+        add = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                          label = _("Add created map into layer tree"),
+                          name = "IsChecked")
+        add.SetValue(self.settings.Get(group = 'cmd', key = 'addNewLayer', subkey = 'enabled'))
         self.winId['cmd:addNewLayer:enabled'] = add.GetId()
     
-        gridSizer.Add(item=add,
-                      pos=(row, 0), span=(1, 2))
+        gridSizer.Add(item = add,
+                      pos = (row, 0), span = (1, 2))
         
         row += 1
         # interactive input
         interactive = wx.CheckBox(parent = panel, id = wx.ID_ANY,
                                   label = _("Allow interactive input"),
                                   name = "IsChecked")
-        interactive.SetValue(self.settings.Get(group='cmd', key='interactiveInput', subkey='enabled'))
+        interactive.SetValue(self.settings.Get(group = 'cmd', key = 'interactiveInput', subkey = 'enabled'))
         self.winId['cmd:interactiveInput:enabled'] = interactive.GetId()
         gridSizer.Add(item = interactive,
                       pos = (row, 0), span = (1, 2))
         
         row += 1
         # verbosity
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Verbosity level:")),
-                      flag=wx.ALIGN_LEFT |
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Verbosity level:")),
+                      flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 0))
-        verbosity = wx.Choice(parent=panel, id=wx.ID_ANY, size=(200, -1),
-                              choices=self.settings.Get(group='cmd', key='verbosity', subkey='choices', internal=True),
-                              name="GetStringSelection")
-        verbosity.SetStringSelection(self.settings.Get(group='cmd', key='verbosity', subkey='selection'))
+                      pos = (row, 0))
+        verbosity = wx.Choice(parent = panel, id = wx.ID_ANY, size = (200, -1),
+                              choices = self.settings.Get(group = 'cmd', key = 'verbosity', subkey = 'choices', internal = True),
+                              name = "GetStringSelection")
+        verbosity.SetStringSelection(self.settings.Get(group = 'cmd', key = 'verbosity', subkey = 'selection'))
         self.winId['cmd:verbosity:selection'] = verbosity.GetId()
         
-        gridSizer.Add(item=verbosity,
-                      pos=(row, 1))
+        gridSizer.Add(item = verbosity,
+                      pos = (row, 1))
         
-        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)
+        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)
         
         #
         # raster settings
         #
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Raster settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Raster settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
         
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(0)
         
         #
         # raster overlay
         #
         row = 0
-        rasterOpaque = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                    label=_("Make null cells opaque"),
-                                    name='IsChecked')
-        rasterOpaque.SetValue(self.settings.Get(group='cmd', key='rasterOpaque', subkey='enabled'))
+        rasterOpaque = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                    label = _("Make null cells opaque"),
+                                    name = 'IsChecked')
+        rasterOpaque.SetValue(self.settings.Get(group = 'cmd', key = 'rasterOpaque', subkey = 'enabled'))
         self.winId['cmd:rasterOpaque:enabled'] = rasterOpaque.GetId()
         
-        gridSizer.Add(item=rasterOpaque,
-                      pos=(row, 0), span=(1, 2))
+        gridSizer.Add(item = rasterOpaque,
+                      pos = (row, 0), span = (1, 2))
 
         # default color table
         row += 1
-        rasterCTCheck = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                    label=_("Default color table"),
-                                    name='IsChecked')
-        rasterCTCheck.SetValue(self.settings.Get(group='cmd', key='rasterColorTable', subkey='enabled'))
+        rasterCTCheck = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                    label = _("Default color table"),
+                                    name = 'IsChecked')
+        rasterCTCheck.SetValue(self.settings.Get(group = 'cmd', key = 'rasterColorTable', subkey = 'enabled'))
         self.winId['cmd:rasterColorTable:enabled'] = rasterCTCheck.GetId()
         rasterCTCheck.Bind(wx.EVT_CHECKBOX, self.OnCheckColorTable)
         
-        gridSizer.Add(item=rasterCTCheck,
-                      pos=(row, 0))
+        gridSizer.Add(item = rasterCTCheck,
+                      pos = (row, 0))
         
-        rasterCTName = wx.Choice(parent=panel, id=wx.ID_ANY, size=(200, -1),
-                               choices=utils.GetColorTables(),
-                               name="GetStringSelection")
-        rasterCTName.SetStringSelection(self.settings.Get(group='cmd', key='rasterColorTable', subkey='selection'))
+        rasterCTName = wx.Choice(parent = panel, id = wx.ID_ANY, size = (200, -1),
+                               choices = utils.GetColorTables(),
+                               name = "GetStringSelection")
+        rasterCTName.SetStringSelection(self.settings.Get(group = 'cmd', key = 'rasterColorTable', subkey = 'selection'))
         self.winId['cmd:rasterColorTable:selection'] = rasterCTName.GetId()
         if not rasterCTCheck.IsChecked():
             rasterCTName.Enable(False)
         
-        gridSizer.Add(item=rasterCTName,
-                      pos=(row, 1))
+        gridSizer.Add(item = rasterCTName,
+                      pos = (row, 1))
         
-        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)
+        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)
         
         #
         # vector settings
         #
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Vector settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Vector settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
         
-        gridSizer = wx.FlexGridSizer (cols=7, hgap=3, vgap=3)
+        gridSizer = wx.FlexGridSizer (cols = 7, hgap = 3, vgap = 3)
         
-        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                         label=_("Display:")),
-                      flag=wx.ALIGN_CENTER_VERTICAL)
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                         label = _("Display:")),
+                      flag = wx.ALIGN_CENTER_VERTICAL)
         
         for type in ('point', 'line', 'centroid', 'boundary',
                      'area', 'face'):
-            chkbox = wx.CheckBox(parent=panel, label=type)
-            checked = self.settings.Get(group='cmd', key='showType',
-                                        subkey=[type, 'enabled'])
+            chkbox = wx.CheckBox(parent = panel, label = type)
+            checked = self.settings.Get(group = 'cmd', key = 'showType',
+                                        subkey = [type, 'enabled'])
             chkbox.SetValue(checked)
             self.winId['cmd:showType:%s:enabled' % type] = chkbox.GetId()
-            gridSizer.Add(item=chkbox)
+            gridSizer.Add(item = chkbox)
 
-        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)
+        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)
         
         panel.SetSizer(border)
         
         return panel
 
-    def _CreateAttributeManagerPage(self, notebook):
+    def _createAttributeManagerPage(self, notebook):
         """!Create notebook page for 'Attribute Table Manager' settings"""
-        panel = wx.Panel(parent=notebook, id=wx.ID_ANY)
-        notebook.AddPage(page=panel, text=_("Attributes"))
+        panel = wx.Panel(parent = notebook, id = wx.ID_ANY)
+        notebook.AddPage(page = panel, text = _("Attributes"))
 
         pageSizer = wx.BoxSizer(wx.VERTICAL)
 
         #
         # highlighting
         #
-        highlightBox = wx.StaticBox(parent=panel, id=wx.ID_ANY,
-                                    label=" %s " % _("Highlighting"))
+        highlightBox = wx.StaticBox(parent = panel, id = wx.ID_ANY,
+                                    label = " %s " % _("Highlighting"))
         highlightSizer = wx.StaticBoxSizer(highlightBox, wx.VERTICAL)
 
-        flexSizer = wx.FlexGridSizer (cols=2, hgap=5, vgap=5)
+        flexSizer = wx.FlexGridSizer (cols = 2, hgap = 5, vgap = 5)
         flexSizer.AddGrowableCol(0)
         
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Color:"))
-        hlColor = csel.ColourSelect(parent=panel, id=wx.ID_ANY,
-                                    colour=self.settings.Get(group='atm', key='highlight', subkey='color'),
-                                    size=globalvar.DIALOG_COLOR_SIZE)
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY, label = _("Color:"))
+        hlColor = csel.ColourSelect(parent = panel, id = wx.ID_ANY,
+                                    colour = self.settings.Get(group = 'atm', key = 'highlight', subkey = 'color'),
+                                    size = globalvar.DIALOG_COLOR_SIZE)
         hlColor.SetName('GetColour')
         self.winId['atm:highlight:color'] = hlColor.GetId()
 
-        flexSizer.Add(label, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
-        flexSizer.Add(hlColor, proportion=0, flag=wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
+        flexSizer.Add(label, proportion = 0, flag = wx.ALIGN_CENTER_VERTICAL)
+        flexSizer.Add(hlColor, proportion = 0, flag = wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
 
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Line width (in pixels):"))
-        hlWidth = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(50, -1),
-                              initial=self.settings.Get(group='atm', key='highlight',subkey='width'),
-                              min=1, max=1e6)
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY, label = _("Line width (in pixels):"))
+        hlWidth = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (50, -1),
+                              initial = self.settings.Get(group = 'atm', key = 'highlight',subkey = 'width'),
+                              min = 1, max = 1e6)
         self.winId['atm:highlight:width'] = hlWidth.GetId()
 
-        flexSizer.Add(label, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
-        flexSizer.Add(hlWidth, proportion=0, flag=wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
+        flexSizer.Add(label, proportion = 0, flag = wx.ALIGN_CENTER_VERTICAL)
+        flexSizer.Add(hlWidth, proportion = 0, flag = wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
 
-        highlightSizer.Add(item=flexSizer,
-                           proportion=0,
-                           flag=wx.ALL | wx.EXPAND,
-                           border=5)
+        highlightSizer.Add(item = flexSizer,
+                           proportion = 0,
+                           flag = wx.ALL | wx.EXPAND,
+                           border = 5)
 
-        pageSizer.Add(item=highlightSizer,
-                      proportion=0,
-                      flag=wx.ALL | wx.EXPAND,
-                      border=5)
+        pageSizer.Add(item = highlightSizer,
+                      proportion = 0,
+                      flag = wx.ALL | wx.EXPAND,
+                      border = 5)
 
         #
         # data browser related settings
         #
-        dataBrowserBox = wx.StaticBox(parent=panel, id=wx.ID_ANY,
-                                    label=" %s " % _("Data browser"))
+        dataBrowserBox = wx.StaticBox(parent = panel, id = wx.ID_ANY,
+                                    label = " %s " % _("Data browser"))
         dataBrowserSizer = wx.StaticBoxSizer(dataBrowserBox, wx.VERTICAL)
 
-        flexSizer = wx.FlexGridSizer (cols=2, hgap=5, vgap=5)
+        flexSizer = wx.FlexGridSizer (cols = 2, hgap = 5, vgap = 5)
         flexSizer.AddGrowableCol(0)
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Left mouse double click:"))
-        leftDbClick = wx.Choice(parent=panel, id=wx.ID_ANY,
-                                choices=self.settings.Get(group='atm', key='leftDbClick', subkey='choices', internal=True),
-                                name="GetSelection")
-        leftDbClick.SetSelection(self.settings.Get(group='atm', key='leftDbClick', subkey='selection'))
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY, label = _("Left mouse double click:"))
+        leftDbClick = wx.Choice(parent = panel, id = wx.ID_ANY,
+                                choices = self.settings.Get(group = 'atm', key = 'leftDbClick', subkey = 'choices', internal = True),
+                                name = "GetSelection")
+        leftDbClick.SetSelection(self.settings.Get(group = 'atm', key = 'leftDbClick', subkey = 'selection'))
         self.winId['atm:leftDbClick:selection'] = leftDbClick.GetId()
 
-        flexSizer.Add(label, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
-        flexSizer.Add(leftDbClick, proportion=0, flag=wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
+        flexSizer.Add(label, proportion = 0, flag = wx.ALIGN_CENTER_VERTICAL)
+        flexSizer.Add(leftDbClick, proportion = 0, flag = wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
 
         # encoding
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY,
-                              label=_("Encoding (e.g. utf-8, ascii, iso8859-1, koi8-r):"))
-        encoding = wx.TextCtrl(parent=panel, id=wx.ID_ANY,
-                               value=self.settings.Get(group='atm', key='encoding', subkey='value'),
-                               name="GetValue", size=(200, -1))
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                              label = _("Encoding (e.g. utf-8, ascii, iso8859-1, koi8-r):"))
+        encoding = wx.TextCtrl(parent = panel, id = wx.ID_ANY,
+                               value = self.settings.Get(group = 'atm', key = 'encoding', subkey = 'value'),
+                               name = "GetValue", size = (200, -1))
         self.winId['atm:encoding:value'] = encoding.GetId()
 
-        flexSizer.Add(label, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
-        flexSizer.Add(encoding, proportion=0, flag=wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
+        flexSizer.Add(label, proportion = 0, flag = wx.ALIGN_CENTER_VERTICAL)
+        flexSizer.Add(encoding, proportion = 0, flag = wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
 
         # ask on delete record
-        askOnDeleteRec = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                     label=_("Ask when deleting data record(s) from table"),
-                                     name='IsChecked')
-        askOnDeleteRec.SetValue(self.settings.Get(group='atm', key='askOnDeleteRec', subkey='enabled'))
+        askOnDeleteRec = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                     label = _("Ask when deleting data record(s) from table"),
+                                     name = 'IsChecked')
+        askOnDeleteRec.SetValue(self.settings.Get(group = 'atm', key = 'askOnDeleteRec', subkey = 'enabled'))
         self.winId['atm:askOnDeleteRec:enabled'] = askOnDeleteRec.GetId()
 
-        flexSizer.Add(askOnDeleteRec, proportion=0)
+        flexSizer.Add(askOnDeleteRec, proportion = 0)
 
-        dataBrowserSizer.Add(item=flexSizer,
-                           proportion=0,
-                           flag=wx.ALL | wx.EXPAND,
-                           border=5)
+        dataBrowserSizer.Add(item = flexSizer,
+                           proportion = 0,
+                           flag = wx.ALL | wx.EXPAND,
+                           border = 5)
 
-        pageSizer.Add(item=dataBrowserSizer,
-                      proportion=0,
-                      flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND,
-                      border=3)
+        pageSizer.Add(item = dataBrowserSizer,
+                      proportion = 0,
+                      flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND,
+                      border = 3)
 
         #
         # create table
         #
-        createTableBox = wx.StaticBox(parent=panel, id=wx.ID_ANY,
-                                    label=" %s " % _("Create table"))
+        createTableBox = wx.StaticBox(parent = panel, id = wx.ID_ANY,
+                                    label = " %s " % _("Create table"))
         createTableSizer = wx.StaticBoxSizer(createTableBox, wx.VERTICAL)
 
-        flexSizer = wx.FlexGridSizer (cols=2, hgap=5, vgap=5)
+        flexSizer = wx.FlexGridSizer (cols = 2, hgap = 5, vgap = 5)
         flexSizer.AddGrowableCol(0)
 
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY,
-                              label=_("Key column:"))
-        keyColumn = wx.TextCtrl(parent=panel, id=wx.ID_ANY,
-                                size=(250, -1))
-        keyColumn.SetValue(self.settings.Get(group='atm', key='keycolumn', subkey='value'))
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                              label = _("Key column:"))
+        keyColumn = wx.TextCtrl(parent = panel, id = wx.ID_ANY,
+                                size = (250, -1))
+        keyColumn.SetValue(self.settings.Get(group = 'atm', key = 'keycolumn', subkey = 'value'))
         self.winId['atm:keycolumn:value'] = keyColumn.GetId()
         
-        flexSizer.Add(label, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
-        flexSizer.Add(keyColumn, proportion=0, flag=wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
+        flexSizer.Add(label, proportion = 0, flag = wx.ALIGN_CENTER_VERTICAL)
+        flexSizer.Add(keyColumn, proportion = 0, flag = wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
 
-        createTableSizer.Add(item=flexSizer,
-                             proportion=0,
-                             flag=wx.ALL | wx.EXPAND,
-                             border=5)
+        createTableSizer.Add(item = flexSizer,
+                             proportion = 0,
+                             flag = wx.ALL | wx.EXPAND,
+                             border = 5)
 
-        pageSizer.Add(item=createTableSizer,
-                      proportion=0,
-                      flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND,
-                      border=3)
+        pageSizer.Add(item = createTableSizer,
+                      proportion = 0,
+                      flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND,
+                      border = 3)
         
         panel.SetSizer(pageSizer)
 
         return panel
 
-    def _CreateProjectionPage(self, notebook):
+    def _createProjectionPage(self, notebook):
         """!Create notebook page for workspace settings"""
-        panel = wx.Panel(parent=notebook, id=wx.ID_ANY)
-        notebook.AddPage(page=panel, text=_("Projection"))
+        panel = wx.Panel(parent = notebook, id = wx.ID_ANY)
+        notebook.AddPage(page = panel, text = _("Projection"))
         
         border = wx.BoxSizer(wx.VERTICAL)
         
         #
         # projections statusbar settings
         #
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Projection statusbar settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Projection statusbar settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(1)
 
         # epsg
         row = 0
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY,
-                              label=_("EPSG code:"))
-        epsgCode = wx.ComboBox(parent=panel, id=wx.ID_ANY,
-                               name="GetValue",
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                              label = _("EPSG code:"))
+        epsgCode = wx.ComboBox(parent = panel, id = wx.ID_ANY,
+                               name = "GetValue",
                                size = (150, -1))
         self.epsgCodeDict = dict()
-        epsgCode.SetValue(str(self.settings.Get(group='projection', key='statusbar', subkey='epsg')))
+        epsgCode.SetValue(str(self.settings.Get(group = 'projection', key = 'statusbar', subkey = 'epsg')))
         self.winId['projection:statusbar:epsg'] = epsgCode.GetId()
         
-        gridSizer.Add(item=label,
-                      pos=(row, 0),
+        gridSizer.Add(item = label,
+                      pos = (row, 0),
                       flag = wx.ALIGN_CENTER_VERTICAL)
-        gridSizer.Add(item=epsgCode,
-                      pos=(row, 1), span=(1, 2))
+        gridSizer.Add(item = epsgCode,
+                      pos = (row, 1), span = (1, 2))
         
         # proj
         row += 1
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY,
-                              label=_("Proj.4 string (required):"))
-        projString = wx.TextCtrl(parent=panel, id=wx.ID_ANY,
-                                 value=self.settings.Get(group='projection', key='statusbar', subkey='proj4'),
-                                 name="GetValue", size=(400, -1))
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                              label = _("Proj.4 string (required):"))
+        projString = wx.TextCtrl(parent = panel, id = wx.ID_ANY,
+                                 value = self.settings.Get(group = 'projection', key = 'statusbar', subkey = 'proj4'),
+                                 name = "GetValue", size = (400, -1))
         self.winId['projection:statusbar:proj4'] = projString.GetId()
 
-        gridSizer.Add(item=label,
-                      pos=(row, 0),
+        gridSizer.Add(item = label,
+                      pos = (row, 0),
+                      flag  =  wx.ALIGN_CENTER_VERTICAL)
+        gridSizer.Add(item = projString,
+                      pos = (row, 1), span = (1, 2),
                       flag = wx.ALIGN_CENTER_VERTICAL)
-        gridSizer.Add(item=projString,
-                      pos=(row, 1), span=(1, 2),
-                      flag = wx.ALIGN_CENTER_VERTICAL)
         
         # epsg file
         row += 1
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY,
-                              label=_("EPSG file:"))
-        projFile = wx.TextCtrl(parent=panel, id=wx.ID_ANY,
-                               value = self.settings.Get(group='projection', key='statusbar', subkey='projFile'),
-                               name="GetValue", size=(400, -1))
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                              label = _("EPSG file:"))
+        projFile = wx.TextCtrl(parent = panel, id = wx.ID_ANY,
+                               value  =  self.settings.Get(group = 'projection', key = 'statusbar', subkey = 'projFile'),
+                               name = "GetValue", size = (400, -1))
         self.winId['projection:statusbar:projFile'] = projFile.GetId()
-        gridSizer.Add(item=label,
-                      pos=(row, 0),
-                      flag = wx.ALIGN_CENTER_VERTICAL)
-        gridSizer.Add(item=projFile,
-                      pos=(row, 1),
-                      flag = wx.ALIGN_CENTER_VERTICAL)
+        gridSizer.Add(item = label,
+                      pos = (row, 0),
+                      flag  =  wx.ALIGN_CENTER_VERTICAL)
+        gridSizer.Add(item = projFile,
+                      pos = (row, 1),
+                      flag  =  wx.ALIGN_CENTER_VERTICAL)
         
         # note + button
         row += 1
         note = wx.StaticText(parent = panel, id = wx.ID_ANY,
                              label = _("Load EPSG codes (be patient), enter EPSG code or "
                                        "insert Proj.4 string directly."))
-        gridSizer.Add(item=note,
+        gridSizer.Add(item = note,
                       span = (1, 2),
-                      pos=(row, 0))
+                      pos = (row, 0))
 
         row += 1
-        epsgLoad = wx.Button(parent=panel, id=wx.ID_ANY,
-                             label=_("&Load EPSG codes"))
-        gridSizer.Add(item=epsgLoad,
+        epsgLoad = wx.Button(parent = panel, id = wx.ID_ANY,
+                             label = _("&Load EPSG codes"))
+        gridSizer.Add(item = epsgLoad,
                       flag = wx.ALIGN_RIGHT,
-                      pos=(row, 1))
+                      pos = (row, 1))
         
-        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)
+        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)
 
         #
         # format
         #
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Coordinates format"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Coordinates format"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
         
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer = wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer.AddGrowableCol(2)
 
         row = 0
@@ -1875,20 +1903,20 @@
         precision.SetValue(int(self.settings.Get(group = 'projection', key = 'format', subkey = 'precision')))
         self.winId['projection:format:precision'] = precision.GetId()
                 
-        gridSizer.Add(item=ll,
-                      pos=(row, 0))
-        gridSizer.Add(item=wx.StaticText(parent = panel, id = wx.ID_ANY,
+        gridSizer.Add(item = ll,
+                      pos = (row, 0))
+        gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
                                          label = _("Precision:")),
                       flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.LEFT,
                       border = 20,
-                      pos=(row, 1))
-        gridSizer.Add(item=precision,
+                      pos = (row, 1))
+        gridSizer.Add(item = precision,
                       flag = wx.ALIGN_CENTER_VERTICAL,
-                      pos=(row, 2))
+                      pos = (row, 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)
+        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)
         
         panel.SetSizer(border)
 
@@ -1899,50 +1927,6 @@
         
         return panel
 
-    def _CreateWorkspacePage(self, notebook):
-        """!Create notebook page for workspace settings"""
-        panel = wx.Panel(parent=notebook, id=wx.ID_ANY)
-        notebook.AddPage(page=panel, text=_("Workspace"))
-
-        border = wx.BoxSizer(wx.VERTICAL)
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Loading workspace"))
-        sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
-
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
-        gridSizer.AddGrowableCol(0)
-
-        row = 0
-
-        #
-        # positioning
-        #
-        posDisplay = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                 label=_("Suppress positioning Map Display Window(s)"),
-                                 name='IsChecked')
-        posDisplay.SetValue(self.settings.Get(group='workspace', key='posDisplay', subkey='enabled'))
-        self.winId['workspace:posDisplay:enabled'] = posDisplay.GetId()
-
-        gridSizer.Add(item=posDisplay,
-                      pos=(row, 0), span=(1, 2))
-
-        row +=1 
-
-        posManager = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                 label=_("Suppress positioning Layer Manager window"),
-                                 name='IsChecked')
-        posManager.SetValue(self.settings.Get(group='workspace', key='posManager', subkey='enabled'))
-        self.winId['workspace:posManager:enabled'] = posManager.GetId()
-
-        gridSizer.Add(item=posManager,
-                      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)
-
-        panel.SetSizer(border)
-        
-        return panel
-    
     def OnCheckColorTable(self, event):
         """!Set/unset default color table"""
         win = self.FindWindowById(self.winId['cmd:rasterColorTable:selection'])
@@ -1959,9 +1943,9 @@
         self.epsgCodeDict = utils.ReadEpsgCodes(path)
         list = self.FindWindowById(self.winId['projection:statusbar:epsg'])
         if type(self.epsgCodeDict) == type(''):
-            wx.MessageBox(parent=self,
-                          message=_("Unable to read EPSG codes: %s") % self.epsgCodeDict,
-                          caption=_("Error"),  style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
+            wx.MessageBox(parent = self,
+                          message = _("Unable to read EPSG codes: %s") % self.epsgCodeDict,
+                          caption = _("Error"),  style = wx.OK | wx.ICON_ERROR | wx.CENTRE)
             self.epsgCodeDict = dict()
             list.SetItems([])
             list.SetValue('')
@@ -1988,18 +1972,18 @@
         winCode = self.FindWindowById(event.GetId())
         win = self.FindWindowById(self.winId['projection:statusbar:proj4'])
         if not self.epsgCodeDict:
-            wx.MessageBox(parent=self,
-                          message=_("EPSG code %s not found") % event.GetString(),
-                          caption=_("Error"),  style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
+            wx.MessageBox(parent = self,
+                          message = _("EPSG code %s not found") % event.GetString(),
+                          caption = _("Error"),  style = wx.OK | wx.ICON_ERROR | wx.CENTRE)
             winCode.SetValue('')
             win.SetValue('')
         
         try:
             code = int(event.GetString())
         except ValueError:
-            wx.MessageBox(parent=self,
-                          message=_("EPSG code %s not found") % str(code),
-                          caption=_("Error"),  style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
+            wx.MessageBox(parent = self,
+                          message = _("EPSG code %s not found") % str(code),
+                          caption = _("Error"),  style = wx.OK | wx.ICON_ERROR | wx.CENTRE)
             winCode.SetValue('')
             win.SetValue('')
         
@@ -2007,63 +1991,63 @@
         try:
             win.SetValue(self.epsgCodeDict[code][1].replace('<>', '').strip())
         except KeyError:
-            wx.MessageBox(parent=self,
-                          message=_("EPSG code %s not found") % str(code),
-                          caption=_("Error"),  style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
+            wx.MessageBox(parent = self,
+                          message = _("EPSG code %s not found") % str(code),
+                          caption = _("Error"),  style = wx.OK | wx.ICON_ERROR | wx.CENTRE)
             winCode.SetValue('')
             win.SetValue('')
         
     def OnSetFont(self, event):
         """'Set font' button pressed"""
-        dlg = DefaultFontDialog(parent=self, id=wx.ID_ANY,
-                                title=_('Select default display font'),
-                                style=wx.DEFAULT_DIALOG_STYLE,
-                                type='font')
+        dlg = DefaultFontDialog(parent = self,
+                                title = _('Select default display font'),
+                                style = wx.DEFAULT_DIALOG_STYLE,
+                                type = 'font')
         
         if dlg.ShowModal() == wx.ID_OK:
             # set default font and encoding environmental variables
             if dlg.font:
                 os.environ["GRASS_FONT"] = dlg.font
-                self.settings.Set(group='display', value=dlg.font,
-                                  key='font', subkey='type')
+                self.settings.Set(group = 'display', value = dlg.font,
+                                  key = 'font', subkey = 'type')
 
             if dlg.encoding and \
                     dlg.encoding != "ISO-8859-1":
                 os.environ["GRASS_ENCODING"] = dlg.encoding
-                self.settings.Set(group='display', value=dlg.encoding,
-                                  key='font', subkey='encoding')
+                self.settings.Set(group = 'display', value = dlg.encoding,
+                                  key = 'font', subkey = 'encoding')
                 
         dlg.Destroy()
         
         event.Skip()
 
     def OnSetOutputFont(self, event):
-        """'Set output font' button pressed"""
+        """'Set output font' button pressed
+        """
+        dlg = DefaultFontDialog(parent = self,
+                                title = _('Select output font'),
+                                style = wx.DEFAULT_DIALOG_STYLE,
+                                type = 'outputfont')
         
-        dlg = DefaultFontDialog(parent=self, id=wx.ID_ANY,
-                                title=_('Select output font'),
-                                style=wx.DEFAULT_DIALOG_STYLE,
-                                type='outputfont')
-        
         if dlg.ShowModal() == wx.ID_OK:
             # set output font and font size variables
             if dlg.font:
-                self.settings.Set(group='display', value=dlg.font,
-                                  key='outputfont', subkey='type')
+                self.settings.Set(group = 'appearance', value = dlg.font,
+                                  key = 'outputfont', subkey = 'type')
 
-                self.settings.Set(group='display', value=dlg.fontsize,
-                                  key='outputfont', subkey='size')
+                self.settings.Set(group = 'appearance', value = dlg.fontsize,
+                                  key = 'outputfont', subkey = 'size')
 
 # Standard font dialog broken for Mac in OS X 10.6
-#        type = self.settings.Get(group='display', key='outputfont', subkey='type')   
+#        type = self.settings.Get(group = 'display', key = 'outputfont', subkey = 'type')   
                            
-#        size = self.settings.Get(group='display', key='outputfont', subkey='size')
+#        size = self.settings.Get(group = 'display', key = 'outputfont', subkey = 'size')
 #        if size == None or size == 0: size = 10
 #        size = float(size)
         
 #        data = wx.FontData()
 #        data.EnableEffects(True)
-#        data.SetInitialFont(wx.Font(pointSize=size, family=wx.FONTFAMILY_MODERN, faceName=type, style=wx.NORMAL, weight=0))
+#        data.SetInitialFont(wx.Font(pointSize = size, family = wx.FONTFAMILY_MODERN, faceName = type, style = wx.NORMAL, weight = 0))
 
 #        dlg = wx.FontDialog(self, data)
 
@@ -2071,10 +2055,10 @@
 #            data = dlg.GetFontData()
 #            font = data.GetChosenFont()
 
-#            self.settings.Set(group='display', value=font.GetFaceName(),
-#                                  key='outputfont', subkey='type')
-#            self.settings.Set(group='display', value=font.GetPointSize(),
-#                                  key='outputfont', subkey='size')
+#            self.settings.Set(group = 'display', value = font.GetFaceName(),
+#                                  key = 'outputfont', subkey = 'type')
+#            self.settings.Set(group = 'display', value = font.GetPointSize(),
+#                                  key = 'outputfont', subkey = 'size')
                 
         dlg.Destroy()
 
@@ -2087,7 +2071,7 @@
         #
         # update default window dimension
         #
-        if self.settings.Get(group='general', key='defWindowPos', subkey='enabled') is True:
+        if self.settings.Get(group = 'general', key = 'defWindowPos', subkey = 'enabled') is True:
             dim = ''
             # layer manager
             pos = self.parent.GetPosition()
@@ -2100,9 +2084,9 @@
 
                 dim += ',%d,%d,%d,%d' % (pos[0], pos[1], size[0], size[1])
 
-            self.settings.Set(group='general', key='defWindowPos', subkey='dim', value=dim)
+            self.settings.Set(group = 'general', key = 'defWindowPos', subkey = 'dim', value = dim)
         else:
-            self.settings.Set(group='general', key='defWindowPos', subkey='dim', value='')
+            self.settings.Set(group = 'general', key = 'defWindowPos', subkey = 'dim', value = '')
 
         return True
 
@@ -2111,85 +2095,84 @@
     Opens a file selection dialog to select default font
     to use in all GRASS displays
     """
-    def __init__(self, parent, id, title,
-                 pos=wx.DefaultPosition, size=wx.DefaultSize,
-                 style=wx.DEFAULT_DIALOG_STYLE |
+    def __init__(self, parent, title, id = wx.ID_ANY,
+                 style = wx.DEFAULT_DIALOG_STYLE |
                  wx.RESIZE_BORDER,
-                 settings=globalSettings,
-                 type='font'):
+                 settings = globalSettings,
+                 type = 'font'):
         
         self.settings = settings
         self.type = type
         
-        wx.Dialog.__init__(self, parent, id, title, pos, size, style)
+        wx.Dialog.__init__(self, parent, id, title, style = style)
 
-        panel = wx.Panel(parent=self, id=wx.ID_ANY)
+        panel = wx.Panel(parent = self, id = wx.ID_ANY)
         
         self.fontlist = self.GetFonts()
         
         border = wx.BoxSizer(wx.VERTICAL)
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Font settings"))
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Font settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
-        gridSizer = wx.GridBagSizer (hgap=5, vgap=5)
+        gridSizer = wx.GridBagSizer (hgap = 5, vgap = 5)
         gridSizer.AddGrowableCol(0)
 
-        label = wx.StaticText(parent=panel, id=wx.ID_ANY,
-                              label=_("Select font:"))
-        gridSizer.Add(item=label,
-                      flag=wx.ALIGN_TOP,
-                      pos=(0,0))
+        label = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                              label = _("Select font:"))
+        gridSizer.Add(item = label,
+                      flag = wx.ALIGN_TOP,
+                      pos = (0,0))
         
-        self.fontlb = wx.ListBox(parent=panel, id=wx.ID_ANY, pos=wx.DefaultPosition,
-                                 choices=self.fontlist,
-                                 style=wx.LB_SINGLE|wx.LB_SORT)
+        self.fontlb = wx.ListBox(parent = panel, id = wx.ID_ANY, pos = wx.DefaultPosition,
+                                 choices = self.fontlist,
+                                 style = wx.LB_SINGLE|wx.LB_SORT)
         self.Bind(wx.EVT_LISTBOX, self.EvtListBox, self.fontlb)
         self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtListBoxDClick, self.fontlb)
 
-        gridSizer.Add(item=self.fontlb,
-                flag=wx.EXPAND, pos=(1, 0))
+        gridSizer.Add(item = self.fontlb,
+                flag = wx.EXPAND, pos = (1, 0))
 
         if self.type == 'font':
             if "GRASS_FONT" in os.environ:
                 self.font = os.environ["GRASS_FONT"]
             else:
-                self.font = self.settings.Get(group='display',
-                                              key='font', subkey='type')
-            self.encoding = self.settings.Get(group='display',
-                                          key='font', subkey='encoding')
+                self.font = self.settings.Get(group = 'display',
+                                              key = 'font', subkey = 'type')
+            self.encoding = self.settings.Get(group = 'display',
+                                          key = 'font', subkey = 'encoding')
 
-            label = wx.StaticText(parent=panel, id=wx.ID_ANY,
-                                  label=_("Character encoding:"))
-            gridSizer.Add(item=label,
-                          flag=wx.ALIGN_CENTER_VERTICAL,
-                          pos=(2, 0))
+            label = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                                  label = _("Character encoding:"))
+            gridSizer.Add(item = label,
+                          flag = wx.ALIGN_CENTER_VERTICAL,
+                          pos = (2, 0))
 
-            self.textentry = wx.TextCtrl(parent=panel, id=wx.ID_ANY,
-                                         value=self.encoding)
-            gridSizer.Add(item=self.textentry,
-                    flag=wx.EXPAND, pos=(3, 0))
+            self.textentry = wx.TextCtrl(parent = panel, id = wx.ID_ANY,
+                                         value = self.encoding)
+            gridSizer.Add(item = self.textentry,
+                    flag = wx.EXPAND, pos = (3, 0))
 
             self.textentry.Bind(wx.EVT_TEXT, self.OnEncoding)
 
         elif self.type == 'outputfont':
-            self.font = self.settings.Get(group='display',
-                                              key='outputfont', subkey='type')
-            self.fontsize = self.settings.Get(group='display',
-                                          key='outputfont', subkey='size')
-            label = wx.StaticText(parent=panel, id=wx.ID_ANY,
-                              label=_("Font size:"))
-            gridSizer.Add(item=label,
-                      flag=wx.ALIGN_CENTER_VERTICAL,
-                      pos=(2, 0))
+            self.font = self.settings.Get(group = 'appearance',
+                                              key = 'outputfont', subkey = 'type')
+            self.fontsize = self.settings.Get(group = 'appearance',
+                                          key = 'outputfont', subkey = 'size')
+            label = wx.StaticText(parent = panel, id = wx.ID_ANY,
+                              label = _("Font size:"))
+            gridSizer.Add(item = label,
+                      flag = wx.ALIGN_CENTER_VERTICAL,
+                      pos = (2, 0))
                       
-            self.spin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY)
+            self.spin = wx.SpinCtrl(parent = panel, id = wx.ID_ANY)
             if self.fontsize:
                 self.spin.SetValue(self.fontsize)
             self.spin.Bind(wx.EVT_SPINCTRL, self.OnSizeSpin)
             self.spin.Bind(wx.EVT_TEXT, self.OnSizeSpin)
-            gridSizer.Add(item=self.spin,
-                      flag=wx.ALIGN_CENTER_VERTICAL,
-                      pos=(3, 0))
+            gridSizer.Add(item = self.spin,
+                      flag = wx.ALIGN_CENTER_VERTICAL,
+                      pos = (3, 0))
 
         else: 
             return
@@ -2197,25 +2180,25 @@
         if self.font:
             self.fontlb.SetStringSelection(self.font, True)
 
-        sizer.Add(item=gridSizer, proportion=1,
-                  flag=wx.EXPAND | wx.ALL,
-                  border=5)
+        sizer.Add(item = gridSizer, proportion = 1,
+                  flag = wx.EXPAND | wx.ALL,
+                  border = 5)
 
-        border.Add(item=sizer, proportion=1,
-                   flag=wx.ALL | wx.EXPAND, border=3)
+        border.Add(item = sizer, proportion = 1,
+                   flag = wx.ALL | wx.EXPAND, border = 3)
         
         btnsizer = wx.StdDialogButtonSizer()
 
-        btn = wx.Button(parent=panel, id=wx.ID_OK)
+        btn = wx.Button(parent = panel, id = wx.ID_OK)
         btn.SetDefault()
         btnsizer.AddButton(btn)
 
-        btn = wx.Button(parent=panel, id=wx.ID_CANCEL)
+        btn = wx.Button(parent = panel, id = wx.ID_CANCEL)
         btnsizer.AddButton(btn)
         btnsizer.Realize()
 
-        border.Add(item=btnsizer, proportion=0,
-                   flag=wx.EXPAND | wx.ALIGN_RIGHT | wx.ALL, border=5)
+        border.Add(item = btnsizer, proportion = 0,
+                   flag = wx.EXPAND | wx.ALIGN_RIGHT | wx.ALL, border = 5)
         
         panel.SetAutoLayout(True)
         panel.SetSizer(border)
@@ -2277,9 +2260,9 @@
     decorations
     """
     def __init__(self, parent, id = wx.ID_ANY,
-                 title=_('Manage access to mapsets'),
-                 size = (350, 400),
-                 style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER, **kwargs):
+                 title = _('Manage access to mapsets'),
+                 size  =  (350, 400),
+                 style  =  wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER, **kwargs):
         wx.Dialog.__init__(self, parent, id, title, size = size, style = style)
 
         self.all_mapsets_ordered = utils.ListOfMapsets(get = 'ordered')
@@ -2289,21 +2272,21 @@
         # make a checklistbox from available mapsets and check those that are active
         sizer = wx.BoxSizer(wx.VERTICAL)
 
-        label = wx.StaticText(parent=self, id=wx.ID_ANY,
-                              label=_("Check a mapset to make it accessible, uncheck it to hide it.\n"
-                                      "  Notes:\n"
-                                      "    - The current mapset is always accessible.\n"
-                                      "    - You may only write to the current mapset.\n"
-                                      "    - You may only write to mapsets which you own."))
+        label = wx.StaticText(parent = self, id = wx.ID_ANY,
+                              label = _("Check a mapset to make it accessible, uncheck it to hide it.\n"
+                                        "  Notes:\n"
+                                        "    - The current mapset is always accessible.\n"
+                                        "    - You may only write to the current mapset.\n"
+                                        "    - You may only write to mapsets which you own."))
         
-        sizer.Add(item=label, proportion=0,
-                  flag=wx.ALL, border=5)
+        sizer.Add(item = label, proportion = 0,
+                  flag = wx.ALL, border = 5)
 
-        self.mapsetlb = CheckListMapset(parent=self)
+        self.mapsetlb = CheckListMapset(parent = self)
         self.mapsetlb.LoadData()
         
-        sizer.Add(item=self.mapsetlb, proportion=1,
-                  flag=wx.ALL | wx.EXPAND, border=5)
+        sizer.Add(item = self.mapsetlb, proportion = 1,
+                  flag = wx.ALL | wx.EXPAND, border = 5)
 
         # check all accessible mapsets
         for mset in self.accessible_mapsets:
@@ -2313,10 +2296,10 @@
         #self.mapsetlb.Enable(0, False)
 
         # dialog buttons
-        line = wx.StaticLine(parent=self, id=wx.ID_ANY,
-                             style=wx.LI_HORIZONTAL)
-        sizer.Add(item=line, proportion=0,
-                  flag=wx.EXPAND | wx.ALIGN_CENTRE | wx.ALL, border=5)
+        line = wx.StaticLine(parent = self, id = wx.ID_ANY,
+                             style = wx.LI_HORIZONTAL)
+        sizer.Add(item = line, proportion = 0,
+                  flag = wx.EXPAND | wx.ALIGN_CENTRE | wx.ALL, border = 5)
 
         btnsizer = wx.StdDialogButtonSizer()
         okbtn = wx.Button(self, wx.ID_OK)
@@ -2327,8 +2310,8 @@
         btnsizer.AddButton(cancelbtn)
         btnsizer.Realize()
 
-        sizer.Add(item=btnsizer, proportion=0,
-                  flag=wx.EXPAND | wx.ALIGN_RIGHT | wx.ALL, border=5)
+        sizer.Add(item = btnsizer, proportion = 0,
+                  flag = wx.EXPAND | wx.ALIGN_RIGHT | wx.ALL, border = 5)
 
         # do layout
         self.Layout()
@@ -2350,12 +2333,12 @@
 
 class CheckListMapset(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.CheckListCtrlMixin):
     """!List of mapset/owner/group"""
-    def __init__(self, parent, pos=wx.DefaultPosition,
-                 log=None):
+    def __init__(self, parent, pos = wx.DefaultPosition,
+                 log = None):
         self.parent = parent
         
         wx.ListCtrl.__init__(self, parent, wx.ID_ANY,
-                             style=wx.LC_REPORT)
+                             style = wx.LC_REPORT)
         listmix.CheckListCtrlMixin.__init__(self)
         self.log = log
 
@@ -2384,8 +2367,8 @@
                 self.SetStringItem(index, 1, "%-8s" % stat_info.st_uid)
                 ### self.SetStringItem(index, 2, "%-8s" % stat_info.st_gid)
                 
-        self.SetColumnWidth(col=0, width=wx.LIST_AUTOSIZE)
-        ### self.SetColumnWidth(col=1, width=wx.LIST_AUTOSIZE)
+        self.SetColumnWidth(col = 0, width = wx.LIST_AUTOSIZE)
+        ### self.SetColumnWidth(col = 1, width = wx.LIST_AUTOSIZE)
         
     def OnCheckItem(self, index, flag):
         """!Mapset checked/unchecked"""

Modified: grass/trunk/gui/wxpython/icons/icon.py
===================================================================
--- grass/trunk/gui/wxpython/icons/icon.py	2011-05-27 15:49:38 UTC (rev 46429)
+++ grass/trunk/gui/wxpython/icons/icon.py	2011-05-28 13:31:28 UTC (rev 46430)
@@ -33,7 +33,7 @@
 iconSetDefault  = grass_icons.iconSet
 iconPathDefault = grass_icons.iconPath
 
-iconTheme = UserSettings.Get(group='advanced', key='iconTheme', subkey='type')
+iconTheme = UserSettings.Get(group = 'appearance', key = 'iconTheme', subkey = 'type')
 if iconTheme != 'grass':
     sys.stderr.write(_("Unknown iconset '%s', using default 'grass'...\n") % (iconTheme))
 



More information about the grass-commit mailing list