[GRASS-SVN] r64582 - in grass/trunk/gui/wxpython: core modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 12 00:02:36 PST 2015


Author: martinl
Date: 2015-02-12 00:02:36 -0800 (Thu, 12 Feb 2015)
New Revision: 64582

Modified:
   grass/trunk/gui/wxpython/core/treemodel.py
   grass/trunk/gui/wxpython/modules/extensions.py
Log:
wxGUI/extension: print number of loaded extensions

Modified: grass/trunk/gui/wxpython/core/treemodel.py
===================================================================
--- grass/trunk/gui/wxpython/core/treemodel.py	2015-02-12 07:22:24 UTC (rev 64581)
+++ grass/trunk/gui/wxpython/core/treemodel.py	2015-02-12 08:02:36 UTC (rev 64582)
@@ -195,7 +195,7 @@
         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
             

Modified: grass/trunk/gui/wxpython/modules/extensions.py
===================================================================
--- grass/trunk/gui/wxpython/modules/extensions.py	2015-02-12 07:22:24 UTC (rev 64581)
+++ grass/trunk/gui/wxpython/modules/extensions.py	2015-02-12 08:02:36 UTC (rev 64582)
@@ -9,7 +9,7 @@
  - 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 @@
             
     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):



More information about the grass-commit mailing list