[GRASS-SVN] r47000 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 5 09:11:57 EDT 2011
Author: martinl
Date: 2011-07-05 06:11:57 -0700 (Tue, 05 Jul 2011)
New Revision: 47000
Removed:
grass/trunk/gui/wxpython/gui_modules/mapdisp_command.py
Modified:
grass/trunk/gui/wxpython/gui_modules/__init__.py
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
Log:
wxGUI: remove unused mapdisp_command.py module
Modified: grass/trunk/gui/wxpython/gui_modules/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/__init__.py 2011-07-05 13:10:15 UTC (rev 46999)
+++ grass/trunk/gui/wxpython/gui_modules/__init__.py 2011-07-05 13:11:57 UTC (rev 47000)
@@ -17,7 +17,6 @@
"histogram.py",
"layertree.py",
"location_wizard.py",
- "mapdisp_command.py",
"mapdisp_window.py",
"mapdisp.py",
"mcalc_builder.py",
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2011-07-05 13:10:15 UTC (rev 46999)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2011-07-05 13:11:57 UTC (rev 47000)
@@ -54,7 +54,6 @@
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 @@
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
Deleted: grass/trunk/gui/wxpython/gui_modules/mapdisp_command.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp_command.py 2011-07-05 13:10:15 UTC (rev 46999)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp_command.py 2011-07-05 13:11:57 UTC (rev 47000)
@@ -1,75 +0,0 @@
-"""
- at package mapdisp.py
-
- at 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.
-
- at 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()
More information about the grass-commit
mailing list