[GRASS-SVN] r30075 - in grass/trunk/gui/wxpython: . gui_modules
icons
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 11 05:51:07 EST 2008
Author: martinl
Date: 2008-02-11 05:51:07 -0500 (Mon, 11 Feb 2008)
New Revision: 30075
Modified:
grass/trunk/gui/wxpython/Makefile
grass/trunk/gui/wxpython/gis_set.py
grass/trunk/gui/wxpython/gui_modules/debug.py
grass/trunk/gui/wxpython/gui_modules/digit.py
grass/trunk/gui/wxpython/gui_modules/gcmd.py
grass/trunk/gui/wxpython/gui_modules/georect.py
grass/trunk/gui/wxpython/gui_modules/globalvar.py
grass/trunk/gui/wxpython/gui_modules/grassenv.py
grass/trunk/gui/wxpython/gui_modules/gselect.py
grass/trunk/gui/wxpython/gui_modules/histogram.py
grass/trunk/gui/wxpython/gui_modules/location_wizard.py
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
grass/trunk/gui/wxpython/gui_modules/menuform.py
grass/trunk/gui/wxpython/gui_modules/preferences.py
grass/trunk/gui/wxpython/gui_modules/profile.py
grass/trunk/gui/wxpython/gui_modules/sqlbuilder.py
grass/trunk/gui/wxpython/gui_modules/toolbars.py
grass/trunk/gui/wxpython/gui_modules/utils.py
grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
grass/trunk/gui/wxpython/icons/icon.py
grass/trunk/gui/wxpython/wxgrass
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: etc directory renamed from 'wx' to 'wxpython'. Use path variable from globalvar module.
Modified: grass/trunk/gui/wxpython/Makefile
===================================================================
--- grass/trunk/gui/wxpython/Makefile 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/Makefile 2008-02-11 10:51:07 UTC (rev 30075)
@@ -1,23 +1,24 @@
MODULE_TOPDIR = ../..
-#SUBDIRS=vdigit docs
+# SUBDIRS=vdigit docs
SUBDIRS = docs
+ETCDIR = $(ETC)/wxpython
include $(MODULE_TOPDIR)/include/Make/Dir.make
default: parsubdirs install_scripts
install_scripts:
- $(MKDIR) $(ETC)/wx $(ETC)/wx/compat $(ETC)/wx/gui_modules $(ETC)/wx/icons $(ETC)/wx/icons/silk $(ETC)/wx/images $(ETC)/wx/scripts $(ETC)/wx/vdigit
- $(INSTALL_DATA) compat/* $(ETC)/wx/compat/
- $(INSTALL_DATA) gui_modules/* $(ETC)/wx/gui_modules/
- $(INSTALL_DATA) icons/*.* $(ETC)/wx/icons/
- $(INSTALL_DATA) icons/silk/* $(ETC)/wx/icons/silk/
- $(INSTALL_DATA) images/* $(ETC)/wx/images/
- $(INSTALL_DATA) scripts/* $(ETC)/wx/scripts/
- $(INSTALL_DATA) gis_set.py wxgui.py README $(ETC)/wx/
-# $(INSTALL_DATA) vdigit/_grass6_wxvdigit.so $(ETC)/wx/vdigit/
-# $(INSTALL_DATA) vdigit/grass6_wxvdigit.py $(ETC)/wx/vdigit/
+ $(MKDIR) $(ETCDIR) $(ETCDIR)/compat $(ETCDIR)/gui_modules $(ETCDIR)/icons $(ETCDIR)/icons/silk $(ETCDIR)/images $(ETCDIR)/scripts $(ETCDIR)/vdigit
+ $(INSTALL_DATA) compat/* $(ETCDIR)/compat/
+ $(INSTALL_DATA) gui_modules/* $(ETCDIR)/gui_modules/
+ $(INSTALL_DATA) icons/*.* $(ETCDIR)/icons/
+ $(INSTALL_DATA) icons/silk/* $(ETCDIR)/icons/silk/
+ $(INSTALL_DATA) images/* $(ETCDIR)/images/
+ $(INSTALL_DATA) scripts/* $(ETCDIR)/scripts/
+ $(INSTALL_DATA) gis_set.py wxgui.py README $(ETCDIR)/
+# $(INSTALL_DATA) vdigit/_grass6_wxvdigit.so $(ETCDIR)/vdigit/
+# $(INSTALL_DATA) vdigit/grass6_wxvdigit.py $(ETCDIR)/vdigit/
$(INSTALL) -m 755 wxgrass $(GISBASE)/scripts/
clean: cleansubdirs
Modified: grass/trunk/gui/wxpython/gis_set.py
===================================================================
--- grass/trunk/gui/wxpython/gis_set.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gis_set.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -26,6 +26,7 @@
import shutil
from gui_modules import utils
+from gui_modules import globalvar
utils.ImportWx()
import wx.html
@@ -56,7 +57,7 @@
#
# image
try:
- name = os.path.join(self.gisbase, "etc", "gintro.gif")
+ name = os.path.join(globalvar.ETCDIR, "gintro.gif")
self.hbitmap = wx.StaticBitmap(self, wx.ID_ANY,
wx.Bitmap(name=name,
type=wx.BITMAP_TYPE_GIF))
@@ -67,7 +68,7 @@
### crashes when LOCATION doesn't exist
# versionCmd = gcmd.Command(['g.version'], log=None)
# grassVersion = versionCmd.ReadStdOutput()[0].replace('GRASS', '').strip()
- versionFile = open(os.path.join(self.gisbase, "etc", "VERSIONNUMBER"))
+ versionFile = open(os.path.join(globalvar.ETCDIR, "VERSIONNUMBER"))
grassVersion = versionFile.readline().replace('%s' % os.linesep, '').strip()
versionFile.close()
@@ -160,7 +161,7 @@
def _set_properties(self):
"""Set frame properties"""
self.SetTitle(_("Welcome to GRASS GIS"))
- self.SetIcon(wx.Icon(os.path.join(self.gisbase, "etc", "dm", "grass.gif"),
+ self.SetIcon(wx.Icon(os.path.join(globalvar.ETCDIR, "dm", "grass.gif"),
wx.BITMAP_TYPE_GIF))
self.lwelcome.SetForegroundColour(wx.Colour(35, 142, 35))
Modified: grass/trunk/gui/wxpython/gui_modules/debug.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/debug.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/debug.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -21,8 +21,7 @@
import os
import sys
-gmpath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "gui_modules")
-sys.path.append(gmpath)
+import globalvar
class DebugMsg:
"""
Modified: grass/trunk/gui/wxpython/gui_modules/digit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/digit.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/digit.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -44,15 +44,17 @@
import gcmd
import dbm
from debug import Debug as Debug
-import gselect
+import gselect
+import globalvar
from preferences import globalSettings as UserSettings
try:
- digitPath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "vdigit")
+ digitPath = os.path.join(globalvar.ETCWXDIR, "vdigit")
sys.path.append(digitPath)
import grass6_wxvdigit as vdigit
GV_LINES = vdigit.GV_LINES
except ImportError, err:
GV_LINES = None
+ print err
# print >> sys.stderr, "%sWARNING: Digitization tool is disabled (%s). " \
# "Detailed information in README file." % \
# (os.linesep, err)
Modified: grass/trunk/gui/wxpython/gui_modules/gcmd.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gcmd.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/gcmd.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -25,10 +25,13 @@
import sys
import time
import errno
+
+import wx
+
try:
import subprocess
except:
- compatPath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "compat")
+ compatPath = os.path.join(globalvar.ETCWXDIR, "compat")
sys.path.append(compatPath)
import subprocess
if subprocess.mswindows:
@@ -40,10 +43,6 @@
import fcntl
from threading import Thread
-import wx
-
-guiModulePath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "gui_modules")
-sys.path.append(guiModulePath)
# import wxgui_utils # log window
from debug import Debug as Debug
Modified: grass/trunk/gui/wxpython/gui_modules/georect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/georect.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/georect.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -27,13 +27,6 @@
import tempfile
import shutil
-try:
- import subprocess # Not needed if GRASS commands could actually be quiet
-except:
- CompatPath = os.path.join( os.getenv("GISBASE"),"etc","wx")
- sys.path.append(CompatPath)
- from compat import subprocess
-
import wx
import wx.aui
import wx.lib.filebrowsebutton as filebrowse
@@ -43,11 +36,7 @@
from threading import Thread
-gmpath = os.path.join( os.getenv("GISBASE"),"etc","wx","gui_modules" )
-sys.path.append(gmpath)
-gmpath = os.path.join( os.getenv("GISBASE"),"etc","wx","icons" )
-sys.path.append(gmpath)
-
+import globalvar
import mapdisp
import render
import toolbars
@@ -60,6 +49,16 @@
from debug import Debug as Debug
from icon import Icons as Icons
+try:
+ import subprocess # Not needed if GRASS commands could actually be quiet
+except:
+ CompatPath = globalvar.ETCWXDIR
+ sys.path.append(CompatPath)
+ from compat import subprocess
+
+gmpath = os.path.join(globalvar.ETCWXDIR, "icons")
+sys.path.append(gmpath)
+
import images
imagepath = images.__path__[0]
sys.path.append(imagepath)
@@ -107,7 +106,7 @@
#
# file = "loc_wizard.png"
#file = "loc_wizard_qgis.png"
- #imagePath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "images",
+ #imagePath = os.path.join(globalvar.ETCWXDIR, "images",
# file)
#wizbmp = wx.Image(imagePath, wx.BITMAP_TYPE_PNG)
## wizbmp.Rescale(250,600)
Modified: grass/trunk/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/globalvar.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/globalvar.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -16,6 +16,8 @@
for details.
"""
+import os
+
import wx
import wx.lib.flatnotebook as FN
@@ -23,8 +25,13 @@
Query layer (generated for example by selecting item in the Attribute Table Manager)
Deleted automatically on re-render action
"""
+# temporal query layer (removed on re-render action)
QUERYLAYER = 'qlayer'
+# path to python scripts
+ETCDIR = os.path.join(os.getenv("GISBASE"), "etc")
+ETCWXDIR = os.path.join(ETCDIR, "wxpython")
+
"""Style definition for FlatNotebook pages"""
FNPageStyle = FN.FNB_VC8 | \
FN.FNB_BACKGROUND_GRADIENT | \
Modified: grass/trunk/gui/wxpython/gui_modules/grassenv.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/grassenv.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/grassenv.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -17,15 +17,15 @@
import os
import sys
+import globalvar
+
try:
import subprocess
except:
- CompatPath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "compat")
+ CompatPath = os.path.join(globalvar.ETCWXDIR, "compat")
sys.path.append(CompatPath)
import subprocess
-# gmpath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "gui_modules")
-# sys.path.append(gmpath)
# import gcmd
def GetGRASSVariable(var):
Modified: grass/trunk/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gselect.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/gselect.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -21,9 +21,6 @@
import wx
import wx.combo
-GuiModulePath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "gui_modules")
-sys.path.append(GuiModulePath)
-
import gcmd
class SelectDialog(wx.Dialog):
Modified: grass/trunk/gui/wxpython/gui_modules/histogram.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/histogram.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/histogram.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -21,17 +21,16 @@
import os, sys, time, glob, math
from threading import Thread
+import globalvar
try:
import subprocess
except:
- CompatPath = os.path.join( os.getenv("GISBASE"), "etc", "wx")
+ CompatPath = os.path.join(globalvar.ETCWXDIR)
sys.path.append(CompatPath)
from compat import subprocess
-gmpath = os.path.join( os.getenv("GISBASE"),"etc","wx","gui_modules" )
+gmpath = os.path.join(globalvar.ETCWXDIR, "icons")
sys.path.append(gmpath)
-gmpath = os.path.join( os.getenv("GISBASE"),"etc","wx","icons")
-sys.path.append(gmpath)
import render
import menuform
Modified: grass/trunk/gui/wxpython/gui_modules/location_wizard.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/location_wizard.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/location_wizard.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -42,9 +42,12 @@
import wx.wizard as wiz
import gcmd
+import globalvar
try:
import subprocess
except:
+ CompatPath = os.path.join(globalvar.ETCWXDIR)
+ sys.path.append(CompatPath)
from compat import subprocess
global coordsys
@@ -1523,8 +1526,7 @@
#
# file = "loc_wizard.png"
file = "loc_wizard_qgis.png"
- imagePath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "images",
- file)
+ imagePath = os.path.join(globalvar.ETCWXDIR, "images", file)
wizbmp = wx.Image(imagePath, wx.BITMAP_TYPE_PNG)
# wizbmp.Rescale(250,600)
wizbmp = wizbmp.ConvertToBitmap()
@@ -1642,7 +1644,7 @@
def __readData(self):
"""Get georeferencing information from tables in $GISBASE/etc"""
# read projection definitions
- f = open(os.path.join(os.getenv("GISBASE"), "etc", "projections"), "r")
+ f = open(os.path.join(globalvar.ETCDIR, "projections"), "r")
self.projections = {}
for line in f.readlines():
line = line.expandtabs(1)
@@ -1654,7 +1656,7 @@
f.close()
# read datum definitions
- f = open(os.path.join(os.getenv("GISBASE"), "etc", "datum.table"), "r")
+ f = open(os.path.join(globalvar.ETCDIR "datum.table"), "r")
self.datums = {}
paramslist = []
for line in f.readlines():
@@ -1672,7 +1674,7 @@
f.close()
# read datum transforms parameters
- f = open(os.path.join(os.getenv("GISBASE"), "etc", "datumtransform.table"), "r")
+ f = open(os.path.join(globalvar.ETCDIR, "datumtransform.table"), "r")
self.transforms = {}
j = 1
for line in f.readlines():
@@ -1700,7 +1702,7 @@
f.close()
# read ellipsiod definitions
- f = open(os.path.join(os.getenv("GISBASE"), "etc", "ellipse.table"), "r")
+ f = open(os.path.join(globalvar.ETCDIR, "ellipse.table"), "r")
self.ellipsoids = {}
for line in f.readlines():
line = line.expandtabs(1)
@@ -2035,7 +2037,7 @@
#
# image
#
- self.img = wx.Image(os.path.join(os.getenv("GISBASE"), "etc", "wx", "images",
+ self.img = wx.Image(os.path.join(globalvar.ETCWXDIR, "images",
"qgis_world.png"), wx.BITMAP_TYPE_PNG).ConvertToBitmap()
#
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -39,16 +39,16 @@
import wx.aui
from threading import Thread
+import globalvar
try:
import subprocess
except:
- CompatPath = os.path.join( os.getenv("GISBASE"), "etc", "wx")
+ CompatPath = os.path.join(globalvar.ETCWXDIR)
sys.path.append(CompatPath)
from compat import subprocess
-for gmpath in [os.path.join( os.getenv("GISBASE"), "etc", "wx", "gui_modules" ),
- os.path.join( os.getenv("GISBASE"), "etc", "wx", "icons" )]:
- sys.path.append(gmpath)
+gmpath = os.path.join(globalvar.ETCWXDIR, "icons")
+sys.path.append(gmpath)
import render
import toolbars
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -70,12 +70,13 @@
gettext.install("wxgrass")
gisbase = os.getenv("GISBASE")
+import globalvar
if gisbase is None:
print >>sys.stderr, "We don't seem to be properly installed, or we are being run outside GRASS. Expect glitches."
gisbase = os.path.join(os.path.dirname( sys.argv[0] ), os.path.pardir)
wxbase = gisbase
else:
- wxbase = os.path.join(gisbase,"etc","wx")
+ wxbase = os.path.join(globalvar.ETCWXDIR)
sys.path.append( wxbase)
imagepath = os.path.join(wxbase,"images")
@@ -84,7 +85,6 @@
import grassenv
import gselect
import gcmd
-import globalvar
try:
import subprocess
except:
@@ -1222,13 +1222,12 @@
Note: 'cmd' is given as string
"""
- gmpath = os.path.join(gisbase, "etc")
cmdout = os.popen(cmd + r' --interface-description', "r").read()
if not len(cmdout) > 0 :
raise IOError, _("Couldn't fetch interface description for command <%s>.") % cmd
p = re.compile( '(grass-interface.dtd)')
p.search( cmdout )
- cmdout = p.sub( gmpath+r'/grass-interface.dtd', cmdout)
+ cmdout = p.sub(globalvar.ETCDIR + r'/grass-interface.dtd', cmdout)
return cmdout
class GrassGUIApp(wx.App):
Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -26,9 +26,6 @@
import wx.lib.filebrowsebutton as filebrowse
from wx.lib.wordwrap import wordwrap
-gmpath = os.path.join( os.getenv("GISBASE"), "etc", "wx", "gui_modules")
-sys.path.append(gmpath)
-
import gcmd
import grassenv
Modified: grass/trunk/gui/wxpython/gui_modules/profile.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/profile.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/profile.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -34,17 +34,16 @@
from threading import Thread
+import globalvar
try:
import subprocess
except:
- CompatPath = os.path.join( os.getenv("GISBASE"),"etc","wx")
+ CompatPath = os.path.join(globalvar.ETCWXDIR)
sys.path.append(CompatPath)
from compat import subprocess as subprocess
-gmpath = os.getenv("GISBASE") + "/etc/wx/gui_modules/"
+gmpath = os.path.join(globalvar.ETCWXDIR, "icons")
sys.path.append(gmpath)
-gmpath = os.getenv("GISBASE") + "/etc/wx/icons/"
-sys.path.append(gmpath)
import render
import menuform
Modified: grass/trunk/gui/wxpython/gui_modules/sqlbuilder.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/sqlbuilder.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/sqlbuilder.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -26,8 +26,9 @@
import grassenv
import gcmd
+import globalvar
-imagePath = os.path.join( os.getenv("GISBASE"), "etc", "wx")
+imagePath = os.path.join(globalvar.ETCWXDIR)
sys.path.append(imagePath)
import images
imagepath = images.__path__[0]
Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -20,9 +20,7 @@
import wx
import os, sys
-gmpath = os.path.join( os.getenv("GISBASE"),"etc","wx","icons")
-sys.path.append(gmpath)
-
+import globalvar
import gcmd
import grassenv
import digit
@@ -30,6 +28,9 @@
from debug import Debug as Debug
from icon import Icons as Icons
+gmpath = os.path.join(globalvar.ETCWXDIR, "icons")
+sys.path.append(gmpath)
+
class AbstractToolbar:
"""Abstract toolbar class"""
def __init__():
Modified: grass/trunk/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/utils.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/utils.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -17,9 +17,6 @@
import os
import sys
-gmpath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "gui_modules")
-sys.path.append(gmpath)
-
import gcmd
def GetTempfile(pref=None):
Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -36,9 +36,6 @@
import wx.stc
import wx.lib.newevent
-gmpath = os.path.join( os.getenv("GISBASE"),"etc","wx","gui_modules" )
-sys.path.append(gmpath)
-
import menuform
import mapdisp
import render
Modified: grass/trunk/gui/wxpython/icons/icon.py
===================================================================
--- grass/trunk/gui/wxpython/icons/icon.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/icons/icon.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -22,10 +22,11 @@
import wx
-gmPath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "gui_modules")
+gmPath = os.path.join(os.getenv("GISBASE"), "etc", "wxpython", "gui_modules")
sys.path.append(gmPath)
import grassenv
+import globalvar
from preferences import globalSettings as UserSettings
# iconpath = grassenv.GetGRASSVariable('GRASS_ICONPATH')
@@ -33,12 +34,12 @@
# iconpath = os.getenv("GRASS_ICONPATH")
iconTheme = UserSettings.Get('iconTheme')
if iconTheme and iconTheme == 'silk':
- iconpath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "icons", "silk")
+ iconpath = os.path.join(globalvar.ETCWXDIR, "icons", "silk")
else:
iconpath = None
-iconpath_default = os.path.join(os.getenv("GISBASE"), "etc", "gui", "icons")
-iconpath_vdigit = os.path.join(os.getenv("GISBASE"), "etc", "v.digit")
+iconpath_default = os.path.join(globalvar.ETCDIR, "gui", "icons")
+iconpath_vdigit = os.path.join(globalvar.ETCDIR, "v.digit")
icons_default = {
# map display
Modified: grass/trunk/gui/wxpython/wxgrass
===================================================================
--- grass/trunk/gui/wxpython/wxgrass 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/wxgrass 2008-02-11 10:51:07 UTC (rev 30075)
@@ -5,17 +5,11 @@
exit 1
fi
-#SYSTEM=`uname -s`
-
-#if [ "$SYSTEM" = "Darwin" ] ; then
-# pythonw "$GISBASE/etc/wx/wxgui.py" -name wxgui_py
-#else
if [ ! -z "$1" ] ; then
# load workspace file
- python "$GISBASE/etc/wx/wxgui.py" "--workspace" "$1" &
+ python "$GISBASE/etc/wxpython/wxgui.py" "--workspace" "$1" &
else
- python "$GISBASE/etc/wx/wxgui.py" &
+ python "$GISBASE/etc/wxpython/wxgui.py" &
fi
-#fi
exit 0
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2008-02-11 09:34:42 UTC (rev 30074)
+++ grass/trunk/gui/wxpython/wxgui.py 2008-02-11 10:51:07 UTC (rev 30075)
@@ -511,8 +511,7 @@
Return False on error"""
# dtd
- gisbase = os.getenv("GISBASE")
- dtdFilename = os.path.join(gisbase, "etc", "wx", "gui_modules", "grass-grc.dtd")
+ dtdFilename = os.path.join(globalvar.ETCWXDIR, "gui_modules", "grass-grc.dtd")
# validate xml agains dtd
# dtd = xmldtd.load_dtd(dtdFilename)
@@ -1251,7 +1250,7 @@
wx.InitAllImageHandlers()
# create splash screen
- introImagePath = os.path.join(os.getenv("GISBASE"), "etc", "wx", "images", "intro.png")
+ introImagePath = os.path.join(globalvar.ETCWXDIR, "images", "intro.png")
introImage = wx.Image(introImagePath, wx.BITMAP_TYPE_PNG)
introBmp = introImage.ConvertToBitmap()
wx.SplashScreen (bitmap=introBmp, splashStyle=wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
More information about the grass-commit
mailing list