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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 22 09:03:31 EST 2010


Author: martinl
Date: 2010-12-22 06:03:30 -0800 (Wed, 22 Dec 2010)
New Revision: 44669

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI: close dialog on finish by default
(merge r44668 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-12-22 14:01:54 UTC (rev 44668)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-12-22 14:03:30 UTC (rev 44669)
@@ -807,8 +807,10 @@
             
             if hasattr(dialog, "get_dcmd") and \
                     dialog.get_dcmd is None and \
-                    dialog.closebox.IsChecked():
-                time.sleep(1)
+                    dialog.closebox.IsChecked() and \
+                    (event.returncode == 0 or event.aborted):
+                self.cmd_output.Update()
+                time.sleep(2)
                 dialog.Close()
         
     def OnProcessPendingOutputWindowEvents(self, event):

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-12-22 14:01:54 UTC (rev 44668)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-12-22 14:03:30 UTC (rev 44669)
@@ -798,6 +798,8 @@
             self.closebox = wx.CheckBox(parent = self.panel,
                                         label = _('Close dialog on finish'), style = wx.NO_BORDER)
             self.closebox.SetValue(UserSettings.Get(group = 'cmd', key = 'closeDlg', subkey = 'enabled'))
+            self.closebox.SetToolTipString(_("Close dialog when command is successfully finished. "
+                                             "Change this settings in Preferences dialog ('Command' tab)."))
             guisizer.Add(item = self.closebox, proportion = 0,
                          flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
                          border = 5)

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2010-12-22 14:01:54 UTC (rev 44668)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2010-12-22 14:03:30 UTC (rev 44669)
@@ -190,7 +190,7 @@
                     'enabled' : False
                     },
                 'closeDlg' : {
-                    'enabled' : False
+                    'enabled' : True
                     },
                 'verbosity' : {
                     'selection' : 'grassenv'
@@ -1397,7 +1397,7 @@
         row += 1
         # close
         close = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                            label=_("Close dialog on finish"),
+                            label=_("Close dialog when command is successfully finished"),
                             name="IsChecked")
         close.SetValue(self.settings.Get(group='cmd', key='closeDlg', subkey='enabled'))
         self.winId['cmd:closeDlg:enabled'] = close.GetId()



More information about the grass-commit mailing list