X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FPlugins%2FExtensions%2FPicturePlayer%2Fplugin.py;h=169a8c8a0ad6918bb862dc88f9490a0cad1f8d19;hb=e19feb6903e6054302080ae40d2bcfa5c2d1628e;hp=7902b14d03377b2ed40ee9aed290d65a62d33162;hpb=f465e5318690b0fb2dfd76964e07d16a6f57b12c;p=vuplus_dvbapp diff --git a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py old mode 100755 new mode 100644 index 7902b14..169a8c8 --- a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py +++ b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py @@ -145,34 +145,32 @@ class picshow(Screen): #------------------------------------------------------------------------------------------ class Pic_Setup(Screen, ConfigListScreen): - skin = """ - - - - - - - """ + def __init__(self, session): Screen.__init__(self, session) + # for the skin: first try MediaPlayerSettings, then Setup, this allows individual skinning + self.skinName = ["PicturePlayerSetup", "Setup" ] + self.setup_title = _("Settings") + self.onChangedEntry = [ ] self.session = session - self["actions"] = ActionMap(["SetupActions", "ColorActions"], + self["actions"] = ActionMap(["SetupActions"], { "cancel": self.keyCancel, "save": self.keySave, + "ok": self.keySave, }, -2) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self.list = [] - ConfigListScreen.__init__(self, self.list, session = self.session) + ConfigListScreen.__init__(self, self.list, session = self.session, on_change = self.changedEntry) self.createSetup() self.onLayoutFinish.append(self.layoutFinished) def layoutFinished(self): - self.setTitle(_("Settings")) + self.setTitle(self.setup_title) def createSetup(self): self.list = [] @@ -193,6 +191,21 @@ class Pic_Setup(Screen, ConfigListScreen): def keyRight(self): ConfigListScreen.keyRight(self) + # for summary: + def changedEntry(self): + for x in self.onChangedEntry: + x() + + def getCurrentEntry(self): + return self["config"].getCurrent()[0] + + def getCurrentValue(self): + return str(self["config"].getCurrent()[1].getText()) + + def createSummary(self): + from Screens.Setup import SetupSummary + return SetupSummary + #--------------------------------------------------------------------------- class Pic_Exif(Screen): @@ -612,5 +625,5 @@ def filescan(**kwargs): def Plugins(**kwargs): return \ - [PluginDescriptor(name=_("PicturePlayer"), description=_("fileformats (BMP, PNG, JPG, GIF)"), icon="pictureplayer.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main), - PluginDescriptor(name=_("PicturePlayer"), where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)] + [PluginDescriptor(name=_("PicturePlayer"), description=_("fileformats (BMP, PNG, JPG, GIF)"), icon="pictureplayer.png", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main), + PluginDescriptor(name=_("PicturePlayer"), where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan)]