new plugin interface
[enigma2.git] / lib / python / Plugins / test / plugin.py
index d85a80c9b49863389820491739508b0534fa45cc..1500dd8dbdee7ba12fe83d6ccd6bfe216586a198 100644 (file)
@@ -5,6 +5,7 @@ from Components.ActionMap import NumberActionMap
 from Components.Label import Label
 from Components.Input import Input
 from Components.GUIComponent import *
+from Plugins.Plugin import PluginDescriptor
 
 import os
 
@@ -18,7 +19,7 @@ class Test(Screen):
                self.skin = Test.skin
                Screen.__init__(self, session)
 
-               self["text"] = Input("Please press OK!")
+               self["text"] = Input("1234", maxSize=True, type=Input.NUMBER)
                                
                self["actions"] = NumberActionMap(["WizardActions", "InputActions"], 
                {
@@ -48,8 +49,8 @@ class Test(Screen):
                print "pressed", number
                self["text"].number(number)
 
-def getPicturePaths():
-       return [ "" ]
+def main(session):
+       session.open(Test)
 
-def getPlugins():
-       return [("Test", "plugin to test some capabilities", "screen", "Test")]
+def Plugins():
+       return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)