[GRASS-SVN] r46466 - in grass/branches/releasebranch_6_4/gui/wxpython: gui_modules icons

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 31 05:39:49 EDT 2011


Author: martinl
Date: 2011-05-31 02:39:49 -0700 (Tue, 31 May 2011)
New Revision: 46466

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/preferences.py
   grass/branches/releasebranch_6_4/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
(merge r46430 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py	2011-05-31 09:26:52 UTC (rev 46465)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py	2011-05-31 09:39:49 UTC (rev 46466)
@@ -999,13 +999,15 @@
 
         settings = preferences.Settings()
         
-        typeface = settings.Get(group='appearance', key='outputfont', subkey='type')   
-        if typeface == "": typeface = "Courier New"
-                           
-        typesize = settings.Get(group='appearance', key='outputfont', subkey='size')
-        if typesize == None or typesize <= 0: typesize = 10
+        typeface = settings.Get(group = 'appearance', key = 'outputfont', subkey = 'type')   
+        if typeface == "":
+            typeface = "Courier New"
+        
+        typesize = settings.Get(group = 'appearance', key = 'outputfont', subkey = 'size')
+        if typesize == None or typesize <= 0:
+            typesize = 10
         typesize = float(typesize)
-
+        
         self.StyleDefault     = 0
         self.StyleDefaultSpec = "face:%s,size:%d,fore:#000000,back:#FFFFFF" % (typeface, typesize)
         self.StyleCommand     = 1

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/preferences.py	2011-05-31 09:26:52 UTC (rev 46465)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/preferences.py	2011-05-31 09:39:49 UTC (rev 46466)
@@ -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,15 +60,10 @@
 class Settings:
     """!Generic class where to store settings"""
     def __init__(self):
-        #
-        # settings filename
-        #
-        self.fileName = ".grasswx6"
-        self.filePath = None
-
-        #
+        # settings file
+        self.filePath = os.path.join(os.path.expanduser("~"), '.grasswx6')
+        
         # key/value separator
-        #
         self.sep = ';'
         
         try:
@@ -98,6 +93,15 @@
                 'elementListExpand' : {
                     'selection' : 0 
                     },
+                # workspace
+                'workspace' : {
+                    'posDisplay' : {
+                        'enabled' : False
+                        },
+                    'posManager' : {
+                        'enabled' : False
+                        },
+                    },
                 },
             'manager' : {
                 # show opacity level widget
@@ -243,17 +247,6 @@
                     },
                 },
             #
-            # Workspace
-            #
-            'workspace' : {
-                'posDisplay' : {
-                    'enabled' : False
-                    },
-                'posManager' : {
-                    'enabled' : False
-                    },
-                },
-            #
             # vdigit
             #
             'vdigit' : {
@@ -678,41 +671,20 @@
         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
-
-        # look for settings file
-        gisenv = grass.gisenv()
-        gisdbase = gisenv['GISDBASE']
-        location_name = gisenv['LOCATION_NAME']
-        mapset_name = gisenv['MAPSET']
         
-        mapset_file = os.path.join(gisdbase, location_name, mapset_name, self.fileName)
-        location_file = os.path.join(gisdbase, location_name, self.fileName)
-        gisdbase_file = os.path.join(gisdbase, self.fileName)
-        home_file = os.path.join(os.path.expanduser("~"), self.fileName) # MS Windows fix ?
+        self._readFile(self.filePath, settings)
         
-        if os.path.isfile(mapset_file):
-            self.filePath = mapset_file
-        elif os.path.isfile(location_file):
-            self.filePath = location_file
-        elif os.path.isfile(gisdbase_file):
-            self.filePath = gisdbase_file
-        elif os.path.isfile(home_file):
-            self.filePath = home_file
-        
-        if self.filePath:
-            self.__ReadFile(self.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"""
         if settings is None:
             settings = self.userSettings
@@ -735,7 +707,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:
@@ -748,21 +720,17 @@
 
         file.close()
 
-    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 ?
-        
-        filePath = os.path.join(home, self.fileName)
-        
+                
         try:
-            file = open(filePath, "w")
+            file = open(self.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:
@@ -772,15 +740,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:
@@ -790,14 +758,12 @@
             raise gcmd.GException(e)
         except StandardError, e:
             raise gcmd.GException(_('Writing settings to file <%(file)s> failed.'
-                                    '\n\nDetails: %(detail)s') % { 'file' : filePath,
+                                    '\n\nDetails: %(detail)s') % { 'file' : self.filePath,
                                                                    'detail' : e })
         
         file.close()
         
-        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':
@@ -827,7 +793,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
@@ -945,7 +911,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 = {}
@@ -978,8 +944,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)
@@ -987,11 +953,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)
@@ -1040,8 +1006,8 @@
         Posts event EVT_SETTINGS_CHANGED.
         """
         if self._updateSettings():
-            file = self.settings.SaveToFile()
-            self.parent.goutput.WriteLog(_('Settings saved to file \'%s\'.') % file)
+            self.settings.SaveToFile()
+            self.parent.goutput.WriteLog(_('Settings saved to file \'%s\'.') % self.settings.filePath)
             event = wxSettingsChanged()
             wx.PostEvent(self, event)
             self.Close()
@@ -1071,10 +1037,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:
@@ -1093,150 +1059,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)
 
         #
@@ -1255,70 +1258,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)
                 
@@ -1329,46 +1332,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)
 
         
@@ -1376,9 +1379,9 @@
         # 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)
@@ -1397,91 +1400,91 @@
         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)
                 
@@ -1490,16 +1493,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)
         
         #
@@ -1507,71 +1510,71 @@
         #
         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)
         
         #
@@ -1586,280 +1589,280 @@
         
         gridSizer.Add(item=rasterOverlay,
                       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
@@ -1881,20 +1884,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)
 
@@ -1905,50 +1908,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'])
@@ -1965,9 +1924,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('')
@@ -1994,18 +1953,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('')
         
@@ -2013,63 +1972,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='appearance', value=dlg.font,
-                                  key='outputfont', subkey='type')
-
-                self.settings.Set(group='appearance', value=dlg.fontsize,
-                                  key='outputfont', subkey='size')
-
+                self.settings.Set(group = 'appearance', value = dlg.font,
+                                  key = 'outputfont', subkey = 'type')
+                
+                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)
 
@@ -2077,10 +2036,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()
 
@@ -2093,7 +2052,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()
@@ -2106,9 +2065,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
 
@@ -2117,85 +2076,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
@@ -2203,25 +2161,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)
@@ -2283,9 +2241,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, **kwargs)
 
@@ -2296,21 +2254,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:
@@ -2320,10 +2278,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)
@@ -2334,8 +2292,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()
@@ -2357,12 +2315,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
 
@@ -2391,8 +2349,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/branches/releasebranch_6_4/gui/wxpython/icons/icon.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/icons/icon.py	2011-05-31 09:26:52 UTC (rev 46465)
+++ grass/branches/releasebranch_6_4/gui/wxpython/icons/icon.py	2011-05-31 09:39:49 UTC (rev 46466)
@@ -33,7 +33,7 @@
 iconPathDefault = grass2_icons.iconPath
 iconSetDefault  = grass2_icons.iconSet
 
-iconTheme = UserSettings.Get(group='appearance', key='iconTheme', subkey='type')
+iconTheme = UserSettings.Get(group = 'appearance', key = 'iconTheme', subkey = 'type')
 if iconTheme == 'silk':
     import silk_icons
     iconPath = silk_icons.iconPath



More information about the grass-commit mailing list