[GRASS-SVN] r57148 - in grass/trunk/gui/wxpython: core modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 15 07:03:40 PDT 2013
Author: annakrat
Date: 2013-07-15 07:03:40 -0700 (Mon, 15 Jul 2013)
New Revision: 57148
Modified:
grass/trunk/gui/wxpython/core/toolboxes.py
grass/trunk/gui/wxpython/modules/extensions.py
Log:
update toolboxes after change in addons
Modified: grass/trunk/gui/wxpython/core/toolboxes.py
===================================================================
--- grass/trunk/gui/wxpython/core/toolboxes.py 2013-07-15 13:35:35 UTC (rev 57147)
+++ grass/trunk/gui/wxpython/core/toolboxes.py 2013-07-15 14:03:40 UTC (rev 57148)
@@ -59,6 +59,14 @@
userMainMenuFile = None
+def toolboxesOutdated():
+ """!Removes auto-generated menudata.xml
+ to let gui regenerate it next time it starts."""
+ path = os.path.join(GetSettingsPath(), 'toolboxes', 'menudata.xml')
+ if os.path.exists(path):
+ gcore.try_remove(path)
+
+
def getMenuFile():
"""!Returns path to XML file for building menu.
Modified: grass/trunk/gui/wxpython/modules/extensions.py
===================================================================
--- grass/trunk/gui/wxpython/modules/extensions.py 2013-07-15 13:35:35 UTC (rev 57147)
+++ grass/trunk/gui/wxpython/modules/extensions.py 2013-07-15 14:03:40 UTC (rev 57148)
@@ -31,6 +31,7 @@
from core.menutree import TreeModel, ModuleNode
from gui_core.widgets import GListCtrl, SearchModuleWidget
from gui_core.treeview import CTreeView
+from core.toolboxes import toolboxesOutdated
class InstallExtensionWindow(wx.Frame):
@@ -205,6 +206,8 @@
SetAddOnPath(key = 'BASE')
globalvar.UpdateGRASSAddOnCommands()
+ toolboxesOutdated()
+
def OnItemSelected(self, node):
"""!Item selected"""
@@ -386,6 +389,7 @@
# update prompt
globalvar.UpdateGRASSAddOnCommands(eList)
+ toolboxesOutdated()
class CheckListExtension(GListCtrl):
More information about the grass-commit
mailing list