[GRASS-SVN] r41557 - in grass/trunk: general/g.gui gui/wxpython
gui/wxpython/gui_modules gui/wxpython/nviz
gui/wxpython/vdigit lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 26 07:48:46 EDT 2010
Author: martinl
Date: 2010-03-26 07:48:46 -0400 (Fri, 26 Mar 2010)
New Revision: 41557
Modified:
grass/trunk/general/g.gui/main.c
grass/trunk/gui/wxpython/Makefile
grass/trunk/gui/wxpython/gis_set.py
grass/trunk/gui/wxpython/gui_modules/globalvar.py
grass/trunk/gui/wxpython/gui_modules/menudata.py
grass/trunk/gui/wxpython/nviz/Makefile
grass/trunk/gui/wxpython/vdigit/Makefile
grass/trunk/lib/init/grass.py
Log:
etc/wxpython -> etc/gui/wxpython
Modified: grass/trunk/general/g.gui/main.c
===================================================================
--- grass/trunk/general/g.gui/main.c 2010-03-26 11:00:40 UTC (rev 41556)
+++ grass/trunk/general/g.gui/main.c 2010-03-26 11:48:46 UTC (rev 41557)
@@ -104,7 +104,7 @@
G_debug(1, "Attempting to start '%s' GUI ...", type->answer);
if (strcmp(type->answer, "wxpython") == 0) {
- sprintf(progname, "%s/etc/wxpython/wxgui.py", G_gisbase());
+ sprintf(progname, "%s/etc/gui/wxpython/wxgui.py", G_gisbase());
if (rc_file->answer) {
G_spawn_ex(getenv("GRASS_PYTHON"), progname, progname,
"--workspace", rc_file->answer, SF_BACKGROUND, NULL);
Modified: grass/trunk/gui/wxpython/Makefile
===================================================================
--- grass/trunk/gui/wxpython/Makefile 2010-03-26 11:00:40 UTC (rev 41556)
+++ grass/trunk/gui/wxpython/Makefile 2010-03-26 11:48:46 UTC (rev 41557)
@@ -8,7 +8,7 @@
include $(MODULE_TOPDIR)/include/Make/Doxygen.make
include $(MODULE_TOPDIR)/include/Make/Python.make
-ETCDIR = $(ETC)/wxpython
+ETCDIR = $(ETC)/gui/wxpython
SRCFILES := $(wildcard scripts/p.* compat/* gui_modules/* icons/*.* icons/silk/* images/* xml/*) gis_set.py wxgui.py README
DSTFILES := $(patsubst %,$(ETCDIR)/%,$(SRCFILES)) $(patsubst %.py,$(ETCDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
Modified: grass/trunk/gui/wxpython/gis_set.py
===================================================================
--- grass/trunk/gui/wxpython/gis_set.py 2010-03-26 11:00:40 UTC (rev 41556)
+++ grass/trunk/gui/wxpython/gis_set.py 2010-03-26 11:48:46 UTC (rev 41557)
@@ -715,7 +715,7 @@
def OnExit(self, event):
"""'Exit' button clicked"""
self.Destroy()
- sys.exit (2)
+ sys.exit(2)
def OnHelp(self, event):
"""'Help' button clicked"""
Modified: grass/trunk/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/globalvar.py 2010-03-26 11:00:40 UTC (rev 41556)
+++ grass/trunk/gui/wxpython/gui_modules/globalvar.py 2010-03-26 11:48:46 UTC (rev 41557)
@@ -79,7 +79,7 @@
# path to python scripts
ETCDIR = os.path.join(os.getenv("GISBASE"), "etc")
ETCICONDIR = os.path.join(os.getenv("GISBASE"), "etc", "gui", "icons")
-ETCWXDIR = os.path.join(ETCDIR, "wxpython")
+ETCWXDIR = os.path.join(ETCDIR, "gui", "wxpython")
"""!Style definition for FlatNotebook pages"""
FNPageStyle = FN.FNB_VC8 | \
Modified: grass/trunk/gui/wxpython/gui_modules/menudata.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menudata.py 2010-03-26 11:00:40 UTC (rev 41556)
+++ grass/trunk/gui/wxpython/gui_modules/menudata.py 2010-03-26 11:48:46 UTC (rev 41557)
@@ -36,12 +36,14 @@
except ImportError:
import elementtree.ElementTree as etree # Python <= 2.4
+import globalvar
+
class Data:
'''!Data object that returns menu descriptions to be used in wxgui.py.'''
def __init__(self, filename=None):
if not filename:
gisbase = os.getenv('GISBASE')
- filename = os.path.join(gisbase, 'etc', 'wxpython', 'xml', 'menudata.xml')
+ filename = os.path.join(globalvar.ETCWXDIR, 'xml', 'menudata.xml')
self.tree = etree.parse(filename)
def getMenuItem(self, mi):
Modified: grass/trunk/gui/wxpython/nviz/Makefile
===================================================================
--- grass/trunk/gui/wxpython/nviz/Makefile 2010-03-26 11:00:40 UTC (rev 41556)
+++ grass/trunk/gui/wxpython/nviz/Makefile 2010-03-26 11:48:46 UTC (rev 41557)
@@ -13,7 +13,7 @@
SHLIB = $(OBJDIR)/_$(LIB_NAME).so
-ETCDIR = $(ETC)/wxpython
+ETCDIR = $(ETC)/gui/wxpython
EXTRA_CLEAN_FILES = $(LIB_NAME).i $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
Modified: grass/trunk/gui/wxpython/vdigit/Makefile
===================================================================
--- grass/trunk/gui/wxpython/vdigit/Makefile 2010-03-26 11:00:40 UTC (rev 41556)
+++ grass/trunk/gui/wxpython/vdigit/Makefile 2010-03-26 11:48:46 UTC (rev 41557)
@@ -13,7 +13,7 @@
SHLIB = $(OBJDIR)/_$(LIB_NAME).so
-ETCDIR = $(ETC)/wxpython
+ETCDIR = $(ETC)/gui/wxpython
EXTRA_CLEAN_FILES = $(LIB_NAME).i $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2010-03-26 11:00:40 UTC (rev 41556)
+++ grass/trunk/lib/init/grass.py 2010-03-26 11:48:46 UTC (rev 41557)
@@ -15,7 +15,7 @@
# command line options for setting the GISDBASE, LOCATION, and/or
# MAPSET. Finally it starts GRASS with the appropriate user
# interface and cleans up after it is finished.
-# COPYRIGHT: (C) 2000-2009 by the GRASS Development Team
+# COPYRIGHT: (C) 2000-2010 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
@@ -364,7 +364,7 @@
p.wait()
if p.returncode == 0:
# Set the wxpython base directory
- wxpython_base = gfile("etc","wxpython")
+ wxpython_base = gfile("etc", "gui", "wxpython")
else:
# Python was not found - switch to text interface mode
message(
@@ -469,8 +469,6 @@
def gui_startup():
if grass_gui == 'wxpython':
- # eval `foo` will return subshell return code and not app foo return code!!!
- # eval '"$GRASS_PYTHON" "$WXPYTHONGRASSBASE/gis_set.py"'
thetest = call([os.getenv('GRASS_PYTHON'), os.path.join(wxpython_base, "gis_set.py")])
if thetest == 0:
@@ -595,7 +593,7 @@
# Check for gui interface
if grass_gui == "wxpython":
subprocess.Popen([os.getenv('GRASS_PYTHON'),
- gfile("etc", "wxpython", "wxgui.py")])
+ gfile(wxpython_base, "wxgui.py")])
def clear_screen():
if windows:
More information about the grass-commit
mailing list