[GRASS-SVN] r46042 - in grass/trunk/gui/wxpython: . gui_modules
icons scripts
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 19 16:11:18 EDT 2011
Author: martinl
Date: 2011-04-19 13:11:18 -0700 (Tue, 19 Apr 2011)
New Revision: 46042
Modified:
grass/trunk/gui/wxpython/gis_set.py
grass/trunk/gui/wxpython/gui_modules/dbm.py
grass/trunk/gui/wxpython/gui_modules/dbm_dialogs.py
grass/trunk/gui/wxpython/gui_modules/gcpmapdisp.py
grass/trunk/gui/wxpython/gui_modules/globalvar.py
grass/trunk/gui/wxpython/gui_modules/gmodeler.py
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
grass/trunk/gui/wxpython/gui_modules/menuform.py
grass/trunk/gui/wxpython/gui_modules/sqlbuilder.py
grass/trunk/gui/wxpython/icons/grass_icons.py
grass/trunk/gui/wxpython/icons/icon.py
grass/trunk/gui/wxpython/scripts/vkrige.py
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: fix check for mininal wxPython version
Modified: grass/trunk/gui/wxpython/gis_set.py
===================================================================
--- grass/trunk/gui/wxpython/gis_set.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gis_set.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -36,7 +36,7 @@
if not os.getenv("GRASS_WXBUNDLED"):
globalvar.CheckForWx()
-import gui_modules.goutput
+from gui_modules import goutput
from gui_modules.ghelp import HelpFrame
from gui_modules.gcmd import GMessage
Modified: grass/trunk/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/dbm.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gui_modules/dbm.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -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/trunk/gui/wxpython/gui_modules/dbm_dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/dbm_dialogs.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gui_modules/dbm_dialogs.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -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/trunk/gui/wxpython/gui_modules/gcpmapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gcpmapdisp.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gui_modules/gcpmapdisp.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -26,8 +26,6 @@
import platform
import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
- globalvar.CheckForWx()
import wx
import wx.aui
Modified: grass/trunk/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/globalvar.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gui_modules/globalvar.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -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/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -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/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -32,8 +32,6 @@
import copy
import globalvar
-if not os.getenv("GRASS_WXBUNDLED"):
- globalvar.CheckForWx()
import wx
import wx.aui
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -63,9 +63,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/trunk/gui/wxpython/gui_modules/sqlbuilder.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/sqlbuilder.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/gui_modules/sqlbuilder.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -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/trunk/gui/wxpython/icons/grass_icons.py
===================================================================
--- grass/trunk/gui/wxpython/icons/grass_icons.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/icons/grass_icons.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -7,7 +7,7 @@
import os
-import globalvar
+from gui_modules import globalvar
iconPath = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass")
Modified: grass/trunk/gui/wxpython/icons/icon.py
===================================================================
--- grass/trunk/gui/wxpython/icons/icon.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/icons/icon.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -23,12 +23,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
# default icon set
import grass_icons
Modified: grass/trunk/gui/wxpython/scripts/vkrige.py
===================================================================
--- grass/trunk/gui/wxpython/scripts/vkrige.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/scripts/vkrige.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -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/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2011-04-19 09:17:35 UTC (rev 46041)
+++ grass/trunk/gui/wxpython/wxgui.py 2011-04-19 20:11:18 UTC (rev 46042)
@@ -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