X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/7319cb85c7a9a6304ac92a7854a5d79c9d9f115b..f458abcfbe30c3e3062a41b88d3244147bdc0607:/lib/python/Plugins/test/plugin.py diff --git a/lib/python/Plugins/test/plugin.py b/lib/python/Plugins/test/plugin.py index 1500dd8d..0a375335 100644 --- a/lib/python/Plugins/test/plugin.py +++ b/lib/python/Plugins/test/plugin.py @@ -5,6 +5,7 @@ from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.Input import Input from Components.GUIComponent import * +from Components.FileList import FileEntryComponent, FileList from Plugins.Plugin import PluginDescriptor import os @@ -12,21 +13,23 @@ import os class Test(Screen): skin = """ - + + """ - def __init__(self, session, args = None): self.skin = Test.skin Screen.__init__(self, session) - self["text"] = Input("1234", maxSize=True, type=Input.NUMBER) + self["list"] = FileList("/") + + #self["text"] = Input("1234", maxSize=True, type=Input.NUMBER) - self["actions"] = NumberActionMap(["WizardActions", "InputActions"], + self["actions"] = NumberActionMap(["WizardActions", "InputActions"], { - "ok": self.close, + "ok": self.ok, "back": self.close, - "left": self.keyLeft, - "right": self.keyRight, +# "left": self.keyLeft, +# "right": self.keyRight, "1": self.keyNumberGlobal, "2": self.keyNumberGlobal, "3": self.keyNumberGlobal, @@ -45,6 +48,11 @@ class Test(Screen): def keyRight(self): self["text"].right() + def ok(self): + selection = self["list"].getSelection() + if selection[1] == True: # isDir + self["list"].changeDir(selection[0]) + def keyNumberGlobal(self, number): print "pressed", number self["text"].number(number)