Add windowTitle when open ChoiceBox
authorDima73 <Dima-73@inbox.lv>
Sun, 13 Dec 2015 13:36:01 +0000 (15:36 +0200)
committerErik Slagter <erik@openpli.org>
Mon, 14 Dec 2015 17:54:36 +0000 (18:54 +0100)
-for more informative menu and understandability
users
-if skin title ="" set windowTitle ''

(cherry picked from commit 9cf47ab54e56e0c3e2c392617a33a2a152233bb6)
Signed-off-by: Erik Slagter <erik@openpli.org>

lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
lib/python/Screens/ChoiceBox.py
lib/python/Screens/EpgSelection.py
lib/python/Screens/EventView.py
lib/python/Screens/InfoBarGenerics.py

index e392a49..3f2abb0 100644 (file)
@@ -1061,7 +1061,7 @@ class GraphMultiEPG(Screen, HelpableScreen):
                        def boxAction(choice):
                                if choice:
                                        choice[1]()
-                       self.session.openWithCallback(boxAction, ChoiceBox, title=text, list=menu)
+                       self.session.openWithCallback(boxAction, ChoiceBox, title=text, list=menu, windowTitle=_("Further options"))
 
        def runPlugin(self, plugin):
                event = self["list"].getCurrent()
index fa243e2..a5e9588 100644 (file)
@@ -92,10 +92,9 @@ class ChoiceBox(Screen):
 
        def layoutFinished(self):
                if self.windowTitle is None:
-                       if self.getSkinTitle():
-                               self.windowTitle = _("Select")
-                       else:
-                               self.windowTitle = ""
+                       self.windowTitle = _("Select")
+               if not self.getSkinTitle():
+                       self.windowTitle = ""
                self.setTitle(self.windowTitle)
 
        def autoResize(self):
index 5460641..1f01f3e 100644 (file)
@@ -36,7 +36,6 @@ class EPGSelection(Screen):
 
        def __init__(self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None):
                Screen.__init__(self, session)
-               self.setTitle(_("EPG selection"))
                self.bouquetChangeCB = bouquetChangeCB
                self.serviceChangeCB = serviceChangeCB
                self.ask_time = -1 #now
@@ -48,6 +47,7 @@ class EPGSelection(Screen):
                self.session = session
                if isinstance(service, str) and eventid != None:
                        self.type = EPG_TYPE_SIMILAR
+                       self.setTitle(_("Similar EPG"))
                        self["key_yellow"] = Button()
                        self["key_blue"] = Button()
                        self["key_red"] = Button()
@@ -55,6 +55,7 @@ class EPGSelection(Screen):
                        self.eventid = eventid
                        self.zapFunc = None
                elif isinstance(service, eServiceReference) or isinstance(service, str):
+                       self.setTitle(_("Single EPG"))
                        self.type = EPG_TYPE_SINGLE
                        self["key_yellow"] = Button()
                        self["key_blue"] = Button(_("Select Channel"))
@@ -63,6 +64,7 @@ class EPGSelection(Screen):
                        self.sort_type = 0
                        self.setSortDescription()
                else:
+                       self.setTitle(_("Multi EPG"))
                        self.skinName = "EPGSelectionMulti"
                        self.type = EPG_TYPE_MULTI
                        self["key_yellow"] = Button(pgettext("button label, 'previous screen'", "Prev"))
@@ -145,7 +147,7 @@ class EPGSelection(Screen):
                        def boxAction(choice):
                                if choice:
                                        choice[1]()
-                       self.session.openWithCallback(boxAction, ChoiceBox, title=text, list=menu)
+                       self.session.openWithCallback(boxAction, ChoiceBox, title=text, list=menu, windowTitle=_("Further options"))
 
        def runPlugin(self, plugin):
                event = self["list"].getCurrent()
index 9406e97..58e53c5 100644 (file)
@@ -290,7 +290,7 @@ class EventViewBase:
                                        if choice:
                                                choice[1]()
                                text += _(": %s") % self.event.getEventName()
-                               self.session.openWithCallback(boxAction, ChoiceBox, title=text, list=menu)
+                               self.session.openWithCallback(boxAction, ChoiceBox, title=text, list=menu, windowTitle=_("Event view context menu"))
 
        def runPlugin(self, plugin):
                plugin(session=self.session, service=self.currentService, event=self.event, eventName=self.event.getEventName())
index 1cf0a98..590697b 100644 (file)
@@ -1043,7 +1043,7 @@ class InfoBarEPG:
        def showEventInfoPlugins(self):
                pluginlist = self.getEPGPluginList()
                if pluginlist:
-                       self.session.openWithCallback(self.EventInfoPluginChosen, ChoiceBox, title=_("Please choose an extension..."), list=pluginlist, skin_name="EPGExtensionsList", reorderConfig="eventinfo_order")
+                       self.session.openWithCallback(self.EventInfoPluginChosen, ChoiceBox, title=_("Please choose an extension..."), list=pluginlist, skin_name="EPGExtensionsList", reorderConfig="eventinfo_order", windowTitle=_("Events info menu"))
                else:
                        self.openSingleServiceEPG()
 
@@ -2011,7 +2011,7 @@ class InfoBarExtensions:
                list.extend([(x[0](), x) for x in extensionsList])
 
                keys += [""] * len(extensionsList)
-               self.session.openWithCallback(self.extensionCallback, ChoiceBox, title=_("Please choose an extension..."), list=list, keys=keys, skin_name="ExtensionsList", reorderConfig="extension_order")
+               self.session.openWithCallback(self.extensionCallback, ChoiceBox, title=_("Please choose an extension..."), list=list, keys=keys, skin_name="ExtensionsList", reorderConfig="extension_order", windowTitle=_("Extensions menu"))
 
        def extensionCallback(self, answer):
                if answer is not None: