[GRASS-SVN] r53517 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Oct 20 13:29:24 PDT 2012


Author: martinl
Date: 2012-10-20 13:29:24 -0700 (Sat, 20 Oct 2012)
New Revision: 53517

Modified:
   grass/trunk/gui/wxpython/gui_core/goutput.py
Log:
wxGUI: GMConsole's `frame` argument should be optional


Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py	2012-10-20 14:11:41 UTC (rev 53516)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py	2012-10-20 20:29:24 UTC (rev 53517)
@@ -198,8 +198,8 @@
 class GMConsole(wx.SplitterWindow):
     """!Create and manage output console for commands run by GUI.
     """
-    def __init__(self, parent, frame, id = wx.ID_ANY, margin = False,
-                 notebook = None,
+    def __init__(self, parent, id = wx.ID_ANY, margin = False,
+                 frame = None, notebook = None,
                  style = wx.TAB_TRAVERSAL | wx.FULL_REPAINT_ON_RESIZE,
                  **kwargs):
         wx.SplitterWindow.__init__(self, parent, id, style = style, *kwargs)
@@ -209,8 +209,12 @@
         self.panelPrompt = wx.Panel(parent = self, id = wx.ID_ANY)
         
         # initialize variables
-        self.parent          = parent # GMFrame | CmdPanel | ?
-        self.frame = frame
+        self.parent = parent # GMFrame | CmdPanel | ?
+        if frame:
+            self.frame = frame
+        else:
+            self.frame = parent
+        
         if notebook:
             self._notebook = notebook
         else:



More information about the grass-commit mailing list