[GRASS-SVN] r47487 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Aug 7 14:27:35 EDT 2011


Author: martinl
Date: 2011-08-07 11:27:35 -0700 (Sun, 07 Aug 2011)
New Revision: 47487

Modified:
   grass/trunk/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI: fix font/enc bug


Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2011-08-07 18:17:52 UTC (rev 47486)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2011-08-07 18:27:35 UTC (rev 47487)
@@ -742,10 +742,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