[GRASS-SVN] r61906 - in grass/branches/releasebranch_7_0: . gui/wxpython/core gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 13 11:36:53 PDT 2014


Author: annakrat
Date: 2014-09-13 11:36:53 -0700 (Sat, 13 Sep 2014)
New Revision: 61906

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/gui/wxpython/core/gcmd.py
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/prompt.py
Log:
wxGUI: completely remove GetRealCmd, hopefully not needed anymore for Windows (merge from trunk, r61905)


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:60289,60696,61380,61420,61422,61480,61500,61764,61891
   + /grass/trunk:60289,60696,61380,61420,61422,61480,61500,61764,61891,61905

Modified: grass/branches/releasebranch_7_0/gui/wxpython/core/gcmd.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/core/gcmd.py	2014-09-13 18:33:28 UTC (rev 61905)
+++ grass/branches/releasebranch_7_0/gui/wxpython/core/gcmd.py	2014-09-13 18:36:53 UTC (rev 61906)
@@ -60,15 +60,6 @@
         return string
     _ = null_gettext
 
-def GetRealCmd(cmd):
-    """!Return real command name - only for MS Windows
-    """
-    if sys.platform == 'win32':
-        for ext in globalvar.grassScripts.keys():
-            if cmd in globalvar.grassScripts[ext]:
-                return cmd + ext
-    
-    return cmd
 
 def DecodeString(string):
     """!Decode string using system encoding
@@ -673,7 +664,7 @@
     Debug.msg(2, "gcmd.RunCommand(): command started")
     start = time.time()
     
-    ps = grass.start_command(GetRealCmd(prog), flags, overwrite, quiet, verbose, **kwargs)
+    ps = grass.start_command(prog, flags, overwrite, quiet, verbose, **kwargs)
     
     if stdin:
         ps.stdin.write(stdin)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py	2014-09-13 18:33:28 UTC (rev 61905)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py	2014-09-13 18:36:53 UTC (rev 61906)
@@ -2301,7 +2301,7 @@
         # parse the interface decription
         try:
             global _blackList
-            self.grass_task = gtask.parse_interface(gcmd.GetRealCmd(cmd[0]),
+            self.grass_task = gtask.parse_interface(cmd[0],
                                                     blackList = _blackList)
         except (grass.ScriptError, ValueError) as e:
             raise gcmd.GException(e.value)
@@ -2462,7 +2462,7 @@
         from core.debug import Debug
         Debug.msg(1, "forms.py called using command: %s" % sys.argv[1])
         cmd = utils.split(sys.argv[1])
-        task = gtask.grassTask(gcmd.GetRealCmd(cmd[0]))
+        task = gtask.grassTask(cmd[0])
         task.set_options(cmd[1:])
         Debug.msg(1, "forms.py opening form for: %s" % task.get_cmd(ignoreErrors=True))
         app = GrassGUIApp(task)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/prompt.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/prompt.py	2014-09-13 18:33:28 UTC (rev 61905)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/prompt.py	2014-09-13 18:36:53 UTC (rev 61906)
@@ -32,7 +32,7 @@
 
 from core          import globalvar
 from core          import utils
-from core.gcmd     import EncodeString, DecodeString, GetRealCmd
+from core.gcmd     import EncodeString, DecodeString
 from core.utils import _
 
 
@@ -260,7 +260,7 @@
         
         if not self.cmdDesc or cmd != self.cmdDesc.get_name():
             try:
-                self.cmdDesc = gtask.parse_interface(GetRealCmd(cmd))
+                self.cmdDesc = gtask.parse_interface(cmd)
             except IOError:
                 self.cmdDesc = None
 
@@ -388,7 +388,7 @@
             if cmd not in globalvar.grassCmd:
                 return
 
-            info = gtask.command_info(GetRealCmd(cmd))
+            info = gtask.command_info(cmd)
 
             self.CallTipSetBackground("#f4f4d1")
             self.CallTipSetForeground("BLACK")
@@ -574,7 +574,7 @@
                 if cmd in globalvar.grassCmd and \
                         (not self.cmdDesc or cmd != self.cmdDesc.get_name()):
                     try:
-                        self.cmdDesc = gtask.parse_interface(GetRealCmd(cmd))
+                        self.cmdDesc = gtask.parse_interface(cmd)
                     except IOError:
                         self.cmdDesc = None
             event.Skip()



More information about the grass-commit mailing list