[GRASS-SVN] r53859 - in grass/trunk/gui/wxpython: . gmodeler gui_core lmgr scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 17 09:17:24 PST 2012


Author: wenzeslaus
Date: 2012-11-17 09:17:23 -0800 (Sat, 17 Nov 2012)
New Revision: 53859

Modified:
   grass/trunk/gui/wxpython/gmodeler/frame.py
   grass/trunk/gui/wxpython/gmodeler/model.py
   grass/trunk/gui/wxpython/gui_core/forms.py
   grass/trunk/gui/wxpython/gui_core/goutput.py
   grass/trunk/gui/wxpython/gui_core/prompt.py
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/scripts/vkrige.py
   grass/trunk/gui/wxpython/wxpythonlib.dox
Log:
wxGUI/goutput: rename GM (gis manager) classes to G (grass) classes (limited to goutput classes)

Modified: grass/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py	2012-11-17 16:46:32 UTC (rev 53858)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py	2012-11-17 17:17:23 UTC (rev 53859)
@@ -34,7 +34,7 @@
 
 from core                 import globalvar
 from gui_core.widgets     import GNotebook
-from gui_core.goutput     import GMConsole
+from gui_core.goutput     import GConsole
 from core.debug           import Debug
 from core.gcmd            import GMessage, GException, GWarning, GError, RunCommand
 from gui_core.dialogs     import GetImageHandlers
@@ -104,7 +104,7 @@
         
         self.pythonPanel = PythonPanel(parent = self)
         
-        self.goutput = GMConsole(parent = self, frame = self, notebook = self.notebook)
+        self.goutput = GConsole(parent = self, frame = self, notebook = self.notebook)
         
         self.notebook.AddPage(page = self.canvas, text=_('Model'), name = 'model')
         self.notebook.AddPage(page = self.itemPanel, text=_('Items'), name = 'items')

Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py	2012-11-17 16:46:32 UTC (rev 53858)
+++ grass/trunk/gui/wxpython/gmodeler/model.py	2012-11-17 17:17:23 UTC (rev 53859)
@@ -493,7 +493,7 @@
     def Run(self, log, onDone, parent = None):
         """!Run model
 
-        @param log logging window (see goutput.GMConsole)
+        @param log logging window (see goutput.GConsole)
         @param onDone on-done method
         @param parent window for messages or None
         """

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2012-11-17 16:46:32 UTC (rev 53858)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2012-11-17 17:17:23 UTC (rev 53859)
@@ -1617,8 +1617,8 @@
         # are we running from command line?
         ### add 'command output' tab regardless standalone dialog
         if self.parent.GetName() == "MainFrame" and self.parent.get_dcmd is None:
-            from gui_core.goutput import GMConsole
-            self.goutput = GMConsole(parent = self.notebook, frame = self.parent, margin = False, notebook = self.notebook)
+            from gui_core.goutput import GConsole
+            self.goutput = GConsole(parent = self.notebook, frame = self.parent, margin = False, notebook = self.notebook)
             self.outpage = self.notebook.AddPage(page = self.goutput, text = _("Command output"), name = 'output')
             index = self.AddBitmapToImageList(section = 'output', imageList = imageList)
             if index >= 0:

Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py	2012-11-17 16:46:32 UTC (rev 53858)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py	2012-11-17 17:17:23 UTC (rev 53859)
@@ -5,10 +5,10 @@
 
 Classes:
  - goutput::CmdThread
- - goutput::GMConsole
- - goutput::GMStdout
- - goutput::GMStderr
- - goutput::GMStc
+ - goutput::GConsole
+ - goutput::GStdout
+ - goutput::GStderr
+ - goutput::GStc
 
 (C) 2007-2012 by the GRASS Development Team
 
@@ -75,7 +75,7 @@
         
         self.setDaemon(True)
         
-        self.parent = parent # GMConsole
+        self.parent = parent # GConsole
         self._want_abort_all = False
         
         self.start()
@@ -193,7 +193,7 @@
         if self.requestQ.empty():
             self._want_abort_all = False
         
-class GMConsole(wx.SplitterWindow):
+class GConsole(wx.SplitterWindow):
     """!Create and manage output console for commands run by GUI.
     """
     def __init__(self, parent, id = wx.ID_ANY, margin = False,
@@ -201,7 +201,7 @@
                  style = wx.TAB_TRAVERSAL | wx.FULL_REPAINT_ON_RESIZE,
                  **kwargs):
         wx.SplitterWindow.__init__(self, parent, id, style = style, *kwargs)
-        self.SetName("GMConsole")
+        self.SetName("GConsole")
         
         self.panelOutput = wx.Panel(parent = self, id = wx.ID_ANY)
         self.panelPrompt = wx.Panel(parent = self, id = wx.ID_ANY)
@@ -233,7 +233,7 @@
         self.progressbar.Bind(EVT_CMD_PROGRESS, self.OnCmdProgress)
         
         # text control for command output
-        self.cmdOutput = GMStc(parent = self.panelOutput, id = wx.ID_ANY, margin = margin,
+        self.cmdOutput = GStc(parent = self.panelOutput, id = wx.ID_ANY, margin = margin,
                                wrap = None) 
         self.cmdOutputTimer = wx.Timer(self.cmdOutput, id = wx.ID_ANY)
         self.cmdOutput.Bind(EVT_CMD_OUTPUT, self.OnCmdOutput)
@@ -261,8 +261,8 @@
             self.search.Bind(wx.EVT_TEXT,             self.OnUpdateStatusBar)
         
         # stream redirection
-        self.cmdStdOut = GMStdout(self)
-        self.cmdStdErr = GMStderr(self)
+        self.cmdStdOut = GStdout(self)
+        self.cmdStdErr = GStderr(self)
         
         # thread
         self.cmdThread = CmdThread(self, self.requestQ, self.resultQ)
@@ -425,7 +425,7 @@
         given style
 
         @param line text line
-        @param style text style (see GMStc)
+        @param style text style (see GStc)
         @param stdout write to stdout or stderr
         """
 
@@ -954,7 +954,7 @@
                     mapTree = self.frame.parent.GetLayerTree()
                 elif winName == 'LayerTree':
                     mapTree = self.frame.parent
-                elif winName: # GMConsole
+                elif winName: # GConsole
                     mapTree = self.frame.parent.parent.GetLayerTree()
                 else:
                     mapTree = None
@@ -1010,8 +1010,8 @@
         """!Get prompt"""
         return self.cmdPrompt
     
-class GMStdout:
-    """!GMConsole standard output
+class GStdout:
+    """!GConsole standard output
 
     Based on FrameOutErr.py
 
@@ -1022,7 +1022,7 @@
     Licence:   GPL
     """
     def __init__(self, parent):
-        self.parent = parent # GMConsole
+        self.parent = parent # GConsole
 
     def write(self, s):
         if len(s) == 0 or s == '\n':
@@ -1036,8 +1036,8 @@
                               type = '')
             wx.PostEvent(self.parent.cmdOutput, evt)
         
-class GMStderr:
-    """!GMConsole standard error output
+class GStderr:
+    """!GConsole standard error output
 
     Based on FrameOutErr.py
 
@@ -1048,7 +1048,7 @@
     Licence:   GPL
     """
     def __init__(self, parent):
-        self.parent = parent # GMConsole
+        self.parent = parent # GConsole
         
         self.type = ''
         self.message = ''
@@ -1109,8 +1109,8 @@
             evt = wxCmdProgress(value = progressValue)
             wx.PostEvent(self.parent.progressbar, evt)
             
-class GMStc(stc.StyledTextCtrl):
-    """!Styled GMConsole
+class GStc(stc.StyledTextCtrl):
+    """!Styled text control for GRASS stdout and stderr.
 
     Based on FrameOutErr.py
 

Modified: grass/trunk/gui/wxpython/gui_core/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/prompt.py	2012-11-17 16:46:32 UTC (rev 53858)
+++ grass/trunk/gui/wxpython/gui_core/prompt.py	2012-11-17 17:17:23 UTC (rev 53859)
@@ -471,7 +471,7 @@
     See subclass GPromptPopUp and GPromptSTC.
     """
     def __init__(self, parent):
-        self.parent = parent                 # GMConsole
+        self.parent = parent                 # GConsole
         self.panel  = self.parent.GetPanel()
         
         if self.parent.parent.GetName() not in ("LayerManager", "Modeler"):
@@ -758,7 +758,7 @@
         
     def OnTextSelectionChanged(self, event):
         """!Copy selected text to clipboard and skip event.
-        The same function is in GMStc class (goutput.py).
+        The same function is in GStc class (goutput.py).
         """
         wx.CallAfter(self.Copy)
         event.Skip()

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2012-11-17 16:46:32 UTC (rev 53858)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2012-11-17 17:17:23 UTC (rev 53859)
@@ -49,7 +49,7 @@
 from modules.mcalc_builder import MapCalcFrame
 from dbmgr.manager         import AttributeManager
 from core.workspace        import ProcessWorkspaceFile, ProcessGrcFile, WriteWorkspaceFile
-from gui_core.goutput      import GMConsole
+from gui_core.goutput      import GConsole
 from gui_core.dialogs      import GdalOutputDialog, DxfImportDialog, GdalImportDialog, MapLayersDialog
 from gui_core.dialogs      import EVT_APPLY_MAP_LAYERS
 from gui_core.dialogs      import LocationDialog, MapsetDialog, CreateNewVector, GroupDialog
@@ -255,7 +255,7 @@
         self.notebook.AddPage(page = self.notebookLayers, text = _("Map layers"), name = 'layers')
         
         # create 'command output' text area
-        self.goutput = GMConsole(self, frame = self)
+        self.goutput = GConsole(self, frame = self)
         self.notebook.AddPage(page = self.goutput, text = _("Command console"), name = 'output')
         self._setCopyingOfSelectedText()
         

Modified: grass/trunk/gui/wxpython/scripts/vkrige.py
===================================================================
--- grass/trunk/gui/wxpython/scripts/vkrige.py	2012-11-17 16:46:32 UTC (rev 53858)
+++ grass/trunk/gui/wxpython/scripts/vkrige.py	2012-11-17 17:17:23 UTC (rev 53859)
@@ -98,7 +98,7 @@
             self.CreatePage(package = Rpackage, Rinstance = Rinstance, controller = controller)
         
         ## Command output. From menuform module, cmdPanel class
-        self.goutput = goutput.GMConsole(parent = self, frame = self.parent, margin = False,
+        self.goutput = goutput.GConsole(parent = self, frame = self.parent, margin = False,
                                          notebook = self.RPackagesBook)
         self.goutputId = self.RPackagesBook.GetPageCount()
         self.outpage = self.RPackagesBook.AddPage(page = self.goutput, text = _("Command output"), name = 'output')

Modified: grass/trunk/gui/wxpython/wxpythonlib.dox
===================================================================
--- grass/trunk/gui/wxpython/wxpythonlib.dox	2012-11-17 16:46:32 UTC (rev 53858)
+++ grass/trunk/gui/wxpython/wxpythonlib.dox	2012-11-17 17:17:23 UTC (rev 53859)
@@ -118,10 +118,10 @@
  - ghelp::HelpPanel
 - gui_core::goutput
  - goutput::CmdThread
- - goutput::GMConsole
- - goutput::GMStc
- - goutput::GMStdout
- - goutput::GMStderr
+ - goutput::GConsole
+ - goutput::GStc
+ - goutput::GStdout
+ - goutput::GStderr
 - gui_core::gselect
  - gselect::Select
  - gselect::VectorSelect



More information about the grass-commit mailing list