[GRASS-SVN] r46055 - in grass/trunk/gui/wxpython: . gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 21 03:31:24 EDT 2011
Author: martinl
Date: 2011-04-21 00:31:24 -0700 (Thu, 21 Apr 2011)
New Revision: 46055
Modified:
grass/trunk/gui/wxpython/gis_set_error.py
grass/trunk/gui/wxpython/gui_modules/layertree.py
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: fix importing optional modules
Modified: grass/trunk/gui/wxpython/gis_set_error.py
===================================================================
--- grass/trunk/gui/wxpython/gis_set_error.py 2011-04-21 06:16:29 UTC (rev 46054)
+++ grass/trunk/gui/wxpython/gis_set_error.py 2011-04-21 07:31:24 UTC (rev 46055)
@@ -3,7 +3,7 @@
GRASS start-up screen error message.
-(C) 2010 by the GRASS Development Team
+(C) 2010-2011 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 for details.
@@ -14,7 +14,7 @@
import os
import sys
-import gui_modules.globalvar as globalvar
+from gui_modules import globalvar
import wx
def main():
Modified: grass/trunk/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/layertree.py 2011-04-21 06:16:29 UTC (rev 46054)
+++ grass/trunk/gui/wxpython/gui_modules/layertree.py 2011-04-21 07:31:24 UTC (rev 46055)
@@ -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/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2011-04-21 06:16:29 UTC (rev 46054)
+++ grass/trunk/gui/wxpython/wxgui.py 2011-04-21 07:31:24 UTC (rev 46055)
@@ -247,7 +247,7 @@
def OnGCPManager(self, event):
"""!Launch georectifier module
"""
- import gui_modules.gcpmanager as gcpmanager
+ from gui_modules import gcpmanager
gcpmanager.GCPWizard(self)
def OnGModeler(self, event):
@@ -261,7 +261,7 @@
"""!Launch Hardcopy Map Output Utility
"""
try:
- import psmap
+ from gui_modules import psmap
except:
gcmd.GError(parent = self.parent,
message = _("Hardcopy Map Output Utility is not available. You can install it by %s") % \
More information about the grass-commit
mailing list