[GRASS-SVN] r39505 - in grass/trunk/gui/wxpython: gui_modules xml

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 13 06:56:50 EDT 2009


Author: martinl
Date: 2009-10-13 06:56:50 -0400 (Tue, 13 Oct 2009)
New Revision: 39505

Modified:
   grass/trunk/gui/wxpython/gui_modules/utils.py
   grass/trunk/gui/wxpython/xml/menudata.xml
Log:
wxGUI: fix GetCmdString() (dictionary instead of tuple)
	(merge r39502 from devbr6)


Modified: grass/trunk/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/utils.py	2009-10-13 10:51:54 UTC (rev 39504)
+++ grass/trunk/gui/wxpython/gui_modules/utils.py	2009-10-13 10:56:50 UTC (rev 39505)
@@ -411,16 +411,23 @@
     """
     Get GRASS command as string.
     
-    @param cmd GRASS command given as tuple
+    @param cmd GRASS command given as dictionary
     
     @return command string
     """
     scmd = ''
     if not cmd:
-        return ''
+        return scmd
+    
     scmd = cmd[0]
+    
+    if cmd[1].has_key('flags'):
+        for flag in cmd[1]['flags']:
+            scmd += ' -' + flag
     for k, v in cmd[1].iteritems():
-        scmd += ' %s=%s' % (k, v)
+        if k != 'flags':
+            scmd += ' %s=%s' % (k, v)
+    
     return scmd
 
 def CmdToTuple(cmd):

Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml	2009-10-13 10:51:54 UTC (rev 39504)
+++ grass/trunk/gui/wxpython/xml/menudata.xml	2009-10-13 10:56:50 UTC (rev 39505)
@@ -2402,6 +2402,13 @@
               <handler>self.OnMenuCmd</handler>
 	      <command>i.zc</command>
 	    </menuitem>
+	    <menuitem>
+	      <label>Matrix/convolving filter</label>
+	      <help>Raster map matrix filter.</help>
+	      <keywords>raster,map algebra</keywords>
+	      <handler>self.OnMenuCmd</handler>
+	      <command>r.mfilter</command>
+	    </menuitem>
 	  </items>
 	</menu>
 	<menuitem>



More information about the grass-commit mailing list