[GRASS-SVN] r42424 - in grass/trunk/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 1 16:00:37 EDT 2010


Author: martinl
Date: 2010-06-01 16:00:36 -0400 (Tue, 01 Jun 2010)
New Revision: 42424

Modified:
   grass/trunk/gui/wxpython/gui_modules/menuform.py
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: fix menuform error message (missing parameter)


Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2010-06-01 19:59:30 UTC (rev 42423)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2010-06-01 20:00:36 UTC (rev 42424)
@@ -456,8 +456,9 @@
         for p in self.params:
             if p.get('value', '') == '' and p.get('required', 'no') != 'no':
                 if p.get('default', '') == '':
+                    desc = p.get('label', p['description'])
                     errorList.append(_("Parameter '%(name)s' (%(desc)s) is missing.") % \
-                                         {'name' : p['name'], 'desc' : p['description']})
+                                         {'name' : p['name'], 'desc' : desc })
         
         return errorList
     

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2010-06-01 19:59:30 UTC (rev 42423)
+++ grass/trunk/gui/wxpython/wxgui.py	2010-06-01 20:00:36 UTC (rev 42424)
@@ -822,7 +822,6 @@
 
     def OnWorkspaceSave(self, event=None):
         """!Save file with workspace definition"""
-
         if self.workspaceFile:
             dlg = wx.MessageDialog(self, message=_("Workspace file <%s> already exists. "
                                                    "Do you want to overwrite this file?") % \
@@ -833,6 +832,7 @@
             else:
                 Debug.msg(4, "GMFrame.OnWorkspaceSave(): filename=%s" % self.workspaceFile)
                 self.SaveToWorkspaceFile(self.workspaceFile)
+                self.SetTitle(self.baseTitle + " - " + os.path.basename(self.workspaceFile))
         else:
             self.OnWorkspaceSaveAs()
 



More information about the grass-commit mailing list