diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-02-22 16:32:28 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-02-22 16:32:28 +0000 |
| commit | a0842dd1b96a660acedf4894690c3ab37c24094d (patch) | |
| tree | 7ba17e9e68c783a074fb903d55f5d5736fd24c3b /lib/python/Plugins/FileManager/plugin.py | |
| parent | 568bc959ef68e29e12afb857d01de2e1f7517e4d (diff) | |
| download | enigma2-a0842dd1b96a660acedf4894690c3ab37c24094d.tar.gz enigma2-a0842dd1b96a660acedf4894690c3ab37c24094d.zip | |
create a Console screen for command executions
Diffstat (limited to 'lib/python/Plugins/FileManager/plugin.py')
| -rw-r--r-- | lib/python/Plugins/FileManager/plugin.py | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/lib/python/Plugins/FileManager/plugin.py b/lib/python/Plugins/FileManager/plugin.py index 4b577b02..e69de29b 100644 --- a/lib/python/Plugins/FileManager/plugin.py +++ b/lib/python/Plugins/FileManager/plugin.py @@ -1,69 +0,0 @@ -from enigma import * -from Screens.Screen import Screen -from Screens.MessageBox import MessageBox -from Components.ActionMap import NumberActionMap -from Components.Label import Label -from Components.Input import Input -from Components.GUIComponent import * -from Components.Pixmap import Pixmap -from Components.FileList import FileEntryComponent, FileList -from Plugins.Plugin import PluginDescriptor - -import os - -class FileManager(Screen): - skin = """ - <screen position="100,100" size="550,400" title="Test" > - <!--widget name="text" position="0,0" size="550,25" font="Regular;20" /--> - <widget name="list" position="10,0" size="190,250" scrollbarMode="showOnDemand" /> - <widget name="pixmap" position="200,0" size="190,250" /> - </screen>""" - def __init__(self, session, args = None): - self.skin = FileManager.skin - Screen.__init__(self, session) - - self["list"] = FileList("/", matchingPattern = "^.*\.(png|avi|mp3|mpeg|ts)") - self["pixmap"] = Pixmap() - - #self["text"] = Input("1234", maxSize=True, type=Input.NUMBER) - - self["actions"] = NumberActionMap(["WizardActions", "InputActions"], - { - "ok": self.ok, - "back": self.close, -# "left": self.keyLeft, -# "right": self.keyRight, - "1": self.keyNumberGlobal, - "2": self.keyNumberGlobal, - "3": self.keyNumberGlobal, - "4": self.keyNumberGlobal, - "5": self.keyNumberGlobal, - "6": self.keyNumberGlobal, - "7": self.keyNumberGlobal, - "8": self.keyNumberGlobal, - "9": self.keyNumberGlobal, - "0": self.keyNumberGlobal - }, -1) - - def keyLeft(self): - self["text"].left() - - def keyRight(self): - self["text"].right() - - def ok(self): - selection = self["list"].getSelection() - if selection[1] == True: # isDir - self["list"].changeDir(selection[0]) - else: - self["pixmap"].instance.setPixmapFromFile(selection[0]) - - def keyNumberGlobal(self, number): - print "pressed", number - self["text"].number(number) - -def main(session): - session.open(Test) - -def Plugins(): - return PluginDescriptor(name="File-Manager", description="Let's you view/edit files in your Dreambox", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main) |
