def PluginComponent_getPlugins(self, where): if not isinstance(where, list): where = [ where ] res = [] if PluginDescriptor.WHERE_EXTENSIONSMENU in where: hide = config.plugins.pluginhider.hideextensions.value res.extend((x for x in self.plugins.get(PluginDescriptor.WHERE_EXTENSIONSMENU, []) if x.name not in hide)) where.remove(PluginDescriptor.WHERE_EXTENSIONSMENU) if PluginDescriptor.WHERE_PLUGINMENU in where: hide = config.plugins.pluginhider.hideplugins.value res.extend((x for x in self.plugins.get(PluginDescriptor.WHERE_PLUGINMENU, []) if x.name not in hide)) where.remove(PluginDescriptor.WHERE_PLUGINMENU) if PluginDescriptor.WHERE_EVENTINFO in where: hide = config.plugins.pluginhider.hideeventinfo.value res.extend((x for x in self.plugins.get(PluginDescriptor.WHERE_EVENTINFO , []) if x.name not in hide)) where.remove(PluginDescriptor.WHERE_EVENTINFO) if where: res.extend(PluginComponent.pluginHider_baseGetPlugins(self, where)) if hasPluginWeight: res.sort(key=attrgetter('weight')) return res
def PluginComponent_getPlugins(self, where): if not isinstance(where, list): where = [where] res = [] if PluginDescriptor.WHERE_EXTENSIONSMENU in where: hide = config.plugins.pluginhider.hideextensions.value res.extend((x for x in self.plugins.get( PluginDescriptor.WHERE_EXTENSIONSMENU, []) if x.name not in hide)) where.remove(PluginDescriptor.WHERE_EXTENSIONSMENU) if PluginDescriptor.WHERE_PLUGINMENU in where: hide = config.plugins.pluginhider.hideplugins.value res.extend( (x for x in self.plugins.get(PluginDescriptor.WHERE_PLUGINMENU, []) if x.name not in hide)) where.remove(PluginDescriptor.WHERE_PLUGINMENU) if PluginDescriptor.WHERE_EVENTINFO in where: hide = config.plugins.pluginhider.hideeventinfo.value res.extend( (x for x in self.plugins.get(PluginDescriptor.WHERE_EVENTINFO, []) if x.name not in hide)) where.remove(PluginDescriptor.WHERE_EVENTINFO) if where: res.extend(PluginComponent.pluginHider_baseGetPlugins(self, where)) if hasPluginWeight: res.sort(key=attrgetter('weight')) return res