[GRASS-SVN] r53367 - grass/branches/develbranch_6/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 11 13:24:07 PDT 2012


Author: martinl
Date: 2012-10-11 13:24:06 -0700 (Thu, 11 Oct 2012)
New Revision: 53367

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py
Log:
wxGUI: use menustyle also for menutree
       (merge r53366 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py	2012-10-11 20:21:37 UTC (rev 53366)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py	2012-10-11 20:24:06 UTC (rev 53367)
@@ -42,6 +42,7 @@
 from lmgr.menudata    import ManagerData
 from core.gcmd        import GError, DecodeString
 from gui_core.widgets import GNotebook, StaticWrapText, ItemTree, ScrolledPanel
+from core.settings    import UserSettings
 
 class SearchModuleWindow(wx.Panel):
     """!Search module window (used in MenuTreeWindow)"""
@@ -338,6 +339,8 @@
 
         super(MenuTree, self).__init__(parent, **kwargs)
         
+        self.menustyle = UserSettings.Get(group = 'appearance', key = 'menustyle', subkey = 'selection')
+        
     def Load(self, data = None):
         """!Load menu data tree
 
@@ -366,8 +369,15 @@
                 self.__AppendItems(itemSub, eachItem[1])
             else:
                 if eachItem[0]:
+                    label = eachItem[0]
+                    if eachItem[3]:
+                        if self.menustyle == 1:
+                            label += ' [' + eachItem[3] + ']'
+                        elif self.menustyle == 2:
+                            label = '[' + eachItem[3] + ']'
+                    
                     itemNew = self.AppendItem(parentId = item,
-                                              text = eachItem[0])
+                                              text = label)
                     
                     data = { 'item'        : eachItem[0],
                              'description' : eachItem[1],



More information about the grass-commit mailing list