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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 27 07:14:25 EST 2007


Author: martinl
Date: 2007-12-27 07:14:20 -0500 (Thu, 27 Dec 2007)
New Revision: 29517

Modified:
   grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: parse guisection tag also for flags, not only for parameters

Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2007-12-27 11:58:39 UTC (rev 29516)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2007-12-27 12:14:20 UTC (rev 29517)
@@ -308,6 +308,7 @@
             self.inFlag = True;
             self.flag_description = ''
             self.flag_default = ''
+            self.flag_guisection = ''
             self.flag_values = []
             # Look for the flag name
             self.flag_name = attrs.get('name', None)
@@ -336,7 +337,7 @@
 
         if name == 'guisection':
             self.inGuisection = True
-            self.param_guisection = ''
+            self.guisection = ''
 
         if name == 'keywords':
             self.inKeywordsContent = True
@@ -369,7 +370,7 @@
             # TODO: a set of flags to treat this case of a description sub-element
             self.value_tmp = self.value_tmp + ch
         if self.inGuisection:
-            self.param_guisection = self.param_guisection + ch
+            self.guisection = self.guisection + ch
         if self.inKeywordsContent:
             self.keyword = self.keyword + ch
 
@@ -404,7 +405,8 @@
             self.inFlag = False;
             self.task.flags.append({
                 "name" : self.flag_name,
-                "description" : self.flag_description } )
+                "description" : self.flag_description,
+                "guisection" : self.flag_guisection } )
 
         if name == 'label':
             self.param_label = normalize_whitespace(self.label)
@@ -428,7 +430,10 @@
             self.inValueContent = False
 
         if name == 'guisection':
-            self.param_guisection = normalize_whitespace(self.param_guisection)
+            if self.inParameter:
+                self.param_guisection = normalize_whitespace(self.guisection)
+            elif self.inFlag:
+                self.flag_guisection = normalize_whitespace(self.guisection)
             self.inGuisection = False
 
         if name == 'keywords':



More information about the grass-commit mailing list