[GRASS-SVN] r44831 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 3 09:30:38 EST 2011
Author: martinl
Date: 2011-01-03 06:30:38 -0800 (Mon, 03 Jan 2011)
New Revision: 44831
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: generate 'close' checkbox only for commands which have some output
(merge r44830 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py 2011-01-03 14:28:34 UTC (rev 44830)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py 2011-01-03 14:30:38 UTC (rev 44831)
@@ -807,6 +807,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/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2011-01-03 14:28:34 UTC (rev 44830)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2011-01-03 14:30:38 UTC (rev 44831)
@@ -805,7 +805,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