[GRASS-SVN] r53802 - in grass/trunk/gui/wxpython: lmgr xml
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Nov 14 04:05:16 PST 2012
Author: martinl
Date: 2012-11-14 04:05:15 -0800 (Wed, 14 Nov 2012)
New Revision: 53802
Modified:
grass/trunk/gui/wxpython/lmgr/frame.py
grass/trunk/gui/wxpython/xml/menudata.xml
Log:
wxGUI: define separate handlers for color rules
Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py 2012-11-14 11:58:16 UTC (rev 53801)
+++ grass/trunk/gui/wxpython/lmgr/frame.py 2012-11-14 12:05:15 UTC (rev 53802)
@@ -1228,18 +1228,19 @@
'loc' : grass.gisenv()["LOCATION_NAME"] })
dlg.Destroy()
- def RulesCmd(self, event, cmd = None):
- """!Launches dialog for commands that need rules input and
- processes rules
+ def OnRasterRules(self, event):
+ """!Launches dialog for raster color rules
"""
- cmd = self.GetMenuCmd(event)
-
- if cmd[0] == 'r.colors':
- ctable = RasterColorTable(self)
- else:
- ctable = VectorColorTable(self, attributeType = 'color')
+ ctable = RasterColorTable(self)
ctable.CentreOnScreen()
ctable.Show()
+
+ def OnVectorRules(self, event):
+ """!Launches dialog for vector color rules
+ """
+ ctable = VectorColorTable(self, attributeType = 'color')
+ ctable.CentreOnScreen()
+ ctable.Show()
def OnEditImageryGroups(self, event, cmd = None):
"""!Show dialog for creating and editing groups.
Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml 2012-11-14 11:58:16 UTC (rev 53801)
+++ grass/trunk/gui/wxpython/xml/menudata.xml 2012-11-14 12:05:15 UTC (rev 53802)
@@ -1066,7 +1066,7 @@
<label>Create color rules</label>
<help>Interactive management of raster color tables.</help>
<keywords>raster,color table</keywords>
- <handler>RulesCmd</handler>
+ <handler>OnRasterRules</handler>
</menuitem>
<menuitem>
<label>Export color table</label>
@@ -2134,9 +2134,8 @@
<menuitem>
<label>Color rules</label>
<help>Interactive management of vector color tables.</help>
- <handler>RulesCmd</handler>
+ <handler>OnVectorRules</handler>
<keywords>vector,color table</keywords>
- <command>v.colors</command>
</menuitem>
<menuitem>
<label>Export color table</label>
More information about the grass-commit
mailing list