Browse Source

wxGUI/extension: print number of loaded extensions

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64582 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 years ago
parent
commit
c1be2babdc
2 changed files with 4 additions and 3 deletions
  1. 1 1
      gui/wxpython/core/treemodel.py
  2. 3 2
      gui/wxpython/modules/extensions.py

+ 1 - 1
gui/wxpython/core/treemodel.py

@@ -195,7 +195,7 @@ class ModuleNode(DictNode):
         if not self.data:
             return False
         if key in ('command', 'keywords', 'description'):
-            return len(self.data[key]) and value in self.data[key]
+            return len(self.data[key]) and (value in self.data[key] or value == '*')
         
         return False
             

+ 3 - 2
gui/wxpython/modules/extensions.py

@@ -9,7 +9,7 @@ Classes:
  - extensions::ManageExtensionWindow
  - extensions::CheckListExtension
 
-(C) 2008-2014 by the GRASS Development Team
+(C) 2008-2015 by the GRASS Development Team
 
 This program is free software under the GNU General Public License
 (>=v2). Read the file COPYING that comes with GRASS for details.
@@ -198,7 +198,8 @@ class InstallExtensionWindow(wx.Frame):
             
     def _fetchDone(self):
         self.tree.RefreshItems()
-        self.SetStatusText("", 0)
+        nitems = len(self.modelBuilder.GetModel().SearchNodes(key='command', value='*'))
+        self.SetStatusText(_("%d extensions loaded") % nitems, 0)
         wx.EndBusyCursor()
         
     def OnContextMenu(self, node):