[GRASS-SVN] r42426 - in grass/branches/develbranch_6/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 1 16:26:15 EDT 2010


Author: martinl
Date: 2010-06-01 16:26:15 -0400 (Tue, 01 Jun 2010)
New Revision: 42426

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


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-06-01 20:25:23 UTC (rev 42425)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-06-01 20:26:15 UTC (rev 42426)
@@ -420,8 +420,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/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2010-06-01 20:25:23 UTC (rev 42425)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2010-06-01 20:26:15 UTC (rev 42426)
@@ -821,7 +821,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?") % \
@@ -832,6 +831,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