[GRASS-SVN] r31785 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jun 21 14:49:41 EDT 2008


Author: martinl
Date: 2008-06-21 14:49:40 -0400 (Sat, 21 Jun 2008)
New Revision: 31785

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/dialog: do not ignore module label (and description)

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-06-21 14:40:51 UTC (rev 31784)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-06-21 18:49:40 UTC (rev 31785)
@@ -186,7 +186,9 @@
         self.name = _('unknown')
         self.params = []
         self.description = ''
+        self.label = ''
         self.flags = []
+        self.keywords = []
         if grassModule is not None:
             xml.sax.parseString( getInterfaceDescription( grassModule ) , processTask( self ) )
 
@@ -286,7 +288,6 @@
 
         if name == 'task':
             self.task.name = attrs.get('name', None)
-            self.task.keywords = []
 
         if name == 'parameter':
             self.inParameter = True;
@@ -424,7 +425,10 @@
                 "guisection" : self.flag_guisection } )
 
         if name == 'label':
-            self.param_label = normalize_whitespace(self.label)
+            if self.inParameter:
+                self.param_label = normalize_whitespace(self.label)
+            else:
+                self.task.label = normalize_whitespace(self.label)
 
         if name == 'description':
             if self.inValueContent:
@@ -709,7 +713,12 @@
         #
         # put module description
         #
-        self.description = StaticWrapText (parent=self.panel, label=self.task.description)
+        if self.task.label != '':
+            module_desc = self.task.label + os.linesep + self.task.description
+        else:
+            module_desc = self.task.description
+        self.description = StaticWrapText (parent=self.panel,
+                                           label=module_desc)
         topsizer.Add (item=self.description, proportion=1, border=5,
                       flag=wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
 



More information about the grass-commit mailing list