def unload(self, seq=None): if seq is None: seq = self._handlers.keys() for path in seq: _logger.debug('Tries to unload GUI package "%s"', path) if path in self._handlers: handlers = self._handlers.pop(path) for handler in handlers: handler.fini() aliases = self._aliases.pop(path, None) if aliases: g_entitiesFactories.clearSettings(aliases) contextMenuTypes = self._contextMenuTypes.pop(path, None) if contextMenuTypes: context_menu.unregisterHandlers(*contextMenuTypes) return
def unload(self, seq=None): if seq is None: seq = self._handlers.keys() isLoaded = self.isPackageLoaded clearSettings = g_entitiesFactories.clearSettings for path in seq: if not isLoaded(path): continue LOG_DEBUG('Tries to unload GUI package', path) handlers = self._handlers.pop(path) for handler in handlers: handler.fini() aliases = self._aliases.pop(path) if aliases: clearSettings(aliases) contextMenuTypes = self._contextMenuTypes.pop(path) if contextMenuTypes: context_menu.unregisterHandlers(*contextMenuTypes) return