aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-01-19 02:18:21 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-01-19 02:18:21 +0000
commit85f5c84f1e3e4d22fb1939751d39de03877b93d8 (patch)
tree6c98fa2f78e0c89e46d2d2bc445698a715745986 /lib/python/Plugins
parentd76847392ff5cd26bc154f6c135310644c5c1d08 (diff)
downloadenigma2-85f5c84f1e3e4d22fb1939751d39de03877b93d8.tar.gz
enigma2-85f5c84f1e3e4d22fb1939751d39de03877b93d8.zip
add a small text input component
Diffstat (limited to 'lib/python/Plugins')
-rw-r--r--lib/python/Plugins/Makefile.am2
-rw-r--r--lib/python/Plugins/test/Makefile.am6
-rw-r--r--lib/python/Plugins/test/__init__.py0
-rw-r--r--lib/python/Plugins/test/plugin.py55
4 files changed, 62 insertions, 1 deletions
diff --git a/lib/python/Plugins/Makefile.am b/lib/python/Plugins/Makefile.am
index 01f21d4e..93ee65ad 100644
--- a/lib/python/Plugins/Makefile.am
+++ b/lib/python/Plugins/Makefile.am
@@ -1,6 +1,6 @@
installdir = $(LIBDIR)/enigma2/python/Plugins
-SUBDIRS = update tuxboxplugins web
+SUBDIRS = update tuxboxplugins web test
install_PYTHON = \
__init__.py
diff --git a/lib/python/Plugins/test/Makefile.am b/lib/python/Plugins/test/Makefile.am
new file mode 100644
index 00000000..c841c49f
--- /dev/null
+++ b/lib/python/Plugins/test/Makefile.am
@@ -0,0 +1,6 @@
+installdir = $(LIBDIR)/enigma2/python/Plugins/test
+
+install_PYTHON = \
+ __init__.py \
+ plugin.py
+
diff --git a/lib/python/Plugins/test/__init__.py b/lib/python/Plugins/test/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/lib/python/Plugins/test/__init__.py
diff --git a/lib/python/Plugins/test/plugin.py b/lib/python/Plugins/test/plugin.py
new file mode 100644
index 00000000..c08a986f
--- /dev/null
+++ b/lib/python/Plugins/test/plugin.py
@@ -0,0 +1,55 @@
+from enigma import *
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Components.ActionMap import NumberActionMap
+from Components.Label import Label
+from Components.Input import Input
+from Components.GUIComponent import *
+
+import os
+
+class Test(Screen):
+ skin = """
+ <screen position="100,100" size="550,400" title="Test" >
+ <widget name="text" position="0,0" size="550,400" font="Regular;20" />
+ </screen>"""
+
+ def __init__(self, session, args = None):
+ self.skin = Test.skin
+ Screen.__init__(self, session)
+
+ self["text"] = Input("Please press OK!")
+
+ self["actions"] = NumberActionMap(["WizardActions", "InputActions"],
+ {
+ "ok": self.close,
+ "back": self.close,
+ "left": self.keyLeft,
+ "right": self.keyRight,
+ "1": self.keyNumberGlobal,
+ "2": self.keyNumberGlobal,
+ "3": self.keyNumberGlobal,
+ "4": self.keyNumberGlobal,
+ "5": self.keyNumberGlobal,
+ "6": self.keyNumberGlobal,
+ "7": self.keyNumberGlobal,
+ "8": self.keyNumberGlobal,
+ "9": self.keyNumberGlobal,
+ "0": self.keyNumberGlobal
+ }, -1)
+
+ def keyLeft(self):
+ self["text"].left()
+
+ def keyRight(self):
+ self["text"].right()
+
+ def keyNumberGlobal(self, number):
+ print "pressed", number
+ self["text"].number(number)
+
+def getPicturePaths():
+ return [ "" ]
+
+def getPlugins():
+ return [("Test", "plugin to test some capabilities", "screen", "Test")]