def OnDone(self, event): if event.returncode == 0: if not os.getenv("GRASS_ADDON_BASE"): SetAddOnPath(key="BASE") globalvar.UpdateGRASSAddOnCommands() toolboxesOutdated()
def OnDone(self, event): if event.returncode == 0: if not os.getenv('GRASS_ADDON_BASE'): SetAddOnPath(key='BASE') globalvar.UpdateGRASSAddOnCommands() toolboxesOutdated()
def OnUninstall(self, event): """Uninstall selected extensions""" eList = self._getSelectedExtensions() if not eList: return for ext in eList: files = RunCommand( "g.extension", parent=self, read=True, quiet=True, extension=ext, operation="remove" ).splitlines() dlg = wx.MessageDialog( parent=self, message=_( "List of files to be removed:\n%(files)s\n\n" "Do you want really to remove <%(ext)s> extension?" ) % {"files": os.linesep.join(files), "ext": ext}, caption=_("Remove extension"), style=wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION, ) if dlg.ShowModal() == wx.ID_YES: RunCommand("g.extension", flags="f", parent=self, quiet=True, extension=ext, operation="remove") self.extList.LoadData() # update prompt globalvar.UpdateGRASSAddOnCommands(eList) toolboxesOutdated()
def OnDone(self, cmd, returncode): if returncode == 0: if not os.getenv("GRASS_ADDON_BASE"): SetAddOnPath(key="BASE") globalvar.UpdateGRASSAddOnCommands() toolboxesOutdated()
def OnUninstall(self, event): """Uninstall selected extensions""" eList = self._getSelectedExtensions() if not eList: return for ext in eList: files = RunCommand('g.extension', parent = self, read = True, quiet = True, extension = ext, operation = 'remove').splitlines() dlg = wx.MessageDialog(parent = self, message = _("List of files to be removed:\n%(files)s\n\n" "Do you want really to remove <%(ext)s> extension?") % \ { 'files' : os.linesep.join(files), 'ext' : ext }, caption = _("Remove extension"), style = wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION) if dlg.ShowModal() == wx.ID_YES: RunCommand('g.extension', flags = 'f', parent = self, quiet = True, extension = ext, operation = 'remove') self.extList.LoadData() # update prompt globalvar.UpdateGRASSAddOnCommands(eList) toolboxesOutdated()
def OnDone(self, cmd, returncode): if returncode == 0: if not os.getenv('GRASS_ADDON_BASE'): SetAddOnPath(key = 'BASE') globalvar.UpdateGRASSAddOnCommands() toolboxesOutdated()