[GRASS-SVN] r39415 - in grass/trunk/gui/wxpython: . xml

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 5 17:22:20 EDT 2009


Author: martinl
Date: 2009-10-05 17:22:20 -0400 (Mon, 05 Oct 2009)
New Revision: 39415

Modified:
   grass/trunk/gui/wxpython/wxgui.py
   grass/trunk/gui/wxpython/xml/menudata.xml
Log:
fix rulescmd (menu tree item)
    (merge r39413 from devbr6)


Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2009-10-05 21:19:17 UTC (rev 39414)
+++ grass/trunk/gui/wxpython/wxgui.py	2009-10-05 21:22:20 UTC (rev 39415)
@@ -993,18 +993,19 @@
         self.curr_page = None
         
 
-    def RulesCmd(self, event):
+    def RulesCmd(self, event, cmd = ''):
         """
         Launches dialog for commands that need rules
         input and processes rules
         """
-        command = self.GetMenuCmd(event)
+        if event:
+            cmd = self.GetMenuCmd(event)
                 
-        if command[0] == 'r.colors' or command[0] == 'vcolors':
-            ctable = colorrules.ColorTable(self, cmd=command[0])
+        if cmd[0] == 'r.colors' or cmd[0] == 'vcolors':
+            ctable = colorrules.ColorTable(self, cmd=cmd[0])
             ctable.Show()
         else:
-            dlg = rules.RulesText(self, cmd=command)
+            dlg = rules.RulesText(self, cmd=cmd)
             dlg.CenterOnScreen()
             if dlg.ShowModal() == wx.ID_OK:
                 gtemp = utils.GetTempfile()
@@ -1014,7 +1015,7 @@
                 finally:
                     output.close()
     
-                cmdlist = [command[0],
+                cmdlist = [cmd[0],
                            'input=%s' % dlg.inmap,
                            'output=%s' % dlg.outmap,
                            'rules=%s' % gtemp]

Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml	2009-10-05 21:19:17 UTC (rev 39414)
+++ grass/trunk/gui/wxpython/xml/menudata.xml	2009-10-05 21:22:20 UTC (rev 39415)
@@ -1383,7 +1383,7 @@
 	    <menuitem>
 	      <label>Reclassify interactively</label>
 	      <help>Creates a new map layer whose category values are based upon a reclassification of the categories in an existing raster map layer.</help>
-	      <keywords>raster</keywords>
+	      <keywords>raster,statistics,aggregation</keywords>
               <handler>self.RulesCmd</handler>
 	      <command>r.reclass</command>
 	    </menuitem>



More information about the grass-commit mailing list