瀏覽代碼

wxgui: fix warning in sphinx documentation; some pep8 cleanup

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@61886 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi 10 年之前
父節點
當前提交
ada3ec0944

+ 6 - 6
gui/wxpython/animation/provider.py

@@ -82,9 +82,9 @@ class BitmapProvider:
         Applies to 2D mode.
         Applies to 2D mode.
 
 
         :param cmdsForComposition: list of lists of command lists
         :param cmdsForComposition: list of lists of command lists
-                [[['d.rast', 'map=elev_2001'], ['d.vect', 'map=points']], # g.pnmcomp
-                 [['d.rast', 'map=elev_2002'], ['d.vect', 'map=points']],
-                 ...]
+                                   [[['d.rast', 'map=elev_2001'], ['d.vect', 'map=points']], # g.pnmcomp
+                                   [['d.rast', 'map=elev_2002'], ['d.vect', 'map=points']],
+                                   ...]
         :param opacities: list of opacity values
         :param opacities: list of opacity values
         :param regions: list of regions
         :param regions: list of regions
         """
         """
@@ -479,7 +479,7 @@ def RenderProcess2D(imageWidth, imageHeight, tempDir, cmd, region, bgcolor, file
     :param region: region as a dict or None
     :param region: region as a dict or None
     :param bgcolor: background color as a tuple of 3 values 0 to 255
     :param bgcolor: background color as a tuple of 3 values 0 to 255
     :param fileQueue: the inter process communication queue
     :param fileQueue: the inter process communication queue
-    storing the file name of the image
+                      storing the file name of the image
     """
     """
 
 
     filename = GetFileFromCmd(tempDir, cmd, region)
     filename = GetFileFromCmd(tempDir, cmd, region)
@@ -516,7 +516,7 @@ def RenderProcess3D(imageWidth, imageHeight, tempDir, cmd, region, bgcolor, file
     :param region: region as a dict
     :param region: region as a dict
     :param bgcolor: background color as a tuple of 3 values 0 to 255
     :param bgcolor: background color as a tuple of 3 values 0 to 255
     :param fileQueue: the inter process communication queue
     :param fileQueue: the inter process communication queue
-    storing the file name of the image
+                      storing the file name of the image
     """
     """
 
 
     filename = GetFileFromCmd(tempDir, cmd, None)
     filename = GetFileFromCmd(tempDir, cmd, None)
@@ -553,7 +553,7 @@ def CompositeProcess(imageWidth, imageHeight, tempDir, cmdList, region, opacitie
     :param opacites: list of opacities
     :param opacites: list of opacities
     :param bgcolor: background color as a tuple of 3 values 0 to 255
     :param bgcolor: background color as a tuple of 3 values 0 to 255
     :param fileQueue: the inter process communication queue
     :param fileQueue: the inter process communication queue
-    storing the file name of the image
+                      storing the file name of the image
     """
     """
 
 
     maps = []
     maps = []

+ 1 - 1
gui/wxpython/core/debug.py

@@ -46,7 +46,7 @@ class DebugMsg:
 
 
         :param level: debug level (0-5)
         :param level: debug level (0-5)
         :param message: message to be printed
         :param message: message to be printed
-        :param *args: formatting params
+        :param args: formatting params
         """
         """
         # self.SetLevel()
         # self.SetLevel()
         if self.debuglevel > 0 and level > 0 and level <= self.debuglevel:
         if self.debuglevel > 0 and level > 0 and level <= self.debuglevel:

+ 6 - 0
gui/wxpython/core/giface.py

@@ -113,6 +113,7 @@ class GrassInterface:
     to every GUI component.
     to every GUI component.
 
 
     .. note::
     .. note::
+
         The GrassInterface process is not finished.
         The GrassInterface process is not finished.
     """
     """
     def RunCmd(self, *args, **kwargs):
     def RunCmd(self, *args, **kwargs):
@@ -147,6 +148,7 @@ class GrassInterface:
     def GetLayerTree(self):
     def GetLayerTree(self):
         """Returns LayerManager's tree GUI object.
         """Returns LayerManager's tree GUI object.
         .. note::
         .. note::
+
             Will be removed from the interface.
             Will be removed from the interface.
         """
         """
         raise NotImplementedError()
         raise NotImplementedError()
@@ -160,6 +162,7 @@ class GrassInterface:
         """Returns current map display.
         """Returns current map display.
 
 
         .. note::
         .. note::
+
             For layer related tasks use GetLayerList().
             For layer related tasks use GetLayerList().
 
 
         :return: MapFrame instance
         :return: MapFrame instance
@@ -171,6 +174,7 @@ class GrassInterface:
         """Get list of all map displays.
         """Get list of all map displays.
 
 
         .. note::
         .. note::
+
             Might be removed from the interface.
             Might be removed from the interface.
 
 
         :return: list of MapFrame instances
         :return: list of MapFrame instances
@@ -181,6 +185,7 @@ class GrassInterface:
         """Returns current map window.
         """Returns current map window.
 
 
         .. note::
         .. note::
+
             For layer related tasks use GetLayerList().
             For layer related tasks use GetLayerList().
         """
         """
         raise NotImplementedError()
         raise NotImplementedError()
@@ -189,6 +194,7 @@ class GrassInterface:
         """Returns object which shows the progress.
         """Returns object which shows the progress.
 
 
         .. note::
         .. note::
+
             Some implementations may not implement this method.
             Some implementations may not implement this method.
         """
         """
         raise NotImplementedError()
         raise NotImplementedError()

文件差異過大導致無法顯示
+ 204 - 202
gui/wxpython/core/render.py


+ 23 - 22
gui/wxpython/gui_core/dialogs.py

@@ -4,23 +4,23 @@
 @brief Various dialogs used in wxGUI.
 @brief Various dialogs used in wxGUI.
 
 
 List of classes:
 List of classes:
- - dialogs::SimpleDialog
- - dialogs::LocationDialog
- - dialogs::MapsetDialog
- - dialogs::VectorDialog
- - dialogs::NewVectorDialog
- - dialogs::SavedRegion
- - dialogs::GroupDialog
- - dialogs::MapLayersDialog
- - dialogs::ImportDialog
- - dialogs::GdalImportDialog
- - dialogs::GdalOutputDialog
- - dialogs::DxfImportDialog
- - dialogs::LayersList (used by MultiImport) 
- - dialogs::SetOpacityDialog
- - dialogs::ImageSizeDialog
- - dialogs::SqlQueryFrame
- - dialogs::SymbolDialog
+ - :class:`SimpleDialog`
+ - :class:`LocationDialog`
+ - :class:`MapsetDialog`
+ - :class:`VectorDialog`
+ - :class:`NewVectorDialog`
+ - :class:`SavedRegion`
+ - :class:`GroupDialog`
+ - :class:`MapLayersDialog`
+ - :class:`ImportDialog`
+ - :class:`GdalImportDialog`
+ - :class:`GdalOutputDialog`
+ - :class:`DxfImportDialog`
+ - :class:`LayersList` (used by MultiImport)
+ - :class:`SetOpacityDialog`
+ - :class:`ImageSizeDialog`
+ - :class:`SqlQueryFrame`
+ - :class:`SymbolDialog`
 
 
 (C) 2008-2011 by the GRASS Development Team
 (C) 2008-2011 by the GRASS Development Team
 
 
@@ -347,25 +347,26 @@ class NewVectorDialog(VectorDialog):
         """
         """
         if self.ftype:
         if self.ftype:
             return self.ftype.GetType()
             return self.ftype.GetType()
-        
+
         return None
         return None
 
 
+
 def CreateNewVector(parent, cmd, title = _('Create new vector map'),
 def CreateNewVector(parent, cmd, title = _('Create new vector map'),
                     exceptMap=None, giface=None,
                     exceptMap=None, giface=None,
                     disableAdd = False, disableTable = False):
                     disableAdd = False, disableTable = False):
     """Create new vector map layer
     """Create new vector map layer
-    
-    :param cmd: (prog, **kwargs)
+
+    :param cmd: (prog, \*\*kwargs)
     :param title: window title
     :param title: window title
     :param exceptMap: list of maps to be excepted
     :param exceptMap: list of maps to be excepted
     :param log:
     :param log:
     :param disableAdd: disable 'add layer' checkbox
     :param disableAdd: disable 'add layer' checkbox
     :param disableTable: disable 'create table' checkbox
     :param disableTable: disable 'create table' checkbox
-    
+
     :return: dialog instance
     :return: dialog instance
     :return: None on error
     :return: None on error
     """
     """
-    vExternalOut = grass.parse_command('v.external.out', flags = 'g')
+    vExternalOut = grass.parse_command('v.external.out', flags='g')
     isNative = vExternalOut['format'] == 'native'
     isNative = vExternalOut['format'] == 'native'
     if cmd[0] == 'v.edit' and not isNative:
     if cmd[0] == 'v.edit' and not isNative:
         showType = True
         showType = True

文件差異過大導致無法顯示
+ 232 - 227
gui/wxpython/gui_core/gselect.py


+ 169 - 152
gui/wxpython/gui_core/widgets.py

@@ -83,7 +83,7 @@ class NotebookController:
     and other methods can be delegated by @c __getattr__.
     and other methods can be delegated by @c __getattr__.
     """
     """
     def __init__(self, classObject, widget):
     def __init__(self, classObject, widget):
-        """       
+        """
         :param classObject: notebook class name (object, i.e. FlatNotebook)
         :param classObject: notebook class name (object, i.e. FlatNotebook)
         :param widget: notebook instance
         :param widget: notebook instance
         """
         """
@@ -148,7 +148,7 @@ class NotebookController:
         """Set active notebook page.
         """Set active notebook page.
 
 
         :param page: name, eg. 'layers', 'output', 'search', 'pyshell', 'nviz'
         :param page: name, eg. 'layers', 'output', 'search', 'pyshell', 'nviz'
-        (depends on concrete notebook instance)
+                     (depends on concrete notebook instance)
         """
         """
         idx = self.GetPageIndexByName(page)
         idx = self.GetPageIndexByName(page)
         if self.classObject.GetSelection(self.widget) != idx:
         if self.classObject.GetSelection(self.widget) != idx:
@@ -174,7 +174,7 @@ class NotebookController:
 
 
     def GetPageIndexByName(self, page):
     def GetPageIndexByName(self, page):
         """Get notebook page index
         """Get notebook page index
-        
+
         :param page: name
         :param page: name
         """
         """
         if page not in self.notebookPages:
         if page not in self.notebookPages:
@@ -187,7 +187,7 @@ class NotebookController:
     def HighlightPageByName(self, page):
     def HighlightPageByName(self, page):
         pageIndex = self.GetPageIndexByName(page)
         pageIndex = self.GetPageIndexByName(page)
         self.HighlightPage(pageIndex)
         self.HighlightPage(pageIndex)
-        
+
     def HighlightPage(self, index):
     def HighlightPage(self, index):
         if self.classObject.GetSelection(self.widget) != index:
         if self.classObject.GetSelection(self.widget) != index:
             text = self.classObject.GetPageText(self.widget, index)
             text = self.classObject.GetPageText(self.widget, index)
@@ -215,12 +215,12 @@ class FlatNotebookController(NotebookController):
 
 
     def GetPageIndexByName(self, page):
     def GetPageIndexByName(self, page):
         """Get notebook page index
         """Get notebook page index
-        
+
         :param page: name
         :param page: name
         """
         """
         if page not in self.notebookPages:
         if page not in self.notebookPages:
             return -1
             return -1
-        
+
         return self.classObject.GetPageIndex(self.widget, self.notebookPages[page])
         return self.classObject.GetPageIndex(self.widget, self.notebookPages[page])
 
 
 
 
@@ -232,11 +232,14 @@ class GNotebook(FN.FlatNotebook):
     """
     """
     def __init__(self, parent, style, **kwargs):
     def __init__(self, parent, style, **kwargs):
         if globalvar.hasAgw:
         if globalvar.hasAgw:
-            FN.FlatNotebook.__init__(self, parent, id = wx.ID_ANY, agwStyle = style, **kwargs)
+            FN.FlatNotebook.__init__(self, parent, id=wx.ID_ANY,
+                                     agwStyle=style, **kwargs)
         else:
         else:
-            FN.FlatNotebook.__init__(self, parent, id = wx.ID_ANY, style = style, **kwargs)
-        
-        self.controller = FlatNotebookController(classObject = FN.FlatNotebook, widget = self)
+            FN.FlatNotebook.__init__(self, parent, id=wx.ID_ANY,
+                                     style=style, **kwargs)
+
+        self.controller = FlatNotebookController(classObject=FN.FlatNotebook,
+                                                 widget=self)
 
 
     def AddPage(self, **kwargs):
     def AddPage(self, **kwargs):
         """@copydoc NotebookController::AddPage()"""
         """@copydoc NotebookController::AddPage()"""
@@ -261,14 +264,16 @@ class GNotebook(FN.FlatNotebook):
     def __getattr__(self, name):
     def __getattr__(self, name):
         return getattr(self.controller, name)
         return getattr(self.controller, name)
 
 
+
 class FormNotebook(wx.Notebook):
 class FormNotebook(wx.Notebook):
     """Notebook widget.
     """Notebook widget.
 
 
     Respects native look.
     Respects native look.
     """
     """
     def __init__(self, parent, style):
     def __init__(self, parent, style):
-        wx.Notebook.__init__(self, parent, id = wx.ID_ANY, style = style)
-        self.controller = NotebookController(classObject = wx.Notebook, widget = self)
+        wx.Notebook.__init__(self, parent, id=wx.ID_ANY, style=style)
+        self.controller = NotebookController(classObject=wx.Notebook,
+                                             widget=self)
 
 
     def AddPage(self, **kwargs):
     def AddPage(self, **kwargs):
         """@copydoc NotebookController::AddPage()"""
         """@copydoc NotebookController::AddPage()"""
@@ -300,9 +305,10 @@ class FormListbook(wx.Listbook):
     Respects native look.
     Respects native look.
     """
     """
     def __init__(self, parent, style):
     def __init__(self, parent, style):
-        wx.Listbook.__init__(self, parent, id = wx.ID_ANY, style = style)
-        self.controller = NotebookController(classObject = wx.Listbook, widget = self)
-            
+        wx.Listbook.__init__(self, parent, id=wx.ID_ANY, style=style)
+        self.controller = NotebookController(classObject=wx.Listbook,
+                                             widget=self)
+
     def AddPage(self, **kwargs):
     def AddPage(self, **kwargs):
         """@copydoc NotebookController::AddPage()"""
         """@copydoc NotebookController::AddPage()"""
         self.controller.AddPage(**kwargs)
         self.controller.AddPage(**kwargs)
@@ -329,23 +335,25 @@ class FormListbook(wx.Listbook):
 
 
 class ScrolledPanel(SP.ScrolledPanel):
 class ScrolledPanel(SP.ScrolledPanel):
     """Custom ScrolledPanel to avoid strange behaviour concerning focus"""
     """Custom ScrolledPanel to avoid strange behaviour concerning focus"""
-    def __init__(self, parent, style = wx.TAB_TRAVERSAL):
-        SP.ScrolledPanel.__init__(self, parent = parent, id = wx.ID_ANY, style = style)
+    def __init__(self, parent, style=wx.TAB_TRAVERSAL):
+        SP.ScrolledPanel.__init__(self, parent=parent, id=wx.ID_ANY,
+                                  style=style)
 
 
     def OnChildFocus(self, event):
     def OnChildFocus(self, event):
         pass
         pass
-        
+
+
 class NumTextCtrl(wx.TextCtrl):
 class NumTextCtrl(wx.TextCtrl):
     """Class derived from wx.TextCtrl for numerical values only"""
     """Class derived from wx.TextCtrl for numerical values only"""
     def __init__(self, parent,  **kwargs):
     def __init__(self, parent,  **kwargs):
 ##        self.precision = kwargs.pop('prec')
 ##        self.precision = kwargs.pop('prec')
-        wx.TextCtrl.__init__(self, parent = parent,
-            validator = NTCValidator(flag = 'DIGIT_ONLY'), **kwargs)
-        
-            
+        wx.TextCtrl.__init__(self, parent=parent,
+                             validator=NTCValidator(flag='DIGIT_ONLY'),
+                             **kwargs)
+
     def SetValue(self, value):
     def SetValue(self, value):
-        super(NumTextCtrl, self).SetValue( str(value))
-        
+        super(NumTextCtrl, self).SetValue(str(value))
+
     def GetValue(self):
     def GetValue(self):
         val = super(NumTextCtrl, self).GetValue()
         val = super(NumTextCtrl, self).GetValue()
         if val == '':
         if val == '':
@@ -355,10 +363,11 @@ class NumTextCtrl(wx.TextCtrl):
         except ValueError:
         except ValueError:
             val = ''.join(''.join(val.split('-')).split('.'))
             val = ''.join(''.join(val.split('-')).split('.'))
             return float(val)
             return float(val)
-        
+
     def SetRange(self, min, max):
     def SetRange(self, min, max):
         pass
         pass
-   
+
+
 class FloatSlider(wx.Slider):
 class FloatSlider(wx.Slider):
     """Class derived from wx.Slider for floats"""
     """Class derived from wx.Slider for floats"""
     def __init__(self, **kwargs):
     def __init__(self, **kwargs):
@@ -368,18 +377,19 @@ class FloatSlider(wx.Slider):
         #init range
         #init range
         self.minValueOrig = 0
         self.minValueOrig = 0
         self.maxValueOrig = 1
         self.maxValueOrig = 1
-        
+
     def SetValue(self, value):
     def SetValue(self, value):
-        value *= self.coef 
+        value *= self.coef
         if abs(value) < 1 and value != 0:
         if abs(value) < 1 and value != 0:
             while abs(value) < 1:
             while abs(value) < 1:
                 value *= 100
                 value *= 100
                 self.coef *= 100
                 self.coef *= 100
-            super(FloatSlider, self).SetRange(self.minValueOrig * self.coef, self.maxValueOrig * self.coef)
+            super(FloatSlider, self).SetRange(self.minValueOrig * self.coef,
+                                              self.maxValueOrig * self.coef)
         super(FloatSlider, self).SetValue(value)
         super(FloatSlider, self).SetValue(value)
-        
+
         Debug.msg(4, "FloatSlider.SetValue(): value = %f" % value)
         Debug.msg(4, "FloatSlider.SetValue(): value = %f" % value)
-        
+
     def SetRange(self, minValue, maxValue):
     def SetRange(self, minValue, maxValue):
         self.coef = 1.
         self.coef = 1.
         self.minValueOrig = minValue
         self.minValueOrig = minValue
@@ -392,32 +402,33 @@ class FloatSlider(wx.Slider):
             super(FloatSlider, self).SetValue(super(FloatSlider, self).GetValue() * self.coef)
             super(FloatSlider, self).SetValue(super(FloatSlider, self).GetValue() * self.coef)
         super(FloatSlider, self).SetRange(minValue, maxValue)
         super(FloatSlider, self).SetRange(minValue, maxValue)
         Debug.msg(4, "FloatSlider.SetRange(): minValue = %f, maxValue = %f" % (minValue, maxValue))
         Debug.msg(4, "FloatSlider.SetRange(): minValue = %f, maxValue = %f" % (minValue, maxValue))
-            
+
     def GetValue(self):
     def GetValue(self):
         val = super(FloatSlider, self).GetValue()
         val = super(FloatSlider, self).GetValue()
         Debug.msg(4, "FloatSlider.GetValue(): value = %f" % (val/self.coef))
         Debug.msg(4, "FloatSlider.GetValue(): value = %f" % (val/self.coef))
         return val/self.coef
         return val/self.coef
-        
-        
+
+
 class SymbolButton(BitmapTextButton):
 class SymbolButton(BitmapTextButton):
     """Button with symbol and label."""
     """Button with symbol and label."""
     def __init__(self, parent, usage, label, **kwargs):
     def __init__(self, parent, usage, label, **kwargs):
         """Constructor
         """Constructor
-        
+
         :param parent: parent (usually wx.Panel)
         :param parent: parent (usually wx.Panel)
         :param usage: determines usage and picture
         :param usage: determines usage and picture
         :param label: displayed label
         :param label: displayed label
         """
         """
         size = (15, 15)
         size = (15, 15)
         buffer = wx.EmptyBitmap(*size)
         buffer = wx.EmptyBitmap(*size)
-        BitmapTextButton.__init__(self, parent = parent, label = " " + label, bitmap = buffer, **kwargs)
-        
+        BitmapTextButton.__init__(self, parent=parent, label=" " + label,
+                                  bitmap=buffer, **kwargs)
+
         dc = wx.MemoryDC()
         dc = wx.MemoryDC()
         dc.SelectObject(buffer)
         dc.SelectObject(buffer)
         maskColor = wx.Colour(255, 255, 255)
         maskColor = wx.Colour(255, 255, 255)
         dc.SetBrush(wx.Brush(maskColor))
         dc.SetBrush(wx.Brush(maskColor))
         dc.Clear()
         dc.Clear()
-        
+
         if usage == 'record':
         if usage == 'record':
             self.DrawRecord(dc, size)
             self.DrawRecord(dc, size)
         elif usage == 'stop':
         elif usage == 'stop':
@@ -431,23 +442,24 @@ class SymbolButton(BitmapTextButton):
             buffer.SetMaskColour(maskColor)
             buffer.SetMaskColour(maskColor)
         self.SetBitmapLabel(buffer)
         self.SetBitmapLabel(buffer)
         dc.SelectObject(wx.NullBitmap)
         dc.SelectObject(wx.NullBitmap)
-        
+
     def DrawRecord(self, dc, size):
     def DrawRecord(self, dc, size):
         """Draw record symbol"""
         """Draw record symbol"""
         dc.SetBrush(wx.Brush(wx.Colour(255, 0, 0)))
         dc.SetBrush(wx.Brush(wx.Colour(255, 0, 0)))
         dc.DrawCircle(size[0]/2, size[1] / 2, size[0] / 2)
         dc.DrawCircle(size[0]/2, size[1] / 2, size[0] / 2)
-        
+
     def DrawStop(self, dc, size):
     def DrawStop(self, dc, size):
         """Draw stop symbol"""
         """Draw stop symbol"""
         dc.SetBrush(wx.Brush(wx.Colour(50, 50, 50)))
         dc.SetBrush(wx.Brush(wx.Colour(50, 50, 50)))
         dc.DrawRectangle(0, 0, size[0], size[1])
         dc.DrawRectangle(0, 0, size[0], size[1])
-        
+
     def DrawPlay(self, dc, size):
     def DrawPlay(self, dc, size):
         """Draw play symbol"""
         """Draw play symbol"""
         dc.SetBrush(wx.Brush(wx.Colour(0, 255, 0)))
         dc.SetBrush(wx.Brush(wx.Colour(0, 255, 0)))
-        points = (wx.Point(0, 0), wx.Point(0, size[1]), wx.Point(size[0], size[1] / 2))
+        points = (wx.Point(0, 0), wx.Point(0, size[1]), wx.Point(size[0],
+                  size[1] / 2))
         dc.DrawPolygon(points)
         dc.DrawPolygon(points)
-        
+
     def DrawPause(self, dc, size):
     def DrawPause(self, dc, size):
         """Draw pause symbol"""
         """Draw pause symbol"""
         dc.SetBrush(wx.Brush(wx.Colour(50, 50, 50)))
         dc.SetBrush(wx.Brush(wx.Colour(50, 50, 50)))
@@ -486,7 +498,8 @@ class StaticWrapText(GenStaticText):
         """Calculates size of wrapped label"""
         """Calculates size of wrapped label"""
         parent = self.GetParent()
         parent = self.GetParent()
         newLabel = wordwrap(text=self._initialLabel, width=parent.GetSize()[0],
         newLabel = wordwrap(text=self._initialLabel, width=parent.GetSize()[0],
-                            dc=wx.ClientDC(parent), breakLongWords=True, margin=self._margin)
+                            dc=wx.ClientDC(parent), breakLongWords=True,
+                            margin=self._margin)
         GenStaticText.SetLabel(self, newLabel)
         GenStaticText.SetLabel(self, newLabel)
 
 
     def SetLabel(self, label):
     def SetLabel(self, label):
@@ -497,15 +510,15 @@ class StaticWrapText(GenStaticText):
 class BaseValidator(wx.PyValidator):
 class BaseValidator(wx.PyValidator):
     def __init__(self):
     def __init__(self):
         wx.PyValidator.__init__(self)
         wx.PyValidator.__init__(self)
-        
-        self.Bind(wx.EVT_TEXT, self.OnText) 
+
+        self.Bind(wx.EVT_TEXT, self.OnText)
 
 
     def OnText(self, event):
     def OnText(self, event):
         """Do validation"""
         """Do validation"""
         self.Validate()
         self.Validate()
-        
+
         event.Skip()
         event.Skip()
-        
+
     def Validate(self):
     def Validate(self):
         """Validate input"""
         """Validate input"""
         textCtrl = self.GetWindow()
         textCtrl = self.GetWindow()
@@ -517,7 +530,7 @@ class BaseValidator(wx.PyValidator):
             except ValueError:
             except ValueError:
                 self._notvalid()
                 self._notvalid()
                 return False
                 return False
-        
+
         self._valid()
         self._valid()
         return True
         return True
 
 
@@ -533,16 +546,17 @@ class BaseValidator(wx.PyValidator):
 
 
         sysColor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW)
         sysColor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW)
         textCtrl.SetBackgroundColour(sysColor)
         textCtrl.SetBackgroundColour(sysColor)
-        
+
         textCtrl.Refresh()
         textCtrl.Refresh()
         return True
         return True
 
 
     def TransferToWindow(self):
     def TransferToWindow(self):
         return True # Prevent wxDialog from complaining.
         return True # Prevent wxDialog from complaining.
-    
+
     def TransferFromWindow(self):
     def TransferFromWindow(self):
         return True # Prevent wxDialog from complaining.
         return True # Prevent wxDialog from complaining.
 
 
+
 class CoordinatesValidator(BaseValidator):
 class CoordinatesValidator(BaseValidator):
     """Validator for coordinates input (list of floats separated by comma)"""
     """Validator for coordinates input (list of floats separated by comma)"""
 
 
@@ -557,17 +571,17 @@ class CoordinatesValidator(BaseValidator):
         if text:
         if text:
             try:
             try:
                 text = text.split(',')
                 text = text.split(',')
-                
+
                 for t in text:
                 for t in text:
                     float(t)
                     float(t)
 
 
-                if len(text)%2 != 0:
+                if len(text) % 2 != 0:
                     return False
                     return False
 
 
             except ValueError:
             except ValueError:
                 self._notvalid()
                 self._notvalid()
                 return False
                 return False
-        
+
         self._valid()
         self._valid()
         return True
         return True
 
 
@@ -575,31 +589,34 @@ class CoordinatesValidator(BaseValidator):
         """Clone validator"""
         """Clone validator"""
         return CoordinatesValidator()
         return CoordinatesValidator()
 
 
+
 class IntegerValidator(BaseValidator):
 class IntegerValidator(BaseValidator):
     """Validator for floating-point input"""
     """Validator for floating-point input"""
     def __init__(self):
     def __init__(self):
         BaseValidator.__init__(self)
         BaseValidator.__init__(self)
         self.type = int
         self.type = int
-        
+
     def Clone(self):
     def Clone(self):
         """Clone validator"""
         """Clone validator"""
         return IntegerValidator()
         return IntegerValidator()
 
 
+
 class FloatValidator(BaseValidator):
 class FloatValidator(BaseValidator):
     """Validator for floating-point input"""
     """Validator for floating-point input"""
     def __init__(self):
     def __init__(self):
         BaseValidator.__init__(self)
         BaseValidator.__init__(self)
         self.type = float
         self.type = float
-        
+
     def Clone(self):
     def Clone(self):
         """Clone validator"""
         """Clone validator"""
         return FloatValidator()
         return FloatValidator()
 
 
+
 class EmailValidator(BaseValidator):
 class EmailValidator(BaseValidator):
     """Validator for email input"""
     """Validator for email input"""
     def __init__(self):
     def __init__(self):
         BaseValidator.__init__(self)
         BaseValidator.__init__(self)
- 
+
     def Validate(self):
     def Validate(self):
         """Validate input"""
         """Validate input"""
         textCtrl = self.GetWindow()
         textCtrl = self.GetWindow()
@@ -608,19 +625,20 @@ class EmailValidator(BaseValidator):
             if re.match(r'\b[\w.-]+@[\w.-]+.\w{2,4}\b', text) is None:
             if re.match(r'\b[\w.-]+@[\w.-]+.\w{2,4}\b', text) is None:
                 self._notvalid()
                 self._notvalid()
                 return False
                 return False
-        
+
         self._valid()
         self._valid()
         return True
         return True
- 
+
     def Clone(self):
     def Clone(self):
         """Clone validator"""
         """Clone validator"""
         return EmailValidator()
         return EmailValidator()
- 
+
+
 class TimeISOValidator(BaseValidator):
 class TimeISOValidator(BaseValidator):
     """Validator for time ISO format (YYYY-MM-DD) input"""
     """Validator for time ISO format (YYYY-MM-DD) input"""
     def __init__(self):
     def __init__(self):
         BaseValidator.__init__(self)
         BaseValidator.__init__(self)
-    
+
     def Validate(self):
     def Validate(self):
         """Validate input"""
         """Validate input"""
         textCtrl = self.GetWindow()
         textCtrl = self.GetWindow()
@@ -631,17 +649,18 @@ class TimeISOValidator(BaseValidator):
             except:
             except:
                 self._notvalid()
                 self._notvalid()
                 return False
                 return False
-        
+
         self._valid()
         self._valid()
         return True
         return True
-        
+
     def Clone(self):
     def Clone(self):
         """Clone validator"""
         """Clone validator"""
         return TimeISOValidator()
         return TimeISOValidator()
 
 
+
 class NTCValidator(wx.PyValidator):
 class NTCValidator(wx.PyValidator):
     """validates input in textctrls, taken from wxpython demo"""
     """validates input in textctrls, taken from wxpython demo"""
-    def __init__(self, flag = None):
+    def __init__(self, flag=None):
         wx.PyValidator.__init__(self)
         wx.PyValidator.__init__(self)
         self.flag = flag
         self.flag = flag
         self.Bind(wx.EVT_CHAR, self.OnChar)
         self.Bind(wx.EVT_CHAR, self.OnChar)
@@ -661,7 +680,8 @@ class NTCValidator(wx.PyValidator):
             wx.Bell()
             wx.Bell()
         # Returning without calling even.Skip eats the event before it
         # Returning without calling even.Skip eats the event before it
         # gets to the text control
         # gets to the text control
-        return  
+        return
+
 
 
 class SimpleValidator(wx.PyValidator):
 class SimpleValidator(wx.PyValidator):
     """This validator is used to ensure that the user has entered something
     """This validator is used to ensure that the user has entered something
@@ -700,7 +720,6 @@ class SimpleValidator(wx.PyValidator):
         """
         """
         return True # Prevent wxDialog from complaining.
         return True # Prevent wxDialog from complaining.
 
 
-
     def TransferFromWindow(self):
     def TransferFromWindow(self):
         """Transfer data from window to validator.
         """Transfer data from window to validator.
 
 
@@ -748,7 +767,6 @@ class GenericValidator(wx.PyValidator):
         """
         """
         return True # Prevent wxDialog from complaining.
         return True # Prevent wxDialog from complaining.
 
 
-
     def TransferFromWindow(self):
     def TransferFromWindow(self):
         """Transfer data from window to validator.
         """Transfer data from window to validator.
         """
         """
@@ -757,13 +775,13 @@ class GenericValidator(wx.PyValidator):
 
 
 class SingleSymbolPanel(wx.Panel):
 class SingleSymbolPanel(wx.Panel):
     """Panel for displaying one symbol.
     """Panel for displaying one symbol.
-    
+
     Changes background when selected. Assumes that parent will catch
     Changes background when selected. Assumes that parent will catch
     events emitted on mouse click. Used in gui_core::dialog::SymbolDialog.
     events emitted on mouse click. Used in gui_core::dialog::SymbolDialog.
     """
     """
     def __init__(self, parent, symbolPath):
     def __init__(self, parent, symbolPath):
         """Panel constructor
         """Panel constructor
-        
+
         Signal symbolSelectionChanged - symbol selected
         Signal symbolSelectionChanged - symbol selected
                                       - attribute 'name' (symbol name)
                                       - attribute 'name' (symbol name)
                                       - attribute 'doubleClick' (underlying cause)
                                       - attribute 'doubleClick' (underlying cause)
@@ -773,63 +791,64 @@ class SingleSymbolPanel(wx.Panel):
         """
         """
         self.symbolSelectionChanged = Signal('SingleSymbolPanel.symbolSelectionChanged')
         self.symbolSelectionChanged = Signal('SingleSymbolPanel.symbolSelectionChanged')
 
 
-        wx.Panel.__init__(self, parent, id = wx.ID_ANY, style = wx.BORDER_RAISED)
+        wx.Panel.__init__(self, parent, id=wx.ID_ANY, style=wx.BORDER_RAISED)
         self.SetName(os.path.splitext(os.path.basename(symbolPath))[0])
         self.SetName(os.path.splitext(os.path.basename(symbolPath))[0])
         self.sBmp = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap(symbolPath))
         self.sBmp = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap(symbolPath))
 
 
         self.selected = False
         self.selected = False
         self.selectColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHT)
         self.selectColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHT)
         self.deselectColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)
         self.deselectColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)
-        
+
         sizer = wx.BoxSizer()
         sizer = wx.BoxSizer()
-        sizer.Add(item = self.sBmp, proportion = 0, flag = wx.ALL | wx.ALIGN_CENTER, border = 5)
+        sizer.Add(item = self.sBmp, proportion=0, flag=wx.ALL | wx.ALIGN_CENTER, border = 5)
         self.SetBackgroundColour(self.deselectColor)
         self.SetBackgroundColour(self.deselectColor)
         self.SetMinSize(self.GetBestSize())
         self.SetMinSize(self.GetBestSize())
         self.SetSizerAndFit(sizer)
         self.SetSizerAndFit(sizer)
-        
+
         # binding to both (staticBitmap, Panel) necessary
         # binding to both (staticBitmap, Panel) necessary
         self.sBmp.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
         self.sBmp.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
         self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
         self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
         self.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
         self.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
         self.sBmp.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
         self.sBmp.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
-        
+
     def OnLeftDown(self, event):
     def OnLeftDown(self, event):
         """Panel selected, background changes"""
         """Panel selected, background changes"""
         self.selected = True
         self.selected = True
         self.SetBackgroundColour(self.selectColor)
         self.SetBackgroundColour(self.selectColor)
         self.Refresh()
         self.Refresh()
         event.Skip()
         event.Skip()
-        
+
         self.symbolSelectionChanged.emit(name=self.GetName(), doubleClick=False)
         self.symbolSelectionChanged.emit(name=self.GetName(), doubleClick=False)
-        
+
     def OnDoubleClick(self, event):
     def OnDoubleClick(self, event):
         self.symbolSelectionChanged.emit(name=self.GetName(), doubleClick=True)
         self.symbolSelectionChanged.emit(name=self.GetName(), doubleClick=True)
-        
+
     def Deselect(self):
     def Deselect(self):
         """Panel deselected, background changes back to default"""
         """Panel deselected, background changes back to default"""
         self.selected = False
         self.selected = False
         self.SetBackgroundColour(self.deselectColor)
         self.SetBackgroundColour(self.deselectColor)
         self.Refresh()
         self.Refresh()
-        
+
     def Select(self):
     def Select(self):
         """Select panel, no event emitted"""
         """Select panel, no event emitted"""
         self.selected = True
         self.selected = True
         self.SetBackgroundColour(self.selectColor)
         self.SetBackgroundColour(self.selectColor)
         self.Refresh()
         self.Refresh()
-        
+
+
 class GListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.CheckListCtrlMixin):
 class GListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.CheckListCtrlMixin):
     """Generic ListCtrl with popup menu to select/deselect all
     """Generic ListCtrl with popup menu to select/deselect all
     items"""
     items"""
     def __init__(self, parent):
     def __init__(self, parent):
         self.parent = parent
         self.parent = parent
-        
-        wx.ListCtrl.__init__(self, parent, id = wx.ID_ANY,
-                             style = wx.LC_REPORT)
+
+        wx.ListCtrl.__init__(self, parent, id=wx.ID_ANY,
+                             style=wx.LC_REPORT)
         listmix.CheckListCtrlMixin.__init__(self)
         listmix.CheckListCtrlMixin.__init__(self)
-        
+
         # setup mixins
         # setup mixins
         listmix.ListCtrlAutoWidthMixin.__init__(self)
         listmix.ListCtrlAutoWidthMixin.__init__(self)
-        
+
         self.Bind(wx.EVT_COMMAND_RIGHT_CLICK, self.OnPopupMenu) #wxMSW
         self.Bind(wx.EVT_COMMAND_RIGHT_CLICK, self.OnPopupMenu) #wxMSW
         self.Bind(wx.EVT_RIGHT_UP,            self.OnPopupMenu) #wxGTK
         self.Bind(wx.EVT_RIGHT_UP,            self.OnPopupMenu) #wxGTK
 
 
@@ -841,57 +860,57 @@ class GListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.CheckListCt
         """Show popup menu"""
         """Show popup menu"""
         if self.GetItemCount() < 1:
         if self.GetItemCount() < 1:
             return
             return
-        
+
         if not hasattr(self, "popupDataID1"):
         if not hasattr(self, "popupDataID1"):
             self.popupDataID1 = wx.NewId()
             self.popupDataID1 = wx.NewId()
             self.popupDataID2 = wx.NewId()
             self.popupDataID2 = wx.NewId()
-            
-            self.Bind(wx.EVT_MENU, self.OnSelectAll,  id = self.popupDataID1)
-            self.Bind(wx.EVT_MENU, self.OnSelectNone, id = self.popupDataID2)
-        
+
+            self.Bind(wx.EVT_MENU, self.OnSelectAll,  id=self.popupDataID1)
+            self.Bind(wx.EVT_MENU, self.OnSelectNone, id=self.popupDataID2)
+
         # generate popup-menu
         # generate popup-menu
         menu = wx.Menu()
         menu = wx.Menu()
         menu.Append(self.popupDataID1, _("Select all"))
         menu.Append(self.popupDataID1, _("Select all"))
         menu.Append(self.popupDataID2, _("Deselect all"))
         menu.Append(self.popupDataID2, _("Deselect all"))
-        
+
         self.PopupMenu(menu)
         self.PopupMenu(menu)
         menu.Destroy()
         menu.Destroy()
 
 
     def OnSelectAll(self, event):
     def OnSelectAll(self, event):
         """Select all items"""
         """Select all items"""
         item = -1
         item = -1
-        
+
         while True:
         while True:
             item = self.GetNextItem(item)
             item = self.GetNextItem(item)
             if item == -1:
             if item == -1:
                 break
                 break
             self.CheckItem(item, True)
             self.CheckItem(item, True)
-        
+
         event.Skip()
         event.Skip()
-        
+
     def OnSelectNone(self, event):
     def OnSelectNone(self, event):
         """Deselect items"""
         """Deselect items"""
         item = -1
         item = -1
-        
+
         while True:
         while True:
             item = self.GetNextItem(item, wx.LIST_STATE_SELECTED)
             item = self.GetNextItem(item, wx.LIST_STATE_SELECTED)
             if item == -1:
             if item == -1:
                 break
                 break
             self.CheckItem(item, False)
             self.CheckItem(item, False)
-        
+
         event.Skip()
         event.Skip()
 
 
 
 
 class SearchModuleWidget(wx.Panel):
 class SearchModuleWidget(wx.Panel):
     """Search module widget (used e.g. in SearchModuleWindow)
     """Search module widget (used e.g. in SearchModuleWindow)
-        
+
     Signals:
     Signals:
         moduleSelected - attribute 'name' is module name
         moduleSelected - attribute 'name' is module name
         showSearchResult - attribute 'result' is a node (representing module)
         showSearchResult - attribute 'result' is a node (representing module)
         showNotification - attribute 'message'
         showNotification - attribute 'message'
     """
     """
     def __init__(self, parent, model,
     def __init__(self, parent, model,
-                 showChoice = True, showTip = False, **kwargs):
+                 showChoice=True, showTip=False, **kwargs):
         self._showTip = showTip
         self._showTip = showTip
         self._showChoice = showChoice
         self._showChoice = showChoice
         self._model = model
         self._model = model
@@ -899,12 +918,12 @@ class SearchModuleWidget(wx.Panel):
         self._resultIndex = -1
         self._resultIndex = -1
         self._searchKeys = ['description', 'keywords', 'command']
         self._searchKeys = ['description', 'keywords', 'command']
         self._oldValue = ''
         self._oldValue = ''
-        
+
         self.moduleSelected = Signal('SearchModuleWidget.moduleSelected')
         self.moduleSelected = Signal('SearchModuleWidget.moduleSelected')
         self.showSearchResult = Signal('SearchModuleWidget.showSearchResult')
         self.showSearchResult = Signal('SearchModuleWidget.showSearchResult')
         self.showNotification = Signal('SearchModuleWidget.showNotification')
         self.showNotification = Signal('SearchModuleWidget.showNotification')
 
 
-        wx.Panel.__init__(self, parent = parent, id = wx.ID_ANY, **kwargs)
+        wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY, **kwargs)
 
 
 #        self._box = wx.StaticBox(parent = self, id = wx.ID_ANY,
 #        self._box = wx.StaticBox(parent = self, id = wx.ID_ANY,
 #                                label = " %s " % _("Find module - (press Enter for next match)"))
 #                                label = " %s " % _("Find module - (press Enter for next match)"))
@@ -926,7 +945,7 @@ class SearchModuleWidget(wx.Panel):
                                              size = (-1, 35))
                                              size = (-1, 35))
 
 
         if self._showChoice:
         if self._showChoice:
-            self._searchChoice = wx.Choice(parent = self, id = wx.ID_ANY)
+            self._searchChoice = wx.Choice(parent=self, id=wx.ID_ANY)
             self._searchChoice.SetItems(self._searchModule(keys=['command'], value=''))
             self._searchChoice.SetItems(self._searchModule(keys=['command'], value=''))
             self._searchChoice.Bind(wx.EVT_CHOICE, self.OnSelectModule)
             self._searchChoice.Bind(wx.EVT_CHOICE, self.OnSelectModule)
 
 
@@ -951,7 +970,7 @@ class SearchModuleWidget(wx.Panel):
             boxSizer.Add(item=self._searchTip,
             boxSizer.Add(item=self._searchTip,
                           flag=wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
                           flag=wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
 
 
-        sizer.Add(item = boxSizer, proportion = 1)
+        sizer.Add(item=boxSizer, proportion=1)
 
 
         self.SetSizer(sizer)
         self.SetSizer(sizer)
         sizer.Fit(self)
         sizer.Fit(self)
@@ -1004,20 +1023,20 @@ class SearchModuleWidget(wx.Panel):
         nodes = set()
         nodes = set()
         for key in keys:
         for key in keys:
             nodes.update(self._model.SearchNodes(key=key, value=value))
             nodes.update(self._model.SearchNodes(key=key, value=value))
-        
+
         nodes = list(nodes)
         nodes = list(nodes)
         nodes.sort(key=lambda node: self._model.GetIndexOfNode(node))
         nodes.sort(key=lambda node: self._model.GetIndexOfNode(node))
         self._results = nodes
         self._results = nodes
         self._resultIndex = -1
         self._resultIndex = -1
         commands = [node.data['command'] for node in nodes if node.data['command']]
         commands = [node.data['command'] for node in nodes if node.data['command']]
         commands.sort() # return sorted list of commands (TODO: sort in better way)
         commands.sort() # return sorted list of commands (TODO: sort in better way)
-        
+
         return commands
         return commands
-        
+
     def OnSelectModule(self, event):
     def OnSelectModule(self, event):
         """Module selected from choice, update command prompt"""
         """Module selected from choice, update command prompt"""
         cmd  = self._searchChoice.GetStringSelection()
         cmd  = self._searchChoice.GetStringSelection()
-        self.moduleSelected.emit(name = cmd)
+        self.moduleSelected.emit(name=cmd)
 
 
         if self._showTip:
         if self._showTip:
             for module in self._results:
             for module in self._results:
@@ -1031,6 +1050,7 @@ class SearchModuleWidget(wx.Panel):
         if self._showTip:
         if self._showTip:
             self._searchTip.SetLabel('')
             self._searchTip.SetLabel('')
 
 
+
 class ManageSettingsWidget(wx.Panel):
 class ManageSettingsWidget(wx.Panel):
     """Widget which allows loading and saving settings into file."""
     """Widget which allows loading and saving settings into file."""
     def __init__(self, parent, settingsFile):
     def __init__(self, parent, settingsFile):
@@ -1052,17 +1072,17 @@ class ManageSettingsWidget(wx.Panel):
         self.settingsSaving = Signal('ManageSettingsWidget.settingsSaving')
         self.settingsSaving = Signal('ManageSettingsWidget.settingsSaving')
         self.settingsLoaded = Signal('ManageSettingsWidget.settingsLoaded')
         self.settingsLoaded = Signal('ManageSettingsWidget.settingsLoaded')
 
 
-        wx.Panel.__init__(self, parent = parent, id = wx.ID_ANY)
+        wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY)
+
+        self.settingsBox = wx.StaticBox(parent=self, id=wx.ID_ANY,
+                                        label=" %s " % _("Settings"))
 
 
-        self.settingsBox = wx.StaticBox(parent = self, id = wx.ID_ANY,
-                                        label = " %s " % _("Settings"))
-        
-        self.settingsChoice = wx.Choice(parent = self, id = wx.ID_ANY)
+        self.settingsChoice = wx.Choice(parent=self, id=wx.ID_ANY)
         self.settingsChoice.Bind(wx.EVT_CHOICE, self.OnSettingsChanged)
         self.settingsChoice.Bind(wx.EVT_CHOICE, self.OnSettingsChanged)
-        self.btnSettingsSave = wx.Button(parent = self, id = wx.ID_SAVE)
+        self.btnSettingsSave = wx.Button(parent=self, id=wx.ID_SAVE)
         self.btnSettingsSave.Bind(wx.EVT_BUTTON, self.OnSettingsSave)
         self.btnSettingsSave.Bind(wx.EVT_BUTTON, self.OnSettingsSave)
         self.btnSettingsSave.SetToolTipString(_("Save current settings"))
         self.btnSettingsSave.SetToolTipString(_("Save current settings"))
-        self.btnSettingsDel = wx.Button(parent = self, id = wx.ID_REMOVE)
+        self.btnSettingsDel = wx.Button(parent=self, id=wx.ID_REMOVE)
         self.btnSettingsDel.Bind(wx.EVT_BUTTON, self.OnSettingsDelete)
         self.btnSettingsDel.Bind(wx.EVT_BUTTON, self.OnSettingsDelete)
         self.btnSettingsSave.SetToolTipString(_("Delete currently selected settings"))
         self.btnSettingsSave.SetToolTipString(_("Delete currently selected settings"))
 
 
@@ -1083,20 +1103,16 @@ class ManageSettingsWidget(wx.Panel):
     def _layout(self):
     def _layout(self):
 
 
         self.settingsSizer = wx.StaticBoxSizer(self.settingsBox, wx.HORIZONTAL)
         self.settingsSizer = wx.StaticBoxSizer(self.settingsBox, wx.HORIZONTAL)
-        self.settingsSizer.Add(item = wx.StaticText(parent = self,
-                                               id = wx.ID_ANY,
-                                               label = _("Load settings:")),
-                          flag = wx.ALIGN_CENTER_VERTICAL | wx.RIGHT,
-                          border  = 5)
-        self.settingsSizer.Add(item = self.settingsChoice,
-                          proportion = 1,
-                          flag = wx.EXPAND)
-        self.settingsSizer.Add(item = self.btnSettingsSave,
-                          flag = wx.LEFT | wx.RIGHT,
-                          border = 5)
-        self.settingsSizer.Add(item = self.btnSettingsDel,
-                          flag = wx.RIGHT,
-                          border = 5)
+        self.settingsSizer.Add(item=wx.StaticText(parent=self, id=wx.ID_ANY,
+                                                  label=_("Load settings:")),
+                               flag=wx.ALIGN_CENTER_VERTICAL | wx.RIGHT,
+                               border=5)
+        self.settingsSizer.Add(item=self.settingsChoice,
+                               proportion=1, flag=wx.EXPAND)
+        self.settingsSizer.Add(item=self.btnSettingsSave,
+                               flag=wx.LEFT | wx.RIGHT, border=5)
+        self.settingsSizer.Add(item=self.btnSettingsDel,
+                               flag=wx.RIGHT,border=5)
 
 
     def OnSettingsChanged(self, event):
     def OnSettingsChanged(self, event):
         """Load named settings"""
         """Load named settings"""
@@ -1112,28 +1128,29 @@ class ManageSettingsWidget(wx.Panel):
     def GetSettings(self):
     def GetSettings(self):
         """Load named settings"""
         """Load named settings"""
         return self._settings.copy()
         return self._settings.copy()
-       
+
     def OnSettingsSave(self, event):
     def OnSettingsSave(self, event):
         """Save settings"""
         """Save settings"""
-        dlg = wx.TextEntryDialog(parent = self,
-                                 message = _("Name:"),
-                                 caption = _("Save settings"))
+        dlg = wx.TextEntryDialog(parent=self,
+                                 message=_("Name:"),
+                                 caption=_("Save settings"))
         if dlg.ShowModal() == wx.ID_OK:
         if dlg.ShowModal() == wx.ID_OK:
             name = dlg.GetValue()
             name = dlg.GetValue()
             if not name:
             if not name:
-                GMessage(parent = self,
-                         message = _("Name not given, settings is not saved."))
+                GMessage(parent=self,
+                         message=_("Name not given, settings is not saved."))
             else:
             else:
                 self.settingsSaving.emit(name=name)
                 self.settingsSaving.emit(name=name)
-                
+
             dlg.Destroy()
             dlg.Destroy()
-  
+
     def SaveSettings(self, name):
     def SaveSettings(self, name):
         # check if settings item already exists
         # check if settings item already exists
         if name in self._settings:
         if name in self._settings:
-            dlgOwt = wx.MessageDialog(self, message = _("Settings <%s> already exists. "
-                                                        "Do you want to overwrite the settings?") % name,
-                                      caption = _("Save settings"), style = wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION)
+            dlgOwt = wx.MessageDialog(self, message=_("Settings <%s> already exists. "
+                                                      "Do you want to overwrite the settings?") % name,
+                                      caption=_("Save settings"),
+                                      style=wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION)
             if dlgOwt.ShowModal() != wx.ID_YES:
             if dlgOwt.ShowModal() != wx.ID_YES:
                 dlgOwt.Destroy()
                 dlgOwt.Destroy()
                 return
                 return
@@ -1145,7 +1162,7 @@ class ManageSettingsWidget(wx.Panel):
         self.settingsChoice.SetStringSelection(name)
         self.settingsChoice.SetStringSelection(name)
 
 
         self.data_to_save = []
         self.data_to_save = []
- 
+
     def _saveSettings(self):
     def _saveSettings(self):
         """Save settings and reload if successful"""
         """Save settings and reload if successful"""
         if self._writeSettings() == 0:
         if self._writeSettings() == 0:
@@ -1182,11 +1199,11 @@ class ManageSettingsWidget(wx.Panel):
             GMessage(parent = self,
             GMessage(parent = self,
                      message = _("No settings is defined. Operation canceled."))
                      message = _("No settings is defined. Operation canceled."))
             return
             return
-        
+
         self._settings.pop(name)
         self._settings.pop(name)
         if self._writeSettings() == 0:
         if self._writeSettings() == 0:
             self._settings = self._loadSettings()
             self._settings = self._loadSettings()
-        
+
     def _writeSettings(self):
     def _writeSettings(self):
         """Save settings into the file
         """Save settings into the file
 
 
@@ -1217,14 +1234,14 @@ class ManageSettingsWidget(wx.Panel):
                    message = _("Unable to save settings"))
                    message = _("Unable to save settings"))
             return -1
             return -1
         fd.close()
         fd.close()
-        
+
         return 0
         return 0
 
 
     def _loadSettings(self):
     def _loadSettings(self):
         """Load settings from the file
         """Load settings from the file
 
 
         The file is defined by self.SettingsFile.
         The file is defined by self.SettingsFile.
-        
+
         :return: parsed dict
         :return: parsed dict
         :return: empty dict on error
         :return: empty dict on error
         """
         """
@@ -1260,12 +1277,12 @@ class ManageSettingsWidget(wx.Panel):
         """Load settings from the file in format version 2.0
         """Load settings from the file in format version 2.0
 
 
         The file is defined by self.SettingsFile.
         The file is defined by self.SettingsFile.
-        
+
         :return: parsed dict
         :return: parsed dict
         :return: empty dict on error
         :return: empty dict on error
         """
         """
         data = dict()
         data = dict()
-        
+
         for line in fd_lines[1:]:
         for line in fd_lines[1:]:
             try:
             try:
                 lineData = []
                 lineData = []
@@ -1285,7 +1302,7 @@ class ManageSettingsWidget(wx.Panel):
                         while True:
                         while True:
                             if line[idx - (i_esc_chars + 1)] == self.esc_chars[self.e_char_i]:
                             if line[idx - (i_esc_chars + 1)] == self.esc_chars[self.e_char_i]:
                                 i_esc_chars += 1
                                 i_esc_chars += 1
-                            else: 
+                            else:
                                 break
                                 break
                         if i_esc_chars%2 != 0:
                         if i_esc_chars%2 != 0:
                             i_last = idx + 1
                             i_last = idx + 1
@@ -1311,12 +1328,12 @@ class ManageSettingsWidget(wx.Panel):
         """Load settings from the file in format version 1.0 (backward compatibility)
         """Load settings from the file in format version 1.0 (backward compatibility)
 
 
         The file is defined by self.SettingsFile.
         The file is defined by self.SettingsFile.
-        
+
         :return: parsed dict
         :return: parsed dict
         :return: empty dict on error
         :return: empty dict on error
         """
         """
         data = dict()
         data = dict()
-      
+
         for line in fd_lines:
         for line in fd_lines:
             try:
             try:
                 lineData = line.rstrip('\n').split(';')
                 lineData = line.rstrip('\n').split(';')
@@ -1327,17 +1344,17 @@ class ManageSettingsWidget(wx.Panel):
                     data[lineData[0]] = (lineData[1], lineData[2], lineData[3], '')
                     data[lineData[0]] = (lineData[1], lineData[2], lineData[3], '')
             except ValueError:
             except ValueError:
                 pass
                 pass
-        
+
         return data
         return data
 
 
 class PictureComboBox(wx.combo.OwnerDrawnComboBox):
 class PictureComboBox(wx.combo.OwnerDrawnComboBox):
     """Abstract class of ComboBox with pictures.
     """Abstract class of ComboBox with pictures.
-    
+
         Derived class has to specify has to specify _getPath method.
         Derived class has to specify has to specify _getPath method.
     """
     """
     def OnDrawItem(self, dc, rect, item, flags):
     def OnDrawItem(self, dc, rect, item, flags):
         """Overridden from OwnerDrawnComboBox.
         """Overridden from OwnerDrawnComboBox.
-        
+
         Called to draw each item in the list.
         Called to draw each item in the list.
         """
         """
         if item == wx.NOT_FOUND:
         if item == wx.NOT_FOUND:
@@ -1367,8 +1384,8 @@ class PictureComboBox(wx.combo.OwnerDrawnComboBox):
 
 
     def GetPictureBitmap(self, name):
     def GetPictureBitmap(self, name):
         """Returns bitmap for given picture name.
         """Returns bitmap for given picture name.
-        
-        :param str colorTable: name of color table        
+
+        :param str colorTable: name of color table
         """
         """
         if not hasattr(self, 'bitmaps'):
         if not hasattr(self, 'bitmaps'):
             self.bitmaps = {}
             self.bitmaps = {}

+ 13 - 7
gui/wxpython/lmgr/giface.py

@@ -24,8 +24,10 @@ from core.giface import Notification
 class Layer(object):
 class Layer(object):
     """@implements core::giface::Layer
     """@implements core::giface::Layer
 
 
-    .. note:: Currently implemented without specifying the interface.
-    It only provides all attributes of existing layer as used in lmgr.
+    .. note::
+
+        Currently implemented without specifying the interface.
+        It only provides all attributes of existing layer as used in lmgr.
     """
     """
     def __init__(self, pydata):
     def __init__(self, pydata):
         self._pydata = pydata
         self._pydata = pydata
@@ -150,15 +152,18 @@ class LayerManagerGrassInterface(object):
         cmdlist = ['g.manual', 'entry=%s' % entry]
         cmdlist = ['g.manual', 'entry=%s' % entry]
         if online:
         if online:
             cmdlist.append('-o')
             cmdlist.append('-o')
-        self.RunCmd(cmdlist, compReg = False, notification=Notification.NO_NOTIFICATION)
+        self.RunCmd(cmdlist, compReg=False,
+                    notification=Notification.NO_NOTIFICATION)
 
 
-    def WriteLog(self, text, wrap = None,
+    def WriteLog(self, text, wrap=None,
                  notification=Notification.HIGHLIGHT):
                  notification=Notification.HIGHLIGHT):
-        self.lmgr._gconsole.WriteLog(text=text, wrap=wrap, 
+        self.lmgr._gconsole.WriteLog(text=text, wrap=wrap,
                                      notification=notification)
                                      notification=notification)
 
 
-    def WriteCmdLog(self, text, pid=None, notification=Notification.MAKE_VISIBLE):
-        self.lmgr._gconsole.WriteCmdLog(text=text, pid=pid, notification=notification)
+    def WriteCmdLog(self, text, pid=None,
+                    notification=Notification.MAKE_VISIBLE):
+        self.lmgr._gconsole.WriteCmdLog(text=text, pid=pid,
+                                        notification=notification)
 
 
     def WriteWarning(self, text):
     def WriteWarning(self, text):
         self.lmgr._gconsole.WriteWarning(text=text)
         self.lmgr._gconsole.WriteWarning(text=text)
@@ -190,6 +195,7 @@ class LayerManagerGrassInterface(object):
     def UpdateCmdHistory(self, cmd):
     def UpdateCmdHistory(self, cmd):
         self.lmgr.goutput.GetPrompt().UpdateCmdHistory(cmd)
         self.lmgr.goutput.GetPrompt().UpdateCmdHistory(cmd)
 
 
+
 class LayerManagerGrassInterfaceForMapDisplay(object):
 class LayerManagerGrassInterfaceForMapDisplay(object):
     """Provides reference only to the given layer list (according to tree),
     """Provides reference only to the given layer list (according to tree),
         not to the current.
         not to the current.

+ 5 - 6
gui/wxpython/mapdisp/frame.py

@@ -30,7 +30,6 @@ from core import globalvar
 import wx
 import wx
 import wx.aui
 import wx.aui
 
 
-from core               import globalvar
 from core.render        import Map
 from core.render        import Map
 from vdigit.toolbars    import VDigitToolbar
 from vdigit.toolbars    import VDigitToolbar
 from mapdisp.toolbars   import MapToolbar, NvizIcons
 from mapdisp.toolbars   import MapToolbar, NvizIcons
@@ -1307,7 +1306,7 @@ class MapFrame(SingleMapFrame):
     def IsStandalone(self):
     def IsStandalone(self):
         """Check if Map display is standalone
         """Check if Map display is standalone
 
 
-        .. deprecated::
+        .. deprecated:: 7.0
         """
         """
         # TODO: once it is removed from 2 places in vdigit it can be deleted
         # TODO: once it is removed from 2 places in vdigit it can be deleted
         # here and also in base class and other classes in the tree (hopefully)
         # here and also in base class and other classes in the tree (hopefully)
@@ -1317,22 +1316,22 @@ class MapFrame(SingleMapFrame):
                   " Signals or giface")
                   " Signals or giface")
         if self._layerManager:
         if self._layerManager:
             return False
             return False
-        
+
         return True
         return True
-    
+
     def GetLayerManager(self):
     def GetLayerManager(self):
         """Get reference to Layer Manager
         """Get reference to Layer Manager
 
 
         :return: window reference
         :return: window reference
         :return: None (if standalone)
         :return: None (if standalone)
 
 
-        .. deprecated::
+        .. deprecated:: 7.0
         """
         """
         Debug.msg(1, "MapFrame.GetLayerManager(): Method GetLayerManager is"
         Debug.msg(1, "MapFrame.GetLayerManager(): Method GetLayerManager is"
                   "depreciated, use some general approach instead such as"
                   "depreciated, use some general approach instead such as"
                   " Signals or giface")
                   " Signals or giface")
         return self._layerManager
         return self._layerManager
-    
+
     def GetMapToolbar(self):
     def GetMapToolbar(self):
         """Returns toolbar with zooming tools"""
         """Returns toolbar with zooming tools"""
         return self.toolbars['map']
         return self.toolbars['map']

+ 38 - 36
gui/wxpython/mapwin/base.py

@@ -52,6 +52,7 @@ class MapWindowProperties(object):
         self._alignExtent = UserSettings.Get(group='display',
         self._alignExtent = UserSettings.Get(group='display',
                                              key='alignExtent',
                                              key='alignExtent',
                                              subkey='enabled')
                                              subkey='enabled')
+
     @property
     @property
     def resolution(self):
     def resolution(self):
         return self._resolution
         return self._resolution
@@ -95,10 +96,10 @@ class MapWindowProperties(object):
 
 
 class MapWindowBase(object):
 class MapWindowBase(object):
     """Abstract map display window class
     """Abstract map display window class
-    
+
     Superclass for BufferedWindow class (2D display mode), and GLWindow
     Superclass for BufferedWindow class (2D display mode), and GLWindow
     (3D display mode).
     (3D display mode).
-    
+
     Subclasses have to define
     Subclasses have to define
      - _bindMouseEvents method which binds MouseEvent handlers
      - _bindMouseEvents method which binds MouseEvent handlers
      - Pixel2Cell
      - Pixel2Cell
@@ -127,8 +128,8 @@ class MapWindowBase(object):
             'box'  : "point"
             'box'  : "point"
             }
             }
         # last east, north coordinates, changes on mouse motion
         # last east, north coordinates, changes on mouse motion
-        self.lastEN = None 
-        
+        self.lastEN = None
+
         # stores overridden cursor
         # stores overridden cursor
         self._overriddenCursor = None
         self._overriddenCursor = None
 
 
@@ -177,10 +178,10 @@ class MapWindowBase(object):
         """
         """
         for ev, handlers in self.handlersContainer.iteritems():
         for ev, handlers in self.handlersContainer.iteritems():
             self.Bind(ev, self.EventTypeHandler(handlers))
             self.Bind(ev, self.EventTypeHandler(handlers))
-    
+
     def EventTypeHandler(self, evHandlers):
     def EventTypeHandler(self, evHandlers):
-        return lambda event:self.HandlersCaller(event, evHandlers)  
-    
+        return lambda event : self.HandlersCaller(event, evHandlers)
+
     def HandlersCaller(self, event, handlers):
     def HandlersCaller(self, event, handlers):
         """Hepler function which calls all handlers registered for
         """Hepler function which calls all handlers registered for
         event
         event
@@ -190,53 +191,54 @@ class MapWindowBase(object):
                 handler(event)
                 handler(event)
             except:
             except:
                 handlers.remove(handler)
                 handlers.remove(handler)
-                GError(parent = self,
+                GError(parent=self,
                        message=_("Error occured during calling of handler: %s \n"
                        message=_("Error occured during calling of handler: %s \n"
                                  "Handler was unregistered.") % handler.__name__)
                                  "Handler was unregistered.") % handler.__name__)
-        
+
         event.Skip() 
         event.Skip() 
 
 
-    def RegisterMouseEventHandler(self, event, handler, cursor = None):
+    def RegisterMouseEventHandler(self, event, handler, cursor=None):
         """Binds event handler
         """Binds event handler
 
 
-        @depreciated This method is depreciated. Use Signals or drawing API instead.
-        Signals do not cover all events but new Signals can be added when needed
-        consider also adding generic signal. However, more interesing and useful
-        is higher level API to create objects, graphics etc.
+        @depreciated This method is depreciated. Use Signals or drawing API
+        instead. Signals do not cover all events but new Signals can be added
+        when needed consider also adding generic signal. However, more
+        interesing and useful is higher level API to create objects, graphics etc.
 
 
         Call event.Skip() in handler to allow default processing in MapWindow.
         Call event.Skip() in handler to allow default processing in MapWindow.
 
 
         If any error occures inside of handler, the handler is removed.
         If any error occures inside of handler, the handler is removed.
 
 
-        Before handler is unregistered it is called with 
+        Before handler is unregistered it is called with
         string value "unregistered" of event parameter.
         string value "unregistered" of event parameter.
 
 
-        @code
-        # your class methods
-        def OnButton(self, event):
-            # current map display's map window
-            # expects LayerManager to be the parent
-            self.mapwin = self.parent.GetLayerTree().GetMapDisplay().GetWindow()
-            if self.mapwin.RegisterEventHandler(wx.EVT_LEFT_DOWN, self.OnMouseAction,
-                                                'cross'):
-                self.parent.GetLayerTree().GetMapDisplay().Raise()
-            else:
-                # handle that you cannot get coordinates
-        
-        def OnMouseAction(self, event):
-            # get real world coordinates of mouse click
-            coor = self.mapwin.Pixel2Cell(event.GetPositionTuple()[:])
-            self.text.SetLabel('Coor: ' + str(coor))
-            self.mapwin.UnregisterMouseEventHandler(wx.EVT_LEFT_DOWN, self.OnMouseAction)
-            event.Skip()
-        @endcode
+        ::
 
 
-        Emits mouseHandlerRegistered signal before handler is registered.        
+            # your class methods
+            def OnButton(self, event):
+                # current map display's map window
+                # expects LayerManager to be the parent
+                self.mapwin = self.parent.GetLayerTree().GetMapDisplay().GetWindow()
+                if self.mapwin.RegisterEventHandler(wx.EVT_LEFT_DOWN, self.OnMouseAction,
+                                                    'cross'):
+                    self.parent.GetLayerTree().GetMapDisplay().Raise()
+                else:
+                    # handle that you cannot get coordinates
+
+            def OnMouseAction(self, event):
+                # get real world coordinates of mouse click
+                coor = self.mapwin.Pixel2Cell(event.GetPositionTuple()[:])
+                self.text.SetLabel('Coor: ' + str(coor))
+                self.mapwin.UnregisterMouseEventHandler(wx.EVT_LEFT_DOWN, self.OnMouseAction)
+                event.Skip()
+
+
+        Emits mouseHandlerRegistered signal before handler is registered.
 
 
         :param event: one of mouse events
         :param event: one of mouse events
         :param handler: function to handle event
         :param handler: function to handle event
         :param cursor: cursor which temporary overrides current cursor
         :param cursor: cursor which temporary overrides current cursor
-        
+
         :return: True if successful
         :return: True if successful
         :return: False if event cannot be bind
         :return: False if event cannot be bind
         """
         """

文件差異過大導致無法顯示
+ 268 - 268
gui/wxpython/mapwin/buffered.py


+ 19 - 12
gui/wxpython/mapwin/graphics.py

@@ -102,10 +102,12 @@ class GraphicsSet:
                 if label is None:
                 if label is None:
                     self.properties["text"] = None
                     self.properties["text"] = None
                 else:
                 else:
-                    self.properties["text"]['coords'] = [coords[0] + size, coords[1] + size, size, size]
+                    self.properties["text"]['coords'] = [coords[0] + size,
+                                                         coords[1] + size,
+                                                         size, size]
                     self.properties["text"]['color'] = self.parentMapWin.pen.GetColour()
                     self.properties["text"]['color'] = self.parentMapWin.pen.GetColour()
                     self.properties["text"]['text'] = label
                     self.properties["text"]['text'] = label
-                    
+
                 self.drawFunc(pdc=pdc, drawid=item.GetId(),
                 self.drawFunc(pdc=pdc, drawid=item.GetId(),
                               coords=coords,
                               coords=coords,
                               text=self.properties["text"],
                               text=self.properties["text"],
@@ -124,7 +126,7 @@ class GraphicsSet:
 
 
                 self.drawFunc(pdc=pdc, pen=pen,
                 self.drawFunc(pdc=pdc, pen=pen,
                               coords=coords, drawid=item.GetId())
                               coords=coords, drawid=item.GetId())
-             
+
             elif self.graphicsType == "rectangle":
             elif self.graphicsType == "rectangle":
                 if item.GetPropertyVal("penName"):
                 if item.GetPropertyVal("penName"):
                     pen = self.pens[item.GetPropertyVal("penName")]
                     pen = self.pens[item.GetPropertyVal("penName")]
@@ -149,7 +151,7 @@ class GraphicsSet:
                 else:
                 else:
                     coords = item.GetCoords()
                     coords = item.GetCoords()
 
 
-                self.drawFunc(pdc=pdc, pen=pen, 
+                self.drawFunc(pdc=pdc, pen=pen,
                               coords=coords, drawid=item.GetId())
                               coords=coords, drawid=item.GetId())
             itemOrderNum += 1
             itemOrderNum += 1
 
 
@@ -159,10 +161,12 @@ class GraphicsSet:
         Added item is put to the last place in drawing order.
         Added item is put to the last place in drawing order.
         Could be 'point' or 'line' according to graphicsType.
         Could be 'point' or 'line' according to graphicsType.
 
 
-        :param coords: - list of east, north coordinates (double) of item
-                        Example: point: [1023, 122]
-                                 line: [[10, 12],[20,40],[23, 2334]]
-                                 rectangle: [[10, 12], [33, 45]]
+        :param coords: list of east, north coordinates (double) of item.
+                       Example:
+
+                           * point: [1023, 122]
+                           * line: [[10, 12],[20,40],[23, 2334]]
+                           * rectangle: [[10, 12], [33, 45]]
         :param penName: the 'default' pen is used if is not defined
         :param penName: the 'default' pen is used if is not defined
         :type penName: str
         :type penName: str
         :param label: label, which will be drawn with point. It is
         :param label: label, which will be drawn with point. It is
@@ -174,7 +178,8 @@ class GraphicsSet:
         :type hide: bool
         :type hide: bool
         :return: (GraphicsSetItem) - added item reference
         :return: (GraphicsSetItem) - added item reference
         """
         """
-        item = GraphicsSetItem(coords=coords, penName=penName, label=label, hide=hide)
+        item = GraphicsSetItem(coords=coords, penName=penName, label=label,
+                               hide=hide)
         self.itemsList.append(item)
         self.itemsList.append(item)
 
 
         return item
         return item
@@ -385,9 +390,11 @@ class GraphicsSetItem:
         """Set coordinates of item
         """Set coordinates of item
 
 
         :param coords: list of east, north coordinates (double) of item
         :param coords: list of east, north coordinates (double) of item
-                       Example: point: [1023, 122]
-                                line: [[10, 12],[20,40],[23, 2334]]
-                                rectangle: [[10, 12], [33, 45]]
+                       Example:
+
+                           * point: [1023, 122]
+                           * line: [[10, 12],[20,40],[23, 2334]]
+                           * rectangle: [[10, 12], [33, 45]]
         """
         """
         self.coords = coords
         self.coords = coords
 
 

+ 62 - 52
gui/wxpython/nviz/workspace.py

@@ -20,14 +20,15 @@ from core.settings import UserSettings
 from core.utils import _
 from core.utils import _
 
 
 try:
 try:
-    from nviz      import wxnviz
+    from nviz import wxnviz
 except ImportError:
 except ImportError:
     wxnviz = None
     wxnviz = None
 
 
+
 class NvizSettings(object):
 class NvizSettings(object):
     def __init__(self):
     def __init__(self):
         pass
         pass
-        
+
     def SetConstantDefaultProp(self):
     def SetConstantDefaultProp(self):
         """Set default constant data properties"""
         """Set default constant data properties"""
         data = dict()
         data = dict()
@@ -37,14 +38,14 @@ class NvizSettings(object):
         data['color'] = color
         data['color'] = color
 
 
         return data
         return data
-    
-    def SetSurfaceDefaultProp(self, data = None):
+
+    def SetSurfaceDefaultProp(self, data=None):
         """Set default surface data properties"""
         """Set default surface data properties"""
         if not data:
         if not data:
             data = dict()
             data = dict()
         for sec in ('attribute', 'draw', 'mask', 'position'):
         for sec in ('attribute', 'draw', 'mask', 'position'):
             data[sec] = {}
             data[sec] = {}
-        
+
         #
         #
         # attributes
         # attributes
         #
         #
@@ -54,12 +55,13 @@ class NvizSettings(object):
                                                subkey=attrb).iteritems():
                                                subkey=attrb).iteritems():
                 data['attribute'][attrb][key] = value
                 data['attribute'][attrb][key] = value
             data['attribute'][attrb]['update'] = None
             data['attribute'][attrb]['update'] = None
-        
+
         #
         #
         # draw
         # draw
         #
         #
         data['draw']['all'] = False # apply only for current surface
         data['draw']['all'] = False # apply only for current surface
-        for control, value in UserSettings.Get(group='nviz', key='surface', subkey='draw').iteritems():
+        for control, value in UserSettings.Get(group='nviz', key='surface',
+                                               subkey='draw').iteritems():
             if control[:3] == 'res':
             if control[:3] == 'res':
                 if 'resolution' not in data['draw']:
                 if 'resolution' not in data['draw']:
                     data['draw']['resolution'] = {}
                     data['draw']['resolution'] = {}
@@ -67,7 +69,7 @@ class NvizSettings(object):
                     data['draw']['resolution']['update'] = None
                     data['draw']['resolution']['update'] = None
                 data['draw']['resolution'][control[4:]] = value
                 data['draw']['resolution'][control[4:]] = value
                 continue
                 continue
-            
+
             if control == 'wire-color':
             if control == 'wire-color':
                 value = str(value[0]) + ':' + str(value[1]) + ':' + str(value[2])
                 value = str(value[0]) + ':' + str(value[1]) + ':' + str(value[2])
             elif control in ('mode', 'style', 'shading'):
             elif control in ('mode', 'style', 'shading'):
@@ -77,21 +79,21 @@ class NvizSettings(object):
 
 
             data['draw'][control] = { 'value' : value }
             data['draw'][control] = { 'value' : value }
             data['draw'][control]['update'] = None
             data['draw'][control]['update'] = None
-        
+
         value, desc = self.GetDrawMode(UserSettings.Get(group='nviz', key='surface', subkey=['draw', 'mode']),
         value, desc = self.GetDrawMode(UserSettings.Get(group='nviz', key='surface', subkey=['draw', 'mode']),
                                        UserSettings.Get(group='nviz', key='surface', subkey=['draw', 'style']),
                                        UserSettings.Get(group='nviz', key='surface', subkey=['draw', 'style']),
                                        UserSettings.Get(group='nviz', key='surface', subkey=['draw', 'shading']))
                                        UserSettings.Get(group='nviz', key='surface', subkey=['draw', 'shading']))
-    
+
         data['draw']['mode'] = { 'value' : value,
         data['draw']['mode'] = { 'value' : value,
-                                 'desc' : desc, 
+                                 'desc' : desc,
                                  'update': None }
                                  'update': None }
         # position
         # position
         for coord in ('x', 'y', 'z'):
         for coord in ('x', 'y', 'z'):
             data['position'][coord] = UserSettings.Get(group='nviz', key='surface', subkey=['position', coord])
             data['position'][coord] = UserSettings.Get(group='nviz', key='surface', subkey=['position', coord])
         data['position']['update'] = None
         data['position']['update'] = None
-            
+
         return data
         return data
-    
+
     def SetVolumeDefaultProp(self):
     def SetVolumeDefaultProp(self):
         """Set default volume data properties"""
         """Set default volume data properties"""
         data = dict()
         data = dict()
@@ -99,7 +101,7 @@ class NvizSettings(object):
             data[sec] = dict()
             data[sec] = dict()
             for sec in ('isosurface', 'slice'):
             for sec in ('isosurface', 'slice'):
                     data[sec] = list()
                     data[sec] = list()
-        
+
         #
         #
         # draw
         # draw
         #
         #
@@ -107,7 +109,7 @@ class NvizSettings(object):
             if control == 'shading':
             if control == 'shading':
                 sel = UserSettings.Get(group='nviz', key='volume', subkey=['draw', 'shading'])
                 sel = UserSettings.Get(group='nviz', key='volume', subkey=['draw', 'shading'])
                 value, desc = self.GetDrawMode(shade=sel, string=False)
                 value, desc = self.GetDrawMode(shade=sel, string=False)
-                
+
                 data['draw']['shading'] = {}
                 data['draw']['shading'] = {}
                 data['draw']['shading']['isosurface'] = { 'value' : value,
                 data['draw']['shading']['isosurface'] = { 'value' : value,
                                                           'desc' : desc['shading'] }
                                                           'desc' : desc['shading'] }
@@ -132,7 +134,7 @@ class NvizSettings(object):
 
 
             if 'update' not in data['draw'][control]:
             if 'update' not in data['draw'][control]:
                 data['draw'][control]['update'] = None
                 data['draw'][control]['update'] = None
-        
+
         #
         #
         # isosurface attributes
         # isosurface attributes
         #
         #
@@ -141,9 +143,9 @@ class NvizSettings(object):
             for key, value in UserSettings.Get(group='nviz', key='volume',
             for key, value in UserSettings.Get(group='nviz', key='volume',
                                                subkey=attrb).iteritems():
                                                subkey=attrb).iteritems():
                 data['attribute'][attrb][key] = value
                 data['attribute'][attrb][key] = value
-        
+
         return data
         return data
-    
+
     def SetIsosurfaceDefaultProp(self):
     def SetIsosurfaceDefaultProp(self):
         """Set default isosurface properties"""
         """Set default isosurface properties"""
         data = dict()
         data = dict()
@@ -152,59 +154,59 @@ class NvizSettings(object):
             data[attr]['update'] = None
             data[attr]['update'] = None
             if attr == 'inout':
             if attr == 'inout':
                 data[attr]['value'] = 0
                 data[attr]['value'] = 0
-                continue                
+                continue
             for key, value in UserSettings.Get(group = 'nviz', key = 'volume',
             for key, value in UserSettings.Get(group = 'nviz', key = 'volume',
                                                subkey = attr).iteritems():
                                                subkey = attr).iteritems():
                 data[attr][key] = value
                 data[attr][key] = value
         return data
         return data
-    
+
     def SetSliceDefaultProp(self):
     def SetSliceDefaultProp(self):
         """Set default slice properties"""
         """Set default slice properties"""
         data = dict()
         data = dict()
-        data['position'] = copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'volume',
+        data['position'] = copy.deepcopy(UserSettings.Get(group='nviz', key='volume',
                                                subkey = 'slice_position'))
                                                subkey = 'slice_position'))
         data['position']['update'] = None
         data['position']['update'] = None
-        
-        data['transp'] = copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'volume',
-                                               subkey = 'transp'))
+
+        data['transp'] = copy.deepcopy(UserSettings.Get(group='nviz', key='volume',
+                                                        subkey='transp'))
         return data
         return data
-    
-    def SetVectorDefaultProp(self, data = None):
+
+    def SetVectorDefaultProp(self, data=None):
         """Set default vector data properties"""
         """Set default vector data properties"""
         if not data:
         if not data:
             data = dict()
             data = dict()
         for sec in ('lines', 'points'):
         for sec in ('lines', 'points'):
             data[sec] = {}
             data[sec] = {}
-        
+
         self.SetVectorLinesDefaultProp(data['lines'])
         self.SetVectorLinesDefaultProp(data['lines'])
         self.SetVectorPointsDefaultProp(data['points'])
         self.SetVectorPointsDefaultProp(data['points'])
 
 
         return data
         return data
-    
+
     def SetVectorLinesDefaultProp(self, data):
     def SetVectorLinesDefaultProp(self, data):
         """Set default vector properties -- lines"""
         """Set default vector properties -- lines"""
         # width
         # width
-        data['width'] = {'value' : UserSettings.Get(group='nviz', key='vector',
-                                                    subkey=['lines', 'width']) }
-        
+        data['width'] = {'value': UserSettings.Get(group='nviz', key='vector',
+                                                   subkey=['lines', 'width'])}
+
         # color
         # color
         value = UserSettings.Get(group='nviz', key='vector',
         value = UserSettings.Get(group='nviz', key='vector',
                                  subkey=['lines', 'color'])
                                  subkey=['lines', 'color'])
         color = str(value[0]) + ':' + str(value[1]) + ':' + str(value[2])
         color = str(value[0]) + ':' + str(value[1]) + ':' + str(value[2])
-        data['color'] = { 'value' : color }
+        data['color'] = {'value': color}
 
 
         # mode
         # mode
         if UserSettings.Get(group='nviz', key='vector',
         if UserSettings.Get(group='nviz', key='vector',
                             subkey=['lines', 'flat']):
                             subkey=['lines', 'flat']):
             type = 'flat'
             type = 'flat'
-            
+
         else:
         else:
             type = 'surface'
             type = 'surface'
-            
+
         data['mode'] = {}
         data['mode'] = {}
         data['mode']['type'] = type
         data['mode']['type'] = type
         data['mode']['update'] = None
         data['mode']['update'] = None
-    
+
         # height
         # height
         data['height'] = { 'value' : UserSettings.Get(group='nviz', key='vector',
         data['height'] = { 'value' : UserSettings.Get(group='nviz', key='vector',
                                                       subkey=['lines', 'height']) }
                                                       subkey=['lines', 'height']) }
@@ -219,7 +221,7 @@ class NvizSettings(object):
         if 'object' in data:
         if 'object' in data:
             for attrb in ('color', 'width', 'mode', 'height', 'thematic'):
             for attrb in ('color', 'width', 'mode', 'height', 'thematic'):
                 data[attrb]['update'] = None
                 data[attrb]['update'] = None
-        
+
     def SetVectorPointsDefaultProp(self, data):
     def SetVectorPointsDefaultProp(self, data):
         """Set default vector properties -- points"""
         """Set default vector properties -- points"""
         # size
         # size
@@ -243,11 +245,11 @@ class NvizSettings(object):
         # mode
         # mode
         data['mode'] = { 'type' : 'surface'}
         data['mode'] = { 'type' : 'surface'}
 ##                         'surface' : '', }
 ##                         'surface' : '', }
-        
+
         # height
         # height
         data['height'] = { 'value' : UserSettings.Get(group='nviz', key='vector',
         data['height'] = { 'value' : UserSettings.Get(group='nviz', key='vector',
                                                       subkey=['points', 'height']) }
                                                       subkey=['points', 'height']) }
-        
+
         data['thematic'] = {'rgbcolumn' : UserSettings.Get(group='nviz', key='vector',
         data['thematic'] = {'rgbcolumn' : UserSettings.Get(group='nviz', key='vector',
                                                       subkey=['points', 'rgbcolumn']),
                                                       subkey=['points', 'rgbcolumn']),
                             'sizecolumn' : UserSettings.Get(group='nviz', key='vector',
                             'sizecolumn' : UserSettings.Get(group='nviz', key='vector',
@@ -259,7 +261,7 @@ class NvizSettings(object):
             for attrb in ('size', 'width', 'marker',
             for attrb in ('size', 'width', 'marker',
                           'color', 'height', 'thematic'):
                           'color', 'height', 'thematic'):
                 data[attrb]['update'] = None
                 data[attrb]['update'] = None
-        
+
     def GetDrawMode(self, mode=None, style=None, shade=None, string=False):
     def GetDrawMode(self, mode=None, style=None, shade=None, string=False):
         """Get surface draw mode (value) from description/selection
         """Get surface draw mode (value) from description/selection
 
 
@@ -267,11 +269,11 @@ class NvizSettings(object):
         :param style:
         :param style:
         :param shade:
         :param shade:
         :param string: if True input parameters are strings otherwise
         :param string: if True input parameters are strings otherwise
-        selections
+                       selections
         """
         """
         if not wxnviz:
         if not wxnviz:
             return None
             return None
-        
+
         value = 0
         value = 0
         desc = {}
         desc = {}
 
 
@@ -289,7 +291,7 @@ class NvizSettings(object):
                     value |= wxnviz.DM_GRID_WIRE
                     value |= wxnviz.DM_GRID_WIRE
                 else: # surface
                 else: # surface
                     value |= wxnviz.DM_GRID_SURF
                     value |= wxnviz.DM_GRID_SURF
-                    
+
             if shade is not None:
             if shade is not None:
                 if shade == 'flat':
                 if shade == 'flat':
                     value |= wxnviz.DM_FLAT
                     value |= wxnviz.DM_FLAT
@@ -325,27 +327,35 @@ class NvizSettings(object):
             else: # surface
             else: # surface
                 value |= wxnviz.DM_GOURAUD
                 value |= wxnviz.DM_GOURAUD
                 desc['shading'] = 'gouraud'
                 desc['shading'] = 'gouraud'
-        
+
         return (value, desc)
         return (value, desc)
-    
+
     def SetDecorDefaultProp(self, type):
     def SetDecorDefaultProp(self, type):
         """Set default arrow properties
         """Set default arrow properties
         """
         """
         data = {}
         data = {}
-        
+
         # arrow
         # arrow
         if type == 'arrow':
         if type == 'arrow':
-            data['arrow'] = copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'arrow'))
+            data['arrow'] = copy.deepcopy(UserSettings.Get(group='nviz',
+                                                           key='arrow'))
             data['arrow']['color'] = "%d:%d:%d" % (
             data['arrow']['color'] = "%d:%d:%d" % (
-                UserSettings.Get(group = 'nviz', key = 'arrow', subkey = 'color')[:3])
-            data['arrow'].update(copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'arrow', internal = True)))
+                UserSettings.Get(group='nviz', key='arrow',
+                                 subkey='color')[:3])
+            data['arrow'].update(copy.deepcopy(UserSettings.Get(group='nviz',
+                                                                key='arrow',
+                                                                internal=True)))
             data['arrow']['show'] = False
             data['arrow']['show'] = False
-        
+
         # arrow
         # arrow
         if type == 'scalebar':
         if type == 'scalebar':
-            data['scalebar'] = copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'scalebar'))
+            data['scalebar'] = copy.deepcopy(UserSettings.Get(group='nviz',
+                                                              key='scalebar'))
             data['scalebar']['color'] = "%d:%d:%d" % (
             data['scalebar']['color'] = "%d:%d:%d" % (
-                UserSettings.Get(group = 'nviz', key = 'scalebar', subkey = 'color')[:3])
-            data['scalebar'].update(copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'scalebar', internal = True)))
+                UserSettings.Get(group='nviz', key='scalebar',
+                                 subkey='color')[:3])
+            data['scalebar'].update(copy.deepcopy(UserSettings.Get(group='nviz',
+                                                                   key='scalebar',
+                                                                   internal=True)))
             data['scalebar']['id'] = 0
             data['scalebar']['id'] = 0
         return data
         return data

+ 5 - 4
gui/wxpython/rlisetup/wizard.py

@@ -530,13 +530,14 @@ class FirstPage(TitledPage):
         """
         """
         next = wx.FindWindowById(wx.ID_FORWARD)
         next = wx.FindWindowById(wx.ID_FORWARD)
         next.Enable(self.CheckInput())
         next.Enable(self.CheckInput())
-        wx.CallAfter(wx.FindWindowById(wx.ID_FORWARD).Enable, self.CheckInput())
+        wx.CallAfter(wx.FindWindowById(wx.ID_FORWARD).Enable,
+                     self.CheckInput())
 
 
     def CheckInput(self):
     def CheckInput(self):
         """Check input fields.
         """Check input fields.
 
 
         :return: True if configuration file is given and raster xor vector map,
         :return: True if configuration file is given and raster xor vector map,
-        False otherwise
+                 False otherwise
         """
         """
         #R#return bool(self.conf_name and (bool(self.rast) != bool(self.vect)))
         #R#return bool(self.conf_name and (bool(self.rast) != bool(self.vect)))
         return bool(self.conf_name and bool(self.rast))
         return bool(self.conf_name and bool(self.rast))
@@ -1392,7 +1393,7 @@ class DrawSampleUnitsPage(TitledPage):
 
 
         gtype = self.parent.drawunits.drawtype
         gtype = self.parent.drawunits.drawtype
         self.mapPanel = RLiSetupMapPanel(self,
         self.mapPanel = RLiSetupMapPanel(self,
-                                         samplingType=self.parent.samplingareapage.samplingtype, 
+                                         samplingType=self.parent.samplingareapage.samplingtype,
                                          )
                                          )
         if gtype == 'circle':
         if gtype == 'circle':
             self.mapPanel.afterCircleDrawn.connect(self.SampleFrameChanged)
             self.mapPanel.afterCircleDrawn.connect(self.SampleFrameChanged)
@@ -1639,7 +1640,7 @@ class SummaryPage(TitledPage):
                        flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
                        flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
         self.sizer.Add(item=self.unitsmoretxt2, border=5, pos=(11, 1),
         self.sizer.Add(item=self.unitsmoretxt2, border=5, pos=(11, 1),
                        flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
                        flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL)
-        
+
 
 
     def OnEnterPage(self, event):
     def OnEnterPage(self, event):
         """Insert values into text controls for summary of location
         """Insert values into text controls for summary of location

+ 84 - 84
gui/wxpython/web_services/widgets.py

@@ -58,7 +58,7 @@ class WSPanel(wx.Panel):
     def __init__(self, parent, web_service, **kwargs):
     def __init__(self, parent, web_service, **kwargs):
         """Show data from capabilities file.
         """Show data from capabilities file.
 
 
-        Signal: capParsed - this signal is emitted when capabilities file is downloaded 
+        Signal: capParsed - this signal is emitted when capabilities file is downloaded
                             (after ConnectToServer method was called)
                             (after ConnectToServer method was called)
 
 
         :param parent:  parent widget
         :param parent:  parent widget
@@ -68,7 +68,7 @@ class WSPanel(wx.Panel):
 
 
         self.parent = parent
         self.parent = parent
         self.ws = web_service
         self.ws = web_service
-        
+
         self.capParsed = Signal('WSPanel.capParsed')
         self.capParsed = Signal('WSPanel.capParsed')
 
 
         # stores widgets, which represents parameters/flags of d.wms
         # stores widgets, which represents parameters/flags of d.wms
@@ -93,14 +93,14 @@ class WSPanel(wx.Panel):
         self.drv_info = WMSDriversInfo()
         self.drv_info = WMSDriversInfo()
         self.drv_props = self.drv_info.GetDrvProperties(self.ws)
         self.drv_props = self.drv_info.GetDrvProperties(self.ws)
 
 
-        self.ws_drvs = {    
+        self.ws_drvs = {
                         'WMS_1.1.1' : {
                         'WMS_1.1.1' : {
-                                        'cmd' : ['wms_version=1.1.1', 
+                                        'cmd' : ['wms_version=1.1.1',
                                                  'driver=WMS_GRASS'],
                                                  'driver=WMS_GRASS'],
                                         'cap_parser' : lambda temp_file : WMSCapabilities(temp_file, '1.1.1'),
                                         'cap_parser' : lambda temp_file : WMSCapabilities(temp_file, '1.1.1'),
                                       },
                                       },
                         'WMS_1.3.0' : {
                         'WMS_1.3.0' : {
-                                        'cmd' : ['wms_version=1.3.0', 
+                                        'cmd' : ['wms_version=1.3.0',
                                                  'driver=WMS_GRASS'],
                                                  'driver=WMS_GRASS'],
                                         'cap_parser' : lambda temp_file : WMSCapabilities(temp_file, '1.3.0'),
                                         'cap_parser' : lambda temp_file : WMSCapabilities(temp_file, '1.3.0'),
                                       },
                                       },
@@ -144,41 +144,41 @@ class WSPanel(wx.Panel):
     def _requestPage(self):
     def _requestPage(self):
         """Create request page"""
         """Create request page"""
         self.req_page_panel = wx.Panel(parent = self, id = wx.ID_ANY)
         self.req_page_panel = wx.Panel(parent = self, id = wx.ID_ANY)
-        self.notebook.AddPage(page = self.req_page_panel, 
-                              text=_('Request'), 
+        self.notebook.AddPage(page = self.req_page_panel,
+                              text=_('Request'),
                               name = 'request')
                               name = 'request')
 
 
         # list of layers
         # list of layers
         self.layersBox = wx.StaticBox(parent = self.req_page_panel, id = wx.ID_ANY,
         self.layersBox = wx.StaticBox(parent = self.req_page_panel, id = wx.ID_ANY,
                                       label=_("List of layers "))
                                       label=_("List of layers "))
 
 
-        style = wx.TR_DEFAULT_STYLE | wx.TR_HAS_BUTTONS | wx.TR_FULL_ROW_HIGHLIGHT 
-        if self.drv_props['req_multiple_layers']: 
+        style = wx.TR_DEFAULT_STYLE | wx.TR_HAS_BUTTONS | wx.TR_FULL_ROW_HIGHLIGHT
+        if self.drv_props['req_multiple_layers']:
             style = style | wx.TR_MULTIPLE
             style = style | wx.TR_MULTIPLE
         if 'WMS' not in self.ws:
         if 'WMS' not in self.ws:
             style = style | wx.TR_HIDE_ROOT
             style = style | wx.TR_HIDE_ROOT
 
 
-        self.list = LayersList(parent = self.req_page_panel, 
-                               web_service = self.ws, 
+        self.list = LayersList(parent = self.req_page_panel,
+                               web_service = self.ws,
                                style = style)
                                style = style)
 
 
-        self.params['format'] = None 
+        self.params['format'] = None
 
 
         self.params['srs'] = None
         self.params['srs'] = None
         if 'srs' not in  self.drv_props['ignored_params']:
         if 'srs' not in  self.drv_props['ignored_params']:
             projText = wx.StaticText(parent = self.req_page_panel, id = wx.ID_ANY, label = _("Source projection:"))
             projText = wx.StaticText(parent = self.req_page_panel, id = wx.ID_ANY, label = _("Source projection:"))
             self.params['srs'] =  wx.Choice(parent = self.req_page_panel, id = wx.ID_ANY)
             self.params['srs'] =  wx.Choice(parent = self.req_page_panel, id = wx.ID_ANY)
-        
+
         self.list.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnListSelChanged)
         self.list.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnListSelChanged)
-        
+
         # layout
         # layout
         self.req_page_sizer = wx.BoxSizer(wx.VERTICAL)
         self.req_page_sizer = wx.BoxSizer(wx.VERTICAL)
-        
+
         layersSizer = wx.StaticBoxSizer(self.layersBox, wx.HORIZONTAL)
         layersSizer = wx.StaticBoxSizer(self.layersBox, wx.HORIZONTAL)
 
 
         layersSizer.Add(item = self.list, proportion = 1,
         layersSizer.Add(item = self.list, proportion = 1,
                         flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 5)
                         flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 5)
-        
+
         self.req_page_sizer.Add(item = layersSizer, proportion = 1,
         self.req_page_sizer.Add(item = layersSizer, proportion = 1,
                             flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 5)
                             flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 5)
 
 
@@ -187,17 +187,17 @@ class WSPanel(wx.Panel):
         if self.params['format'] is not None:
         if self.params['format'] is not None:
             self.source_sizer.Add(item = self.params['format'],
             self.source_sizer.Add(item = self.params['format'],
                                   flag = wx.LEFT | wx.RIGHT | wx.BOTTOM, border = 5)
                                   flag = wx.LEFT | wx.RIGHT | wx.BOTTOM, border = 5)
- 
+
         if self.params['srs'] is not None:
         if self.params['srs'] is not None:
             self.source_sizer.Add(item = projText, flag = wx.ALIGN_CENTER_VERTICAL | wx.ALL, border = 5)
             self.source_sizer.Add(item = projText, flag = wx.ALIGN_CENTER_VERTICAL | wx.ALL, border = 5)
             self.source_sizer.Add(item = self.params['srs'],
             self.source_sizer.Add(item = self.params['srs'],
                                   flag = wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.TOP | wx.BOTTOM, border = 5)
                                   flag = wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.TOP | wx.BOTTOM, border = 5)
-        
+
         self.req_page_sizer.Add(item = self.source_sizer,
         self.req_page_sizer.Add(item = self.source_sizer,
                                 flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 5)
                                 flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 5)
-        
+
         self.req_page_panel.SetSizer(self.req_page_sizer)
         self.req_page_panel.SetSizer(self.req_page_sizer)
-    
+
     def enableButtons(self, enable = True):
     def enableButtons(self, enable = True):
         """Enable/disable up, down, buttons
         """Enable/disable up, down, buttons
         """
         """
@@ -210,8 +210,8 @@ class WSPanel(wx.Panel):
         #TODO parse maxcol, maxrow, settings from d.wms module?
         #TODO parse maxcol, maxrow, settings from d.wms module?
         #TODO OnEarth driver - add selection of time
         #TODO OnEarth driver - add selection of time
         adv_setts_panel = wx.Panel(parent = self, id = wx.ID_ANY)
         adv_setts_panel = wx.Panel(parent = self, id = wx.ID_ANY)
-        self.notebook.AddPage(page = adv_setts_panel, 
-                              text=_('Advanced request settings'), 
+        self.notebook.AddPage(page = adv_setts_panel,
+                              text=_('Advanced request settings'),
                               name = 'adv_req_setts')
                               name = 'adv_req_setts')
 
 
         labels = {}
         labels = {}
@@ -219,7 +219,7 @@ class WSPanel(wx.Panel):
         if 'WMS' in self.ws:
         if 'WMS' in self.ws:
             labels['l_order'] = wx.StaticBox(parent = adv_setts_panel, id = wx.ID_ANY,
             labels['l_order'] = wx.StaticBox(parent = adv_setts_panel, id = wx.ID_ANY,
                                              label = _("Order of layers in raster"))
                                              label = _("Order of layers in raster"))
-            self.l_odrder_list = wx.ListBox(adv_setts_panel, id = wx.ID_ANY, choices = [], 
+            self.l_odrder_list = wx.ListBox(adv_setts_panel, id = wx.ID_ANY, choices = [],
                                                                 style = wx.LB_SINGLE|wx.LB_NEEDED_SB)
                                                                 style = wx.LB_SINGLE|wx.LB_NEEDED_SB)
             self.btnUp = wx.Button(adv_setts_panel, id = wx.ID_ANY, label = _("Up"))
             self.btnUp = wx.Button(adv_setts_panel, id = wx.ID_ANY, label = _("Up"))
             self.btnDown = wx.Button(adv_setts_panel, id = wx.ID_ANY, label = _("Down"))
             self.btnDown = wx.Button(adv_setts_panel, id = wx.ID_ANY, label = _("Down"))
@@ -274,35 +274,35 @@ class WSPanel(wx.Panel):
         # layout
         # layout
 
 
         border = wx.BoxSizer(wx.VERTICAL)
         border = wx.BoxSizer(wx.VERTICAL)
-       
+
         if 'WMS' in self.ws:
         if 'WMS' in self.ws:
 
 
             boxSizer = wx.StaticBoxSizer(labels['l_order'], wx.VERTICAL)
             boxSizer = wx.StaticBoxSizer(labels['l_order'], wx.VERTICAL)
             gridSizer  =  wx.GridBagSizer (hgap = 3, vgap = 3)
             gridSizer  =  wx.GridBagSizer (hgap = 3, vgap = 3)
 
 
-            gridSizer.Add(self.l_odrder_list, 
-                          pos = (0,0), 
-                          span = (4, 1), 
-                          flag = wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 
+            gridSizer.Add(self.l_odrder_list,
+                          pos = (0,0),
+                          span = (4, 1),
+                          flag = wx.ALIGN_CENTER_VERTICAL|wx.EXPAND,
                           border = 0)
                           border = 0)
-        
+
             gridSizer.Add(self.btnUp,
             gridSizer.Add(self.btnUp,
-                          pos = (0,1), 
-                          flag = wx.ALIGN_CENTER_VERTICAL, 
+                          pos = (0,1),
+                          flag = wx.ALIGN_CENTER_VERTICAL,
                           border = 0)
                           border = 0)
 
 
-            gridSizer.Add(self.btnDown, 
-                          pos = (1,1), 
+            gridSizer.Add(self.btnDown,
+                          pos = (1,1),
                           flag = wx.ALIGN_CENTER_VERTICAL,
                           flag = wx.ALIGN_CENTER_VERTICAL,
                           border = 0)
                           border = 0)
-        
+
             gridSizer.AddGrowableCol(0)
             gridSizer.AddGrowableCol(0)
             boxSizer.Add(gridSizer,
             boxSizer.Add(gridSizer,
                          flag = wx.EXPAND | wx.ALL,
                          flag = wx.EXPAND | wx.ALL,
                          border = 5)
                          border = 5)
 
 
             border.Add(item = boxSizer,
             border.Add(item = boxSizer,
-                       flag = wx.LEFT | wx.RIGHT | wx.UP | wx.EXPAND, 
+                       flag = wx.LEFT | wx.RIGHT | wx.UP | wx.EXPAND,
                        border = 5)
                        border = 5)
 
 
         gridSizer  =  wx.GridBagSizer (hgap = 3, vgap = 3)
         gridSizer  =  wx.GridBagSizer (hgap = 3, vgap = 3)
@@ -338,7 +338,7 @@ class WSPanel(wx.Panel):
 
 
         gridSizer.AddGrowableCol(0)
         gridSizer.AddGrowableCol(0)
         border.Add(item = gridSizer,
         border.Add(item = gridSizer,
-                   flag = wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 
+                   flag = wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND,
                    border = 5)
                    border = 5)
 
 
         if self.params['urlparams']:
         if self.params['urlparams']:
@@ -357,7 +357,7 @@ class WSPanel(wx.Panel):
                           pos = (row, 1))
                           pos = (row, 1))
 
 
             border.Add(item = gridSizer,
             border.Add(item = gridSizer,
-                       flag = wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 
+                       flag = wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND,
                        border = 5)
                        border = 5)
 
 
         adv_setts_panel.SetSizer(border)
         adv_setts_panel.SetSizer(border)
@@ -368,9 +368,9 @@ class WSPanel(wx.Panel):
         if self.l_odrder_list.GetSelections():
         if self.l_odrder_list.GetSelections():
             pos = self.l_odrder_list.GetSelection()
             pos = self.l_odrder_list.GetSelection()
             if pos:
             if pos:
-                self.sel_layers.insert(pos - 1, self.sel_layers.pop(pos))               
+                self.sel_layers.insert(pos - 1, self.sel_layers.pop(pos))
             if pos > 0:
             if pos > 0:
-                self._updateLayerOrderList(selected = (pos - 1)) 
+                self._updateLayerOrderList(selected = (pos - 1))
             else:
             else:
                 self._updateLayerOrderList(selected = 0)
                 self._updateLayerOrderList(selected = 0)
 
 
@@ -382,7 +382,7 @@ class WSPanel(wx.Panel):
             if pos != len(self.sel_layers) - 1:
             if pos != len(self.sel_layers) - 1:
                 self.sel_layers.insert(pos + 1, self.sel_layers.pop(pos))
                 self.sel_layers.insert(pos + 1, self.sel_layers.pop(pos))
             if pos < len(self.sel_layers) -1:
             if pos < len(self.sel_layers) -1:
-                self._updateLayerOrderList(selected = (pos + 1)) 
+                self._updateLayerOrderList(selected = (pos + 1))
             else:
             else:
                 self._updateLayerOrderList(selected = len(self.sel_layers) -1)
                 self._updateLayerOrderList(selected = len(self.sel_layers) -1)
 
 
@@ -409,8 +409,8 @@ class WSPanel(wx.Panel):
         else:
         else:
             self.enableButtons(True)
             self.enableButtons(True)
             if selected is not None:
             if selected is not None:
-                self.l_odrder_list.SetSelection(selected)  
-                self.l_odrder_list.EnsureVisible(selected)  
+                self.l_odrder_list.SetSelection(selected)
+                self.l_odrder_list.EnsureVisible(selected)
 
 
     def OnTransparent(self, event):
     def OnTransparent(self, event):
         checked = event.IsChecked()
         checked = event.IsChecked()
@@ -527,7 +527,7 @@ class WSPanel(wx.Panel):
 
 
     def UpdateWidgetsByCmd(self, cmd):
     def UpdateWidgetsByCmd(self, cmd):
         """Update panel widgets accordnig to passed cmd tuple
         """Update panel widgets accordnig to passed cmd tuple
-        
+
         :param cmd: cmd in tuple
         :param cmd: cmd in tuple
         """
         """
 
 
@@ -556,7 +556,7 @@ class WSPanel(wx.Panel):
         for i in range(len(layers)):
         for i in range(len(layers)):
             l_st_list.append({'style' : styles[i],
             l_st_list.append({'style' : styles[i],
                               'layer' : layers[i]})
                               'layer' : layers[i]})
-        
+
         # WMS standard - first layer in params is most bottom...
         # WMS standard - first layer in params is most bottom...
         # therefore layers order need to be reversed
         # therefore layers order need to be reversed
         l_st_list = [l for l in reversed(l_st_list)]
         l_st_list = [l for l in reversed(l_st_list)]
@@ -573,7 +573,7 @@ class WSPanel(wx.Panel):
         for p, v in params.iteritems():
         for p, v in params.iteritems():
             if self.params[p]:
             if self.params[p]:
                 self.params[p].SetStringSelection(v)
                 self.params[p].SetStringSelection(v)
-   
+
         for p, conv_f in [('urlparams', None), ('maxcols', int), ('maxrows', int)]:
         for p, conv_f in [('urlparams', None), ('maxcols', int), ('maxrows', int)]:
             if dcmd.has_key(p):
             if dcmd.has_key(p):
                 v = dcmd[p]
                 v = dcmd[p]
@@ -592,7 +592,7 @@ class WSPanel(wx.Panel):
             if len(bgcolor) == 8 and \
             if len(bgcolor) == 8 and \
                '0x' == bgcolor[:2]:
                '0x' == bgcolor[:2]:
 
 
-                colour= '#' + bgcolor[2:]
+                colour = '#' + bgcolor[2:]
                 self.params['bgcolor'].SetColour(colour)
                 self.params['bgcolor'].SetColour(colour)
 
 
     def IsConnected(self):
     def IsConnected(self):
@@ -606,10 +606,10 @@ class WSPanel(wx.Panel):
         self.capParsed.emit(error_msg=error_msg)
         self.capParsed.emit(error_msg=error_msg)
 
 
     def CreateCmd(self):
     def CreateCmd(self):
-        """Create d.wms cmd from values of panels widgets 
+        """Create d.wms cmd from values of panels widgets
 
 
         :return: cmd list
         :return: cmd list
-        :return: None if required widgets do not have selected/filled values. 
+        :return: None if required widgets do not have selected/filled values.
         """
         """
 
 
         # check required widgets
         # check required widgets
@@ -620,8 +620,8 @@ class WSPanel(wx.Panel):
         lcmd = self.ws_cmdl
         lcmd = self.ws_cmdl
         lcmd = ['d.wms'] + lcmd
         lcmd = ['d.wms'] + lcmd
 
 
-        layers="layers="
-        styles='styles='
+        layers = "layers="
+        styles = 'styles='
         first = True
         first = True
 
 
         # WMS standard - first layer in params is most bottom...
         # WMS standard - first layer in params is most bottom...
@@ -631,7 +631,7 @@ class WSPanel(wx.Panel):
                 layers += ','
                 layers += ','
                 styles += ','
                 styles += ','
             first = False
             first = False
-            layers += layer['name'] 
+            layers += layer['name']
             if layer['style'] is not None:
             if layer['style'] is not None:
                 styles += layer['style']['name']
                 styles += layer['style']['name']
 
 
@@ -659,7 +659,7 @@ class WSPanel(wx.Panel):
 
 
             c = self.params['bgcolor'].GetColour()
             c = self.params['bgcolor'].GetColour()
             hex_color = wx.Colour(c[0], c[1], c[2]).GetAsString(wx.C2S_HTML_SYNTAX)
             hex_color = wx.Colour(c[0], c[1], c[2]).GetAsString(wx.C2S_HTML_SYNTAX)
-            lcmd.append("bgcolor=" + '0x' + hex_color[1:]) 
+            lcmd.append("bgcolor=" + '0x' + hex_color[1:])
 
 
         lcmd.append("map=" + self.o_layer_name)
         lcmd.append("map=" + self.o_layer_name)
 
 
@@ -683,7 +683,7 @@ class WSPanel(wx.Panel):
         else:
         else:
             self.sel_layers = curr_sel_ls
             self.sel_layers = curr_sel_ls
 
 
-        # update projection 
+        # update projection
 
 
         self.projs_list = []
         self.projs_list = []
         projs_list = []
         projs_list = []
@@ -716,7 +716,6 @@ class WSPanel(wx.Panel):
             self.projs_list = sorted(self.projs_list)
             self.projs_list = sorted(self.projs_list)
             self.params['srs'].SetItems(self.projs_list)
             self.params['srs'].SetItems(self.projs_list)
 
 
-
             if cur_sel:
             if cur_sel:
                 self.params['srs'].SetStringSelection(cur_sel)
                 self.params['srs'].SetStringSelection(cur_sel)
             else:
             else:
@@ -764,15 +763,16 @@ class WSPanel(wx.Panel):
             self.req_page_sizer.Detach(self.params['format'])
             self.req_page_sizer.Detach(self.params['format'])
             self.params['format'].Destroy()
             self.params['format'].Destroy()
         if len(self.formats_list) > 0:
         if len(self.formats_list) > 0:
-            self.params['format'] =  wx.RadioBox(parent = self.req_page_panel, id = wx.ID_ANY, 
-                                                 label = _("Source image format"), pos = wx.DefaultPosition, 
-                                                 choices = formats_list,  majorDimension = 4, 
+            self.params['format'] =  wx.RadioBox(parent = self.req_page_panel, id = wx.ID_ANY,
+                                                 label = _("Source image format"), pos = wx.DefaultPosition,
+                                                 choices = formats_list,  majorDimension = 4,
                                                  style = wx.RA_SPECIFY_COLS)
                                                  style = wx.RA_SPECIFY_COLS)
-            self.source_sizer.Insert(item = self.params['format'], before = 2,
-                                     flag = wx.LEFT | wx.RIGHT | wx.BOTTOM, border = 5)
-        
-    def _getFormats(self, layer = None):
-        """Get formats 
+            self.source_sizer.Insert(item=self.params['format'], before=2,
+                                     flag=wx.LEFT | wx.RIGHT | wx.BOTTOM,
+                                     border=5)
+
+    def _getFormats(self, layer=None):
+        """Get formats
 
 
         WMS has formats defined generally for whole cap.
         WMS has formats defined generally for whole cap.
         In WMTS and NASA OnEarh formats are defined for layer.
         In WMTS and NASA OnEarh formats are defined for layer.
@@ -792,7 +792,7 @@ class WSPanel(wx.Panel):
 
 
         return formats_label
         return formats_label
 
 
-    def _checkImportValues(self,): 
+    def _checkImportValues(self,):
         """Check if required widgets are selected/filled
         """Check if required widgets are selected/filled
         """
         """
         warning_str = ""
         warning_str = ""
@@ -812,12 +812,11 @@ class WSPanel(wx.Panel):
             show_war = True
             show_war = True
 
 
         if not self.o_layer_name:
         if not self.o_layer_name:
-            warning_str += _("Choose output layer name.\n")  
+            warning_str += _("Choose output layer name.\n")
             show_war = True
             show_war = True
 
 
         if show_war:
         if show_war:
-            GMessage(parent = self.parent,
-                     message = warning_str)
+            GMessage(parent=self.parent, message=warning_str)
             return False
             return False
 
 
         return True
         return True
@@ -840,6 +839,7 @@ class WSPanel(wx.Panel):
         """
         """
         return self.ws
         return self.ws
 
 
+
 class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
 class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
     def __init__(self, parent, web_service, style, pos=wx.DefaultPosition):
     def __init__(self, parent, web_service, style, pos=wx.DefaultPosition):
         """List of layers and styles available in capabilities file
         """List of layers and styles available in capabilities file
@@ -848,7 +848,7 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
         self.ws = web_service
         self.ws = web_service
 
 
         TreeListCtrl.__init__(self, parent = parent, id = wx.ID_ANY, style = style)
         TreeListCtrl.__init__(self, parent = parent, id = wx.ID_ANY, style = style)
-        
+
         # setup mixins
         # setup mixins
         listmix.ListCtrlAutoWidthMixin.__init__(self)
         listmix.ListCtrlAutoWidthMixin.__init__(self)
         if self.ws != 'OnEarth':
         if self.ws != 'OnEarth':
@@ -859,7 +859,7 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
 
 
         self.SetMainColumn(0) # column with the tree
         self.SetMainColumn(0) # column with the tree
         self.setResizeColumn(0)
         self.setResizeColumn(0)
-        
+
         self.root = None
         self.root = None
         self.Bind(wx.EVT_TREE_SEL_CHANGING, self.OnListSelChanging)
         self.Bind(wx.EVT_TREE_SEL_CHANGING, self.OnListSelChanging)
 
 
@@ -873,10 +873,10 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
 
 
         if not cap:
         if not cap:
             return
             return
-    
+
         def AddLayerChildrenToTree(parent_layer, parent_item):
         def AddLayerChildrenToTree(parent_layer, parent_item):
             """Recursive function which adds all capabilities
             """Recursive function which adds all capabilities
-            layers/styles to the LayersList. 
+            layers/styles to the LayersList.
             """
             """
             def gettitle(layer):
             def gettitle(layer):
                 """Helper function"""
                 """Helper function"""
@@ -915,9 +915,9 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
                         self.SetItemText(style_item, _('style'), 1)
                         self.SetItemText(style_item, _('style'), 1)
 
 
                     self.SetPyData(style_item, {'type' : 'style',
                     self.SetPyData(style_item, {'type' : 'style',
-                                                'layer' : layer, # it is parent layer of style 
+                                                'layer' : layer, # it is parent layer of style
                                                 'style' : st})
                                                 'style' : st})
- 
+
                 self.SetPyData(item, {'type' : 'layer', # is it layer or style?
                 self.SetPyData(item, {'type' : 'layer', # is it layer or style?
                                       'layer' : layer,  # Layer instance from web_services.cap_interface
                                       'layer' : layer,  # Layer instance from web_services.cap_interface
                                       'style' : def_st}) # layer can have assigned default style
                                       'style' : def_st}) # layer can have assigned default style
@@ -929,7 +929,7 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
                 addlayer(parent_layer, parent_item)
                 addlayer(parent_layer, parent_item)
 
 
             for layer in parent_layer.GetChildren():
             for layer in parent_layer.GetChildren():
-                item = self.AppendItem(parent_item, gettitle(layer)) 
+                item = self.AppendItem(parent_item, gettitle(layer))
                 addlayer(layer, item)
                 addlayer(layer, item)
                 AddLayerChildrenToTree(layer, item)
                 AddLayerChildrenToTree(layer, item)
 
 
@@ -940,11 +940,11 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
         """Get selected layers/styles in LayersList
         """Get selected layers/styles in LayersList
 
 
         :return: dict with these items:
         :return: dict with these items:
-                    'name'  : layer name used for request
-                              if it is style, it is name of parent layer
-                    'title' : layer title
-                    'style' : {'name' : 'style name', title : 'style title'}
-                    'cap_intf_l' : *Layer instance from web_services.cap_interface
+                 * 'name'  : layer name used for request
+                   if it is style, it is name of parent layer
+                 * 'title' : layer title
+                 * 'style' : {'name' : 'style name', title : 'style title'}
+                 * 'cap_intf_l' : \*Layer instance from web_services.cap_interface
         """
         """
         sel_layers = self.GetSelections()
         sel_layers = self.GetSelections()
         sel_layers_dict = []
         sel_layers_dict = []
@@ -953,7 +953,7 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
                 layer = self.GetPyData(s)['layer']
                 layer = self.GetPyData(s)['layer']
             except ValueError:
             except ValueError:
                 continue
                 continue
-            sel_layers_dict.append({ 
+            sel_layers_dict.append({
                                     'name' : layer.GetLayerData('name'),
                                     'name' : layer.GetLayerData('name'),
                                     'title' : layer.GetLayerData('title'),
                                     'title' : layer.GetLayerData('title'),
                                     'style' : self.GetPyData(s)['style'],
                                     'style' : self.GetPyData(s)['style'],
@@ -997,7 +997,7 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
             while True:
             while True:
                 _selectRequestableChildren(chck_item, items_to_chck, items_to_sel)
                 _selectRequestableChildren(chck_item, items_to_chck, items_to_sel)
                 if items_to_chck:
                 if items_to_chck:
-                    chck_item = items_to_chck.pop() 
+                    chck_item = items_to_chck.pop()
                 else:
                 else:
                     break
                     break
 
 
@@ -1005,7 +1005,7 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
                 self.SelectItem(items_to_sel.pop(), unselect_others=False)
                 self.SelectItem(items_to_sel.pop(), unselect_others=False)
         else:
         else:
             _emitSelected(self.GetPyData(cur_item)['layer'])
             _emitSelected(self.GetPyData(cur_item)['layer'])
-          
+
     def GetItemCount(self):
     def GetItemCount(self):
         """Required for listmix.ListCtrlAutoWidthMixin
         """Required for listmix.ListCtrlAutoWidthMixin
         """
         """
@@ -1052,14 +1052,14 @@ class LayersList(TreeListCtrl, listmix.ListCtrlAutoWidthMixin):
 
 
         self.UnselectAll()
         self.UnselectAll()
 
 
-        l_st_list = deepcopy(l_st_list)        
+        l_st_list = deepcopy(l_st_list)
         root_item = self.GetRootItem()
         root_item = self.GetRootItem()
 
 
         items_to_sel = [None] * len(l_st_list)
         items_to_sel = [None] * len(l_st_list)
         checknext(root_item, l_st_list, items_to_sel)
         checknext(root_item, l_st_list, items_to_sel)
 
 
         # items are selected according to position in l_st_list
         # items are selected according to position in l_st_list
-        # to be added to Layers order list in right order 
+        # to be added to Layers order list in right order
         for i in items_to_sel:
         for i in items_to_sel:
             if not i:
             if not i:
                 continue
                 continue
@@ -1085,7 +1085,7 @@ class WSManageSettingsWidget(ManageSettingsWidget):
         self.btnAddDefaultServers = wx.Button(parent=self, id=wx.ID_ANY,
         self.btnAddDefaultServers = wx.Button(parent=self, id=wx.ID_ANY,
                                              label=_("Add default servers"))
                                              label=_("Add default servers"))
         self.btnAddDefaultServers.Bind(wx.EVT_BUTTON, self.OnAddDefaultServers)
         self.btnAddDefaultServers.Bind(wx.EVT_BUTTON, self.OnAddDefaultServers)
-        
+
         ManageSettingsWidget._layout(self)
         ManageSettingsWidget._layout(self)
         self.settingsSizer.Add(item=self.btnAddDefaultServers,
         self.settingsSizer.Add(item=self.btnAddDefaultServers,
                                flag=wx.RIGHT,
                                flag=wx.RIGHT,