add a small ipkg upgrade plugin
[enigma2.git] / lib / python / Plugins / example.py
1 from enigma import *
2 from Screens.Screen import Screen
3 from Components.ActionMap import ActionMap
4 from Components.Label import Label
5
6 class Example(Screen):
7         skin = """
8                 <screen position="100,100" size="200,200" title="Example plugin..." >
9                         <widget name="text" position="0,0" size="100,50" font="Arial;23" />
10                 </screen>"""
11                 
12         def __init__(self, session):
13                 self.skin = Example.skin
14                 Screen.__init__(self, session)
15
16                 self["text"] = Label("Small test")
17
18                 self["actions"] = ActionMap(["WizardActions"], 
19                 {
20                         "ok": self.ok
21                 }, -1)
22                 
23         def ok(self):
24                 self.close()
25                 
26 def main(session):
27         session.open(Example)
28         
29
30 def getPicturePath():
31                 return "/usr/share/enigma2/record.png"
32
33 def getPluginName():
34                 return "Fancy example-plugin"