[GRASS-SVN] r44830 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 3 09:28:34 EST 2011
Author: martinl
Date: 2011-01-03 06:28:34 -0800 (Mon, 03 Jan 2011)
New Revision: 44830
Modified:
grass/trunk/gui/wxpython/gui_modules/goutput.py
grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: generate 'close' checkbox only for commands which have some output
Modified: grass/trunk/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/goutput.py 2011-01-03 14:19:50 UTC (rev 44829)
+++ grass/trunk/gui/wxpython/gui_modules/goutput.py 2011-01-03 14:28:34 UTC (rev 44830)
@@ -809,6 +809,7 @@
if hasattr(dialog, "get_dcmd") and \
dialog.get_dcmd is None and \
+ hasattr(dialog, "closebox") and \
dialog.closebox.IsChecked() and \
(event.returncode == 0 or event.aborted):
self.cmd_output.Update()
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-01-03 14:19:50 UTC (rev 44829)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-01-03 14:28:34 UTC (rev 44830)
@@ -855,7 +855,12 @@
flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
border = 5)
- if self.get_dcmd is None:
+ closeBox = False
+ for p in self.task.params:
+ if p.get('age', 'old') == 'new':
+ closeBox = True
+
+ if self.get_dcmd is None and closeBox:
# close dialog when command is terminated
self.closebox = wx.CheckBox(parent = self.panel,
label = _('Close dialog on finish'), style = wx.NO_BORDER)
More information about the grass-commit
mailing list