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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 16 11:02:37 EST 2011


Author: martinl
Date: 2011-11-16 08:02:37 -0800 (Wed, 16 Nov 2011)
New Revision: 49275

Modified:
   grass/trunk/gui/wxpython/gui_modules/ghelp.py
Log:
wxGUI: fix extension dialog for uknown prefixes


Modified: grass/trunk/gui/wxpython/gui_modules/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/ghelp.py	2011-11-16 16:02:14 UTC (rev 49274)
+++ grass/trunk/gui/wxpython/gui_modules/ghelp.py	2011-11-16 16:02:37 UTC (rev 49275)
@@ -813,7 +813,7 @@
         self.fullDesc.SetValue(True)
         
         self.search = SearchModuleWindow(parent = self.panel)
-        self.search.SetSelection(2) 
+        self.search.SetSelection(0) 
         
         self.tree   = ExtensionTree(parent = self.panel, log = parent.GetLogWindow())
         
@@ -1010,7 +1010,7 @@
         for prefix in ('display', 'database',
                        'general', 'imagery',
                        'misc', 'postscript', 'paint',
-                       'raster', 'raster3D', 'sites', 'vector', 'wxGUI'):
+                       'raster', 'raster3D', 'sites', 'vector', 'wxGUI', 'other'):
             self.AppendItem(parentId = self.root,
                             text = prefix)
         self._loaded = False
@@ -1027,7 +1027,8 @@
                  'r3' : 'raster3D',
                  's'  : 'sites',
                  'v'  : 'vector',
-                 'wx' : 'wxGUI' }
+                 'wx' : 'wxGUI',
+                 'u'  : 'other' }
         
         if c in name:
             return name[c]
@@ -1066,7 +1067,11 @@
             if full:
                 key, value = line.split('=', 1)
                 if key == 'name':
-                    prefix, name = value.split('.', 1)
+                    try:
+                        prefix, name = value.split('.', 1)
+                    except ValueError:
+                        prefix = 'u'
+                        name = value
                     if prefix not in mdict:
                         mdict[prefix] = dict()
                     mdict[prefix][name] = dict()



More information about the grass-commit mailing list