aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/example.py
blob: 86e2cd147014f537a03a3cf699c19d6a51803a37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from enigma import *
from Screens.Screen import Screen
from Components.ActionMap import ActionMap
from Components.Label import Label

class Example(Screen):
	skin = """
		<screen position="100,100" size="200,200" title="Example plugin..." >
			<widget name="text" position="0,0" size="100,50" font="Arial;23" />
		</screen>"""
		
	def __init__(self, session):
		self.skin = Example.skin
		Screen.__init__(self, session)

		self["text"] = Label("Small test")

		self["actions"] = ActionMap(["WizardActions"], 
		{
			"ok": self.ok
		}, -1)
		
	def ok(self):
		self.close()
		
def main(session):
	session.open(Example)
	

def getPicturePath():
		return "/usr/share/enigma2/record.png"

def getPluginName():
		return "Fancy example-plugin"