[GRASS-SVN] r42877 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 22 04:38:45 EDT 2010


Author: martinl
Date: 2010-07-22 08:38:45 +0000 (Thu, 22 Jul 2010)
New Revision: 42877

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/vdigit.py
Log:
wxGUI: clean up vdigit/nviz error messages


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py	2010-07-22 05:46:00 UTC (rev 42876)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz.py	2010-07-22 08:38:45 UTC (rev 42877)
@@ -17,8 +17,6 @@
 @author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
 """
 
-errorMsg = ''
-
 import os
 import sys
 
@@ -31,13 +29,10 @@
     sys.path.append(os.path.join(globalvar.ETCWXDIR, "nviz"))
     import grass6_wxnviz as wxnviz
     haveNviz = True
-except ImportError, e:
+    errorMsg = ''
+except ImportError, err:
     haveNviz = False
-    errorMsg = _("3D view mode is not available.\n"
-                 "Reason: %s\n"
-                 "Note that the 3D view mode is currently not working under\nMS Windows "
-                 "(hopefully this will be fixed soon). "
-                 "Please keep\nan eye out for updated versions of GRASS." % e)
+    errorMsg = err
 
 if haveNviz:
     GLWindow = nviz_mapdisp.GLWindow

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py	2010-07-22 05:46:00 UTC (rev 42876)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py	2010-07-22 08:38:45 UTC (rev 42877)
@@ -167,8 +167,13 @@
             choices.append(_('3D view'))
             self.toolId['3d'] = 1
         else:
-            from nviz import errorMsg 
-            log.WriteWarning(errorMsg)
+            from nviz import errorMsg
+            log.WriteCmdLog(_('3D view mode not available'))
+            log.WriteWarning(_('Reason: %s\n'
+                               'Note that the 3D view mode is currently not working under\nMS Windows '
+                               '(hopefully this will be fixed soon). '
+                               'Please keep\nan eye out for updated versions of GRASS.') % errorMsg)
+            
             self.toolId['3d'] = -1
         if haveVDigit:
             choices.append(_('Digitize'))
@@ -177,8 +182,13 @@
             else:
                 self.toolId['vdigit'] = 1
         else:
-            from vdigit import errorMsg 
-            log.WriteWarning(errorMsg)
+            from vdigit import errorMsg
+            log.WriteCmdLog(_('Vector digitizer not available'))
+            log.WriteWarning(_('Reason: %s\n'
+                               'Note that the vector digitizer is currently not working under\nMS Windows '
+                               '(hopefully this will be fixed soon). '
+                               'Please keep\nan eye out for updated versions of GRASS.') % errorMsg)
+            
             self.toolId['vdigit'] = -1
         
         self.combo = wx.ComboBox(parent=self.toolbar, id=wx.ID_ANY, value=_('2D view'),

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/vdigit.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/vdigit.py	2010-07-22 05:46:00 UTC (rev 42876)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/vdigit.py	2010-07-22 08:38:45 UTC (rev 42877)
@@ -57,11 +57,7 @@
     haveVDigit = False
     GV_LINES = None
     PseudoDC = wx.PseudoDC
-    errorMsg = _("Vector digitizer is not available.\n"
-                 "Reason: %s\n"
-                 "Note that the vector digitizer is currently not working under\nMS Windows "
-                 "(hopefully this will be fixed soon). "
-                 "Please keep\nan eye out for updated versions of GRASS." % err)
+    errorMsg = err
     
 class AbstractDigit:
     """



More information about the grass-commit mailing list