[GRASS-SVN] r36791 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Apr 19 13:12:37 EDT 2009
Author: martinl
Date: 2009-04-19 13:12:36 -0400 (Sun, 19 Apr 2009)
New Revision: 36791
Modified:
grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
Attempt to fix trac #552 (add vector map layer in layer manager doesn't show any paramter window)
(merge from relber64, r36789)
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2009-04-19 17:08:36 UTC (rev 36790)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2009-04-19 17:12:36 UTC (rev 36791)
@@ -53,6 +53,7 @@
import os
import time
import copy
+import locale
### i18N
import gettext
@@ -1729,8 +1730,14 @@
# parse the interface decription
self.grass_task = grassTask()
handler = processTask(self.grass_task)
- xml.sax.parseString( getInterfaceDescription(cmd[0]), handler )
-
+ enc = locale.getdefaultlocale()[1]
+ if enc and enc.lower() not in ("utf8", "utf-8"):
+ xml.sax.parseString(getInterfaceDescription(cmd[0]).decode(enc).encode("utf-8"),
+ handler)
+ else:
+ xml.sax.parseString(getInterfaceDescription(cmd[0]),
+ handler)
+
# if layer parameters previously set, re-insert them into dialog
if completed is not None:
if 'params' in dcmd_params:
More information about the grass-commit
mailing list