From b56bcb6768ce0fdb7124e02d2fd6a531b4068505 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 8 Aug 2006 19:00:43 +0000 Subject: plugins can appear in the extensions menu now use PluginDescriptor.WHERE_EXTENSIONSMENU and the same parameters as for standard plugins (see the file manager plugin for an example) --- lib/python/Screens/InfoBarGenerics.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/python/Screens/InfoBarGenerics.py') diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index f2516c4b..c5018c2f 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -1090,6 +1090,26 @@ class InfoBarExtensions: from Tools.BoundFunction import boundFunction +# depends on InfoBarExtensions +from Components.PluginComponent import plugins + +class InfoBarPlugins: + def __init__(self): + self.addExtension(extension = self.getPluginList, type = InfoBarExtensions.EXTENSION_LIST) + + + def getPluginName(self, name): + return name + + def getPluginList(self): + list = [] + for p in plugins.getPlugins(where = PluginDescriptor.WHERE_EXTENSIONSMENU): + list.append(((boundFunction(self.getPluginName, p.name), boundFunction(self.runPlugin, p), lambda: True), None)) + return list + + def runPlugin(self, plugin): + plugin(session = self.session) + # depends on InfoBarExtensions and InfoBarSubtitleSupport class InfoBarSubtitles: def __init__(self): -- cgit v1.2.3