[GRASS-SVN] r42107 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 4 07:28:01 EDT 2010


Author: martinl
Date: 2010-05-04 07:28:01 -0400 (Tue, 04 May 2010)
New Revision: 42107

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py
Log:
more wxGUI compilation fixes


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py	2010-05-04 10:31:01 UTC (rev 42106)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py	2010-05-04 11:28:01 UTC (rev 42107)
@@ -22,6 +22,11 @@
 import gettext
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
 
+# 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")
+
 sys.path.append(os.path.join(ETCDIR, "python"))
 import grass.script as grass
 
@@ -78,11 +83,6 @@
 # temporal query layer (removed on re-render action)
 QUERYLAYER = 'qlayer'
 
-# 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")
-
 """!Style definition for FlatNotebook pages"""
 FNPageStyle = FN.FNB_VC8 | \
     FN.FNB_BACKGROUND_GRADIENT | \
@@ -161,6 +161,9 @@
 
 def _getGDALFormats():
     """!Get dictionary of avaialble GDAL drivers"""
+    if not grass.find_program('r.in.gdal'):
+        return _parseFormats(None)
+    
     ret = grass.read_command('r.in.gdal',
                              quiet = True,
                              flags = 'f')
@@ -169,6 +172,9 @@
 
 def _getOGRFormats():
     """!Get dictionary of avaialble OGR drivers"""
+    if not grass.find_program('v.in.ogr'):
+        return _parseFormats(None)
+    
     ret = grass.read_command('v.in.ogr',
                              quiet = True,
                              flags = 'f')



More information about the grass-commit mailing list