diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2009-08-13 19:08:17 +0200 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-08-13 19:08:17 +0200 |
| commit | df662e86097ac84a001a1fd8c20e0a8454acd103 (patch) | |
| tree | 6f755e1fbcd0a677c87dcb4b0e862dc9a6b51b9b /lib/python | |
| parent | 9fd2c54ef3bf35619766b304b3945695eb9271a6 (diff) | |
| parent | 1967b11ecb8b5eadcbc3c39cda28664282c35b26 (diff) | |
| download | enigma2-df662e86097ac84a001a1fd8c20e0a8454acd103.tar.gz enigma2-df662e86097ac84a001a1fd8c20e0a8454acd103.zip | |
Merge branch 'master' of git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py index 6292a46f..ba668f8b 100644 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py @@ -9,6 +9,7 @@ from Components.Sources.Progress import Progress from Components.Label import Label from Components.FileList import FileList from Components.MultiContent import MultiContentEntryText +from Components.ScrollLabel import ScrollLabel from Tools.Directories import fileExists from Tools.HardwareInfo import HardwareInfo from enigma import eConsoleAppContainer, eListbox, gFont, eListboxPythonMultiContent, \ @@ -62,6 +63,34 @@ class Feedlist(MenuList): if self.instance is not None: self.instance.moveSelectionTo(idx) +class NFOViewer(Screen): + skin = """ + <screen name="NFOViewer" position="110,115" size="540,400" title="Changelog viewer" > + <widget name="changelog" position="10,10" size="520,380" font="Regular;16" /> + </screen>""" + + def __init__(self, session, nfo): + Screen.__init__(self, session) + self["changelog"] = ScrollLabel(nfo) + + self["ViewerActions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"], + { + "green": self.exit, + "red": self.exit, + "ok": self.exit, + "cancel": self.exit, + "down": self.pageDown, + "up": self.pageUp + }) + def pageUp(self): + self["changelog"].pageUp() + + def pageDown(self): + self["changelog"].pageDown() + + def exit(self): + self.close(False) + class NFIDownload(Screen): LIST_SOURCE = 1 LIST_DEST = 2 @@ -230,6 +259,8 @@ class NFIDownload(Screen): self["destlist"].pageDown() def ok(self): + if self.focus is self.LIST_SOURCE and self.nfo: + self.session.open(NFOViewer, self.nfo) if self.download: return if self.focus is self.LIST_DEST: @@ -249,7 +280,7 @@ class NFIDownload(Screen): def feed_finished(self, feedhtml): print "[feed_finished] " + str(feedhtml) self.downloading(False) - fileresultmask = re.compile("<a href=[\'\"](?P<url>.*?)[\'\"]>(?P<name>.*?.nfi)</a>", re.DOTALL) + fileresultmask = re.compile("<a class=[\'\"]nfi[\'\"] href=[\'\"](?P<url>.*?)[\'\"]>(?P<name>.*?.nfi)</a>", re.DOTALL) searchresults = fileresultmask.finditer(feedhtml) fileresultlist = [] if searchresults: @@ -308,7 +339,7 @@ class NFIDownload(Screen): else: self.nfofilename = "" self["infolabel"].text = _("No details for this image file") - self["statusbar"].text = "" + self["statusbar"].text = _("Press OK to view full changelog") def nfi_download(self): if self["destlist"].getCurrentDirectory() is None: |
