diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-03-11 00:59:07 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-03-11 00:59:07 +0000 |
| commit | c6da3982398188f98684f398291b30b4aecba49e (patch) | |
| tree | 27983d60d6ef7dc5f06ba7054554a3704e395512 /lib/python | |
| parent | 0a0bf3acd320d857378eedb6c3bbfc2753cb20d2 (diff) | |
| download | enigma2-c6da3982398188f98684f398291b30b4aecba49e.tar.gz enigma2-c6da3982398188f98684f398291b30b4aecba49e.zip | |
run teletext plugin when pressing teletext
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Screens/InfoBar.py | 7 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 53 |
2 files changed, 40 insertions, 20 deletions
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index ae5318ec..dfafc116 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -17,7 +17,7 @@ from Screens.InfoBarGenerics import InfoBarShowHide, \ InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, \ InfoBarSubserviceSelection, InfoBarTuner, InfoBarShowMovies, InfoBarTimeshift, \ InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \ - InfoBarSummarySupport, InfoBarTimeshiftState + InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin from Screens.HelpMenu import HelpableScreen, HelpMenu @@ -30,7 +30,7 @@ class InfoBar(InfoBarShowHide, InfoBarPowerKey, InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection, HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, InfoBarTuner, InfoBarTimeshift, InfoBarSeek, - InfoBarSummarySupport, InfoBarTimeshiftState, Screen): + InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, Screen): def __init__(self, session): Screen.__init__(self, session) @@ -46,7 +46,8 @@ class InfoBar(InfoBarShowHide, InfoBarPowerKey, InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, \ InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection, \ InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \ - InfoBarTuner, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState: + InfoBarTuner, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \ + InfoBarTeletextPlugin: x.__init__(self) self.helpList.append((self["actions"], "InfobarActions", [("showMovies", "Watch a Movie...")])) diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 7a7eb8ff..037fe18e 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -1,32 +1,33 @@ -from Screen import Screen -from Components.ActionMap import ActionMap, HelpableActionMap -from Components.ActionMap import NumberActionMap -from Components.Label import * -from Components.ProgressBar import * -from Components.config import configfile, configsequencearg -from Components.config import config, configElement, ConfigSubsection, configSequence, configElementBoolean from ChannelSelection import ChannelSelection, BouquetSelector -from Components.Pixmap import Pixmap, PixmapConditional +from Components.ActionMap import ActionMap, HelpableActionMap +from Components.ActionMap import NumberActionMap from Components.BlinkingPixmap import BlinkingPixmapConditional -from Components.ServiceName import ServiceName -from Components.EventInfo import EventInfo, EventInfoProgress from Components.Clock import Clock +from Components.EventInfo import EventInfo, EventInfoProgress +from Components.Harddisk import harddiskmanager from Components.Input import Input +from Components.Label import * +from Components.Pixmap import Pixmap, PixmapConditional +from Components.PluginComponent import plugins +from Components.ProgressBar import * +from Components.ServiceEventTracker import ServiceEventTracker +from Components.ServiceName import ServiceName +from Components.config import config, configElement, ConfigSubsection, configSequence, configElementBoolean +from Components.config import configfile, configsequencearg -from ServiceReference import ServiceReference from EpgSelection import EPGSelection +from Plugins.Plugin import PluginDescriptor -from Screens.MessageBox import MessageBox +from Screen import Screen from Screens.ChoiceBox import ChoiceBox -from Screens.InputBox import InputBox from Screens.Dish import Dish -from Screens.Standby import Standby from Screens.EventView import EventViewEPGSelect, EventViewSimple +from Screens.InputBox import InputBox +from Screens.MessageBox import MessageBox from Screens.MinuteInput import MinuteInput -from Components.Harddisk import harddiskmanager - -from Components.ServiceEventTracker import ServiceEventTracker +from Screens.Standby import Standby +from ServiceReference import ServiceReference from Tools import Notifications from Tools.Directories import * @@ -1414,3 +1415,21 @@ class InfoBarSummarySupport: def createSummary(self): return InfoBarSummary + +class InfoBarTeletextPlugin: + def __init__(self): + self.teletext_plugin = None + + for p in plugins.getPlugins(PluginDescriptor.WHERE_TELETEXT): + self.teletext_plugin = p + + if self.teletext_plugin is not None: + self["TeletextActions"] = HelpableActionMap(self, "InfobarTeletextActions", + { + "startTeletext": (self.startTeletext, "View teletext...") + }) + else: + print "no teletext plugin found!" + + def startTeletext(self): + self.teletext_plugin(session=self.session, service=self.session.nav.getCurrentService()) |
