X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FPlugins%2Ftest%2Fplugin.py;h=0a3753355bac0a175c95097719e0f203b5d3b2af;hp=1500dd8dbdee7ba12fe83d6ccd6bfe216586a198;hb=f458abcfbe30c3e3062a41b88d3244147bdc0607;hpb=7319cb85c7a9a6304ac92a7854a5d79c9d9f115b diff --git a/lib/python/Plugins/test/plugin.py b/lib/python/Plugins/test/plugin.py index 1500dd8..0a37533 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)