From f95be11f0517eac56013b0ccb14825be97fc1540 Mon Sep 17 00:00:00 2001 From: stefan Date: Tue, 16 Dec 2008 10:33:19 +0000 Subject: finish and polish diseqc tester plugin --- lib/python/Screens/TextBox.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/python/Screens/TextBox.py (limited to 'lib/python/Screens/TextBox.py') diff --git a/lib/python/Screens/TextBox.py b/lib/python/Screens/TextBox.py new file mode 100644 index 00000000..117c5c72 --- /dev/null +++ b/lib/python/Screens/TextBox.py @@ -0,0 +1,26 @@ +from Screens.Screen import Screen + +from Components.ActionMap import ActionMap +from Components.Sources.StaticText import StaticText +from Components.ScrollLabel import ScrollLabel + +class TextBox(Screen): + def __init__(self, session, text = ""): + Screen.__init__(self, session) + + self.text = text + self["text"] = ScrollLabel(self.text) + + self["actions"] = ActionMap(["OkCancelActions", "DirectionActions"], + { + "cancel": self.cancel, + "ok": self.ok, + "up": self["text"].pageUp, + "down": self["text"].pageDown, + }, -1) + + def ok(self): + self.close() + + def cancel(self): + self.close() \ No newline at end of file -- cgit v1.2.3 From b10857da7a1853f816adcb2c0464e9c759190c26 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 16 Dec 2008 20:22:17 +0100 Subject: add newlines at end of file --- lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py | 2 +- lib/python/Screens/TextBox.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/python/Screens/TextBox.py') diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py b/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py index f55ba766..2c8c5c38 100644 --- a/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py +++ b/lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py @@ -524,4 +524,4 @@ def autostart(reason, **kwargs): def Plugins(**kwargs): return [ PluginDescriptor(name="DiSEqC Tester", description=_("Test DiSEqC settings"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=DiseqcTesterMain), - PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)] \ No newline at end of file + PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)] diff --git a/lib/python/Screens/TextBox.py b/lib/python/Screens/TextBox.py index 117c5c72..44b8a3cf 100644 --- a/lib/python/Screens/TextBox.py +++ b/lib/python/Screens/TextBox.py @@ -23,4 +23,4 @@ class TextBox(Screen): self.close() def cancel(self): - self.close() \ No newline at end of file + self.close() -- cgit v1.2.3