[GRASS-SVN] r32022 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jul 6 07:41:11 EDT 2008


Author: martinl
Date: 2008-07-06 07:41:11 -0400 (Sun, 06 Jul 2008)
New Revision: 32022

Modified:
   grass/trunk/gui/wxpython/gui_modules/goutput.py
   grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: destroy/hide dialog on wx.EVT_CLOSE

Modified: grass/trunk/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/goutput.py	2008-07-06 11:24:43 UTC (rev 32021)
+++ grass/trunk/gui/wxpython/gui_modules/goutput.py	2008-07-06 11:41:11 UTC (rev 32022)
@@ -105,7 +105,8 @@
         """
         if Debug.get_level() == 0:
             # don't redirect when debugging is enabled
-            sys.stderr = self.cmd_stderr
+            # sys.stderr = self.cmd_stderr
+            pass
             return True
 
         return False

Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-07-06 11:24:43 UTC (rev 32021)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-07-06 11:41:11 UTC (rev 32022)
@@ -711,7 +711,7 @@
                          flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
                          border=5)
 
-        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
+        self.Bind(wx.EVT_CLOSE, self.OnCancel)
 
         #constrained_size = self.notebookpanel.GetSize()
         # 80 takes the tabbar into account
@@ -840,11 +840,6 @@
             
         event.Skip()
 
-    def OnCloseWindow(self, event):
-        """Close the main window"""
-        self.MakeModal(False)
-        self.Destroy()
-
     def OnAbout(self, event):
         """General 'about' information"""
         dlg = wx.MessageDialog(self, _("This is a sample program for\n"



More information about the grass-commit mailing list