[GRASS-SVN] r46045 - in grass/branches/develbranch_6/gui/wxpython: . gui_modules icons scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 19 17:20:44 EDT 2011


Author: martinl
Date: 2011-04-19 14:20:44 -0700 (Tue, 19 Apr 2011)
New Revision: 46045

Modified:
   grass/branches/develbranch_6/gui/wxpython/gis_set.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm_dialogs.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/sqlbuilder.py
   grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py
   grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py
   grass/branches/develbranch_6/gui/wxpython/icons/icon.py
   grass/branches/develbranch_6/gui/wxpython/scripts/vkrige.py
   grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: fix check for mininal wxPython version
       (merge r46042 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gis_set.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gis_set.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -33,13 +33,6 @@
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
 
 from gui_modules import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
-
-import gui_modules.goutput
-from gui_modules.ghelp import HelpFrame
-from gui_modules.gcmd  import GMessage
-
 import wx
 import wx.html
 import wx.lib.rcsizer as rcs
@@ -47,6 +40,10 @@
 import wx.lib.mixins.listctrl as listmix
 import wx.lib.scrolledpanel as scrolled
 
+from gui_modules import goutput
+from gui_modules.ghelp import HelpFrame
+from gui_modules.gcmd  import GMessage
+
 sys.stderr = codecs.getwriter('utf8')(sys.stderr)
 
 class GRASSStartup(wx.Frame):

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -40,9 +40,6 @@
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
-
 import wx
 import wx.lib.mixins.listctrl as listmix
 import wx.lib.flatnotebook as FN

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm_dialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm_dialogs.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm_dialogs.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -19,9 +19,6 @@
 import os
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
-
 import wx
 import wx.lib.scrolledpanel as scrolled
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -26,8 +26,6 @@
 import platform
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
 import wx
 import wx.aui
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -49,16 +49,17 @@
     global check
     if not check:
         return
-    
     minVersion = [2, 8, 1, 1]
     try:
         try:
             import wxversion
         except ImportError, e:
             raise ImportError(e)
-        wxversion.select(str(minVersion[0]) + '.' + str(minVersion[1]))
+        # wxversion.select(str(minVersion[0]) + '.' + str(minVersion[1]))
+        wxversion.ensureMinimal(str(minVersion[0]) + '.' + str(minVersion[1]))
         import wx
         version = wx.version().split(' ')[0]
+        
         if map(int, version.split('.')) < minVersion:
             raise ValueError('Your wxPython version is %s.%s.%s.%s' % tuple(version.split('.')))
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -56,8 +56,6 @@
     import elementtree.ElementTree as etree # Python <= 2.4
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
 import wx
 import wx.lib.ogl             as ogl
 import wx.lib.flatnotebook    as FN

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -30,6 +30,10 @@
 import wx.combo
 import wx.lib.newevent
 import wx.lib.buttons  as  buttons
+try:
+    import treemixin 
+except ImportError:
+    from wx.lib.mixins import treemixin
 
 import globalvar
 
@@ -48,15 +52,6 @@
 from preferences import globalSettings as UserSettings
 from vdigit import haveVDigit
 from gcmd import GWarning
-try:
-    import subprocess
-except:
-    from compat import subprocess
-    
-try:
-    import treemixin 
-except ImportError:
-    from wx.lib.mixins import treemixin
 
 TREE_ITEM_HEIGHT = 25
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -32,8 +32,6 @@
 import copy
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
 import wx
 import wx.aui
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -21,8 +21,6 @@
 import time
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
 import wx
 
 import grass.script as grass

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -58,9 +58,6 @@
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
-
 import wx
 import wx.html
 try:

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/sqlbuilder.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/sqlbuilder.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/sqlbuilder.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -33,9 +33,6 @@
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
-
 import wx
 
 import grass.script as grass

Modified: grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -7,7 +7,7 @@
 
 import os
 
-import globalvar
+from gui_modules import globalvar
 
 iconPath = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass2")
 

Modified: grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -4,10 +4,8 @@
 
 import os
 
-import wx
+from gui_modules import globalvar
 
-import globalvar
-
 iconPath = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass")
 iconPathVDigit  = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass", "edit")
 

Modified: grass/branches/develbranch_6/gui/wxpython/icons/icon.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/icon.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/icons/icon.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -24,12 +24,9 @@
 
 sys.path.append(os.path.join(os.getenv("GISBASE"), "etc", "wxpython", "gui_modules"))
 
-import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
 import wx
 
-from preferences import globalSettings as UserSettings
+from gui_modules.preferences import globalSettings as UserSettings
 
 import grass2_icons # default icon set
 iconPathDefault = grass2_icons.iconPath

Modified: grass/branches/develbranch_6/gui/wxpython/scripts/vkrige.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/scripts/vkrige.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/scripts/vkrige.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -37,8 +37,6 @@
 sys.path.append(GUIModulesPath)
 
 import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
 import gselect
 import goutput
 import menuform

Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2011-04-19 20:36:21 UTC (rev 46044)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2011-04-19 21:20:44 UTC (rev 46045)
@@ -28,7 +28,7 @@
 import signal
 import tempfile
 
-### XML 
+### XML
 try:
     import xml.etree.ElementTree as etree
 except ImportError:
@@ -38,13 +38,7 @@
 import gettext
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
 
-import gui_modules
-sys.path.append(gui_modules.__path__[0])
-
-import gui_modules.globalvar as globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
-    globalvar.CheckForWx()
-
+from gui_modules import globalvar
 import wx
 import wx.aui
 import wx.combo
@@ -65,33 +59,31 @@
 sys.path.append(os.path.join(globalvar.ETCDIR, "python"))
 from grass.script import core as grass
 
-import gui_modules.utils as utils
-import gui_modules.preferences as preferences
-import gui_modules.layertree as layertree
-import gui_modules.mapdisp as mapdisp
-import gui_modules.menudata as menudata
-import gui_modules.menuform as menuform
-import gui_modules.histogram as histogram
-import gui_modules.profile as profile
-import gui_modules.mcalc_builder as mapcalculator
-import gui_modules.gcmd as gcmd
-import gui_modules.dbm as dbm
-import gui_modules.workspace as workspace
-import gui_modules.goutput as goutput
-import gui_modules.gdialogs as gdialogs
-import gui_modules.colorrules as colorrules
-import gui_modules.ogc_services as ogc_services
-import gui_modules.prompt as prompt
-import gui_modules.menu as menu
-import gui_modules.gmodeler as gmodeler
-import gui_modules.vclean as vclean
-import gui_modules.nviz_tools as nviz_tools
-from   gui_modules.debug import Debug
-from   gui_modules.ghelp import MenuTreeWindow
-from   gui_modules.ghelp import AboutWindow
-from   gui_modules.ghelp import InstallExtensionWindow
-from   gui_modules.toolbars import LayerManagerToolbar
-from   icons.icon import Icons
+from gui_modules import utils
+from gui_modules import preferences
+from gui_modules import layertree
+from gui_modules import mapdisp
+from gui_modules import menudata
+from gui_modules import menuform
+from gui_modules import histogram
+from gui_modules import profile
+from gui_modules import mcalc_builder as mapcalculator
+from gui_modules import gcmd
+from gui_modules import dbm
+from gui_modules import workspace
+from gui_modules import goutput
+from gui_modules import gdialogs
+from gui_modules import colorrules
+from gui_modules import ogc_services
+from gui_modules import prompt
+from gui_modules import menu
+from gui_modules import gmodeler
+from gui_modules import vclean
+from gui_modules import nviz_tools
+from gui_modules.debug import Debug
+from gui_modules.ghelp import MenuTreeWindow, AboutWindow, InstallExtensionWindow
+from gui_modules.toolbars import LayerManagerToolbar
+from icons.icon import Icons
 
 UserSettings = preferences.globalSettings
 



More information about the grass-commit mailing list