[GRASS-SVN] r49276 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Nov 16 11:12:22 EST 2011
Author: martinl
Date: 2011-11-16 08:12:22 -0800 (Wed, 16 Nov 2011)
New Revision: 49276
Modified:
grass/trunk/gui/wxpython/gui_modules/ghelp.py
Log:
wxGUI: after successful installation of the extension update prompt list of commands
Modified: grass/trunk/gui/wxpython/gui_modules/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/ghelp.py 2011-11-16 16:02:37 UTC (rev 49275)
+++ grass/trunk/gui/wxpython/gui_modules/ghelp.py 2011-11-16 16:12:22 UTC (rev 49276)
@@ -965,10 +965,18 @@
def OnInstall(self, event):
"""!Install selected extension"""
log = self.parent.GetLogWindow()
- log.RunCmd(self._getCmd())
+ log.RunCmd(self._getCmd(), onDone = self.OnDone)
- ### self.OnCloseWindow(None)
-
+ def OnDone(self, cmd, returncode):
+ item = self.tree.GetSelected()
+ if not item or not item.IsOk() or \
+ returncode != 0 or \
+ not os.getenv('GRASS_ADDON_PATH'):
+ return
+
+ name = self.tree.GetItemText(item)
+ globalvar.grassCmd['all'].append(name)
+
def OnItemSelected(self, event):
"""!Item selected"""
item = event.GetItem()
More information about the grass-commit
mailing list