[GRASS-SVN] r32354 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 29 04:07:48 EDT 2008


Author: martinl
Date: 2008-07-29 04:07:47 -0400 (Tue, 29 Jul 2008)
New Revision: 32354

Modified:
   grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI: cosmetics in LayerTree constructor, use kargs magic

Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py	2008-07-28 23:39:54 UTC (rev 32353)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py	2008-07-29 08:07:47 UTC (rev 32354)
@@ -59,7 +59,7 @@
                  ctstyle=CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT |
                  CT.TR_HIDE_ROOT | CT.TR_ROW_LINES | CT.TR_FULL_ROW_HIGHLIGHT |
                  CT.TR_EDIT_LABELS | CT.TR_MULTIPLE,
-                 idx=None, gismgr=None, notebook=None, auimgr=None, showMapDisplay=True):
+                 **kargs):
         CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, ctstyle)
 
         ### SetAutoLayout() causes that no vertical scrollbar is displayed
@@ -78,11 +78,11 @@
         self.saveitem = {}         # dictionary to preserve layer attributes for drag and drop
         self.first = True          # indicates if a layer is just added or not
         self.drag = False          # flag to indicate a drag event is in process
-        self.disp_idx = idx
-        self.gismgr = gismgr
-        self.notebook = notebook   # GIS Manager notebook for layer tree
-        self.treepg = parent       # notebook page holding layer tree
-        self.auimgr = auimgr       # aui manager
+        self.disp_idx = kargs['idx']
+        self.gismgr = kargs['gismgr']
+        self.notebook = kargs['notebook'] # Layer Manager notebook for layer tree
+        self.treepg = parent              # notebook page holding layer tree
+        self.auimgr = kargs['auimgr']     # aui manager
 
         # init associated map display
         self.mapdisplay = mapdisp.MapFrame(self,
@@ -99,7 +99,7 @@
                                    " - Location: " + grassenv.GetGRASSVariable("LOCATION_NAME")))
 
         # show new display
-        if showMapDisplay is True:
+        if kargs['showMapDisplay'] is True:
             self.mapdisplay.Show()
             self.mapdisplay.Refresh()
             self.mapdisplay.Update()



More information about the grass-commit mailing list