[GRASS-SVN] r54604 - in grass/trunk/gui/wxpython: core lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 12 03:36:48 PST 2013


Author: martinl
Date: 2013-01-12 03:36:48 -0800 (Sat, 12 Jan 2013)
New Revision: 54604

Modified:
   grass/trunk/gui/wxpython/core/gconsole.py
   grass/trunk/gui/wxpython/lmgr/frame.py
Log:
wxGUI/command line: force autogenerated GUI dialogs by '--ui' flag


Modified: grass/trunk/gui/wxpython/core/gconsole.py
===================================================================
--- grass/trunk/gui/wxpython/core/gconsole.py	2013-01-12 11:03:23 UTC (rev 54603)
+++ grass/trunk/gui/wxpython/core/gconsole.py	2013-01-12 11:36:48 UTC (rev 54604)
@@ -474,11 +474,11 @@
 
             if self._ignoredCmdPattern and \
               re.compile(self._ignoredCmdPattern).search(' '.join(command)) and \
-              '--help' not in command:
+              '--help' not in command and '--ui' not in command:
                 event = gIgnoredCmdRun(cmd=command)
                 wx.PostEvent(self, event)
                 return
-
+            
             else:
                 # other GRASS commands (r|v|g|...)
                 try:
@@ -654,4 +654,4 @@
         event.Skip()
 
     def OnProcessPendingOutputWindowEvents(self, event):
-        wx.GetApp().ProcessPendingEvents()
\ No newline at end of file
+        wx.GetApp().ProcessPendingEvents()

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2013-01-12 11:03:23 UTC (rev 54603)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2013-01-12 11:36:48 UTC (rev 54604)
@@ -267,7 +267,7 @@
         
         # create 'command output' text area
         self._gconsole = GConsole(guiparent = self, giface = self._giface,
-                                  ignoredCmdPattern = '^d\..*|^r[3]?\.mapcalc$')
+                                  ignoredCmdPattern = '^d\..*|^r[3]?\.mapcalc$|^i.group')
         self.goutput = GConsoleWindow(parent = self, gconsole = self._gconsole,
                                       gcstyle = GC_SEARCH | GC_PROMPT)
         self.notebook.AddPage(page = self.goutput, text = _("Command console"), name = 'output')
@@ -574,12 +574,15 @@
             self.Raise()
 
     def RunSpecialCmd(self, command):
+        """!Run command from command line, check for GUI wrappers"""
         if re.compile('^d\..*').search(command[0]):
             self.RunDisplayCmd(command)
         elif re.compile('r[3]?\.mapcalc').search(command[0]):
             self.OnMapCalculator(event = None, cmd = command)
+        elif command[0] == 'i.group':
+            self.OnEditImageryGroups(event = None, cmd = command)
         else:
-            raise ValueError('Layer Manger special command (%s)'
+            raise ValueError('Layer Manager special command (%s)'
                              ' not supported.' % ' '.join(command))
 
     def RunDisplayCmd(self, command):



More information about the grass-commit mailing list