Browse Source

wxGUI: remove unused mapdisp_command.py module

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47000 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 years ago
parent
commit
c96076e414

+ 0 - 1
gui/wxpython/gui_modules/__init__.py

@@ -17,7 +17,6 @@ all = [
     "histogram.py",
     "layertree.py",
     "location_wizard.py",
-    "mapdisp_command.py",
     "mapdisp_window.py",
     "mapdisp.py",
     "mcalc_builder.py",

+ 0 - 3
gui/wxpython/gui_modules/mapdisp.py

@@ -54,7 +54,6 @@ from debug       import Debug
 from icon        import Icons
 from preferences import globalSettings as UserSettings
 
-from mapdisp_command import Command
 from mapdisp_window  import BufferedWindow
 
 from grass.script import core as grass
@@ -2028,8 +2027,6 @@ class MapApp(wx.App):
         self.mapFrm.Show()
         
         if __name__ == "__main__":
-            #status = Command(self, Map, cmdfile)
-            # status.start()
             self.timer = wx.PyTimer(self.watcher)
             #check each 0.5s
             global mtime

+ 0 - 75
gui/wxpython/gui_modules/mapdisp_command.py

@@ -1,75 +0,0 @@
-"""
-@package mapdisp.py
-
-@brief Command line useg of GIS map display canvas.view).
-
-Classes:
- - Command
-
-(C) 2006-2009 by the GRASS Development Team
-This program is free software under the GNU General Public
-License (>=v2). Read the file COPYING that comes with GRASS
-for details.
-
-@author Jachym Cepicky
-"""
-
-import sys
-import time
-
-from debug import Debug
-from threading import Thread
-
-class Command(Thread):
-    """
-    Creates thread which will observe the command file and see, if
-    there is new command to be executed
-    """
-    def __init__ (self, parent, Map, cmdfile):
-        Thread.__init__(self)
-
-        global cmdfilename
-
-        self.parent = parent
-        self.map = Map
-        self.cmdfile = open(cmdfile, "r")
-
-    def run(self):
-        """
-        Run this in thread
-        """
-        dispcmd = []
-        while 1:
-            self.parent.redraw = False
-            line = self.cmdfile.readline().strip()
-            if line == "quit":
-                break
-
-            if line:
-                try:
-                    Debug.msg (3, "Command.run(): cmd=%s" % (line))
-
-                    cmd = line.split(" ")
-                    opacity = 1
-                    if " opacity=" in line:
-                        cmd2 = cmd
-                        cmd = []
-                        for c in cmd2:
-                            if c.find("opacity=") == 0:
-                                opacity = float(c.split("=")[1]) / 100
-                            else:
-                                cmd.append(c)
-
-                    self.map.AddLayer(type="raster",
-                                      name='',
-                                      command=cmd,
-                                      l_opacity=opacity)
-
-                    self.parent.redraw =True
-
-                except Exception, e:
-                    print "Command Thread: ",e
-
-            time.sleep(0.1)
-
-        sys.exit()