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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Aug 7 14:29:41 EDT 2011


Author: martinl
Date: 2011-08-07 11:29:41 -0700 (Sun, 07 Aug 2011)
New Revision: 47488

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI: fix font/enc bug
       (merge r47487 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2011-08-07 18:27:35 UTC (rev 47487)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2011-08-07 18:29:41 UTC (rev 47488)
@@ -683,10 +683,12 @@
         self._readFile(self.filePath, settings)
         
         # set environment variables
-        os.environ["GRASS_FONT"] = self.Get(group = 'display',
-                                            key = 'font', subkey = 'type')
-        os.environ["GRASS_ENCODING"] = self.Get(group = 'display',
-                                                key = 'font', subkey = 'encoding')
+        font = self.Get(group = 'display', key = 'font', subkey = 'type')
+        enc  = self.Get(group = 'display', key = 'font', subkey = 'encoding')
+        if font:
+            os.environ["GRASS_FONT"] = font
+        if enc:
+            os.environ["GRASS_ENCODING"] = enc
         
     def _readFile(self, filename, settings = None):
         """!Read settings from file to dict



More information about the grass-commit mailing list