diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-08-08 19:00:43 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-08-08 19:00:43 +0000 |
| commit | b56bcb6768ce0fdb7124e02d2fd6a531b4068505 (patch) | |
| tree | eae4c13e9be3325429972208bb167a37a1dc540c /lib/python/Screens | |
| parent | 26ea0041c3afd21d33cf87364b8cb6b71261aad2 (diff) | |
| download | enigma2-b56bcb6768ce0fdb7124e02d2fd6a531b4068505.tar.gz enigma2-b56bcb6768ce0fdb7124e02d2fd6a531b4068505.zip | |
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)
Diffstat (limited to 'lib/python/Screens')
| -rw-r--r-- | lib/python/Screens/InfoBar.py | 7 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 20 |
2 files changed, 24 insertions, 3 deletions
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index ab82db6a..4a1f318a 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -19,7 +19,7 @@ from Screens.InfoBarGenerics import InfoBarShowHide, \ InfoBarSubserviceSelection, InfoBarTuner, InfoBarShowMovies, InfoBarTimeshift, \ InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \ InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, \ - InfoBarSubtitleSupport, InfoBarPiP, InfoBarSubtitles + InfoBarSubtitleSupport, InfoBarPiP, InfoBarSubtitles, InfoBarPlugins from Screens.HelpMenu import HelpableScreen, HelpMenu @@ -33,7 +33,7 @@ class InfoBar(InfoBarShowHide, HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, InfoBarTuner, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, - InfoBarPiP, InfoBarSubtitles, + InfoBarPiP, InfoBarSubtitles, InfoBarPlugins, InfoBarSubtitleSupport, Screen): ALLOW_SUSPEND = True @@ -56,7 +56,8 @@ class InfoBar(InfoBarShowHide, InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection, \ InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \ InfoBarTuner, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \ - InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitles, InfoBarSubtitleSupport: + InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitles, InfoBarSubtitleSupport, \ + InfoBarPlugins: x.__init__(self) self.helpList.append((self["actions"], "InfobarActions", [("showMovies", _("view recordings..."))])) 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): |
