diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-12-21 04:41:36 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-12-21 04:41:36 +0000 |
| commit | ccb8d260ed5e51f6f65205be04744a9e8322aa6f (patch) | |
| tree | c8243a30d7b7627229186ca13a463952b92c1322 /lib/python/Plugins | |
| parent | 8589eb49ec20d3503a476f398ec84d7ad0307d26 (diff) | |
| download | enigma2-ccb8d260ed5e51f6f65205be04744a9e8322aa6f.tar.gz enigma2-ccb8d260ed5e51f6f65205be04744a9e8322aa6f.zip | |
add plugins
to test it: uncomment the example.py in lib/python/Plugins/Makefile.am
plugins can be added at runtime
Diffstat (limited to 'lib/python/Plugins')
| -rw-r--r-- | lib/python/Plugins/Makefile.am | 5 | ||||
| -rw-r--r-- | lib/python/Plugins/__init__.py | 0 | ||||
| -rw-r--r-- | lib/python/Plugins/example.py | 34 |
3 files changed, 39 insertions, 0 deletions
diff --git a/lib/python/Plugins/Makefile.am b/lib/python/Plugins/Makefile.am new file mode 100644 index 00000000..d963b3c0 --- /dev/null +++ b/lib/python/Plugins/Makefile.am @@ -0,0 +1,5 @@ +installdir = $(LIBDIR)/enigma2/python/Plugins + +install_PYTHON = \ + __init__.py \ + example.py
\ No newline at end of file diff --git a/lib/python/Plugins/__init__.py b/lib/python/Plugins/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/lib/python/Plugins/__init__.py diff --git a/lib/python/Plugins/example.py b/lib/python/Plugins/example.py new file mode 100644 index 00000000..86e2cd14 --- /dev/null +++ b/lib/python/Plugins/example.py @@ -0,0 +1,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"
\ No newline at end of file |
