ChoiceBox: add check for the original title of the skin
authorDima73 <Dima-73@inbox.lv>
Sat, 12 Dec 2015 20:20:11 +0000 (22:20 +0200)
committerErik Slagter <erik@openpli.org>
Sun, 13 Dec 2015 12:28:06 +0000 (13:28 +0100)
if title is '' or not title not set new title

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

lib/python/Screens/ChoiceBox.py

index 9122d00..fa243e2 100644 (file)
@@ -87,10 +87,16 @@ class ChoiceBox(Screen):
                        "moveDown": self.additionalMoveDown,
                        "menu": self.setDefaultChoiceList
                }, -1)
+               self.windowTitle = windowTitle
+               self.onLayoutFinish.append(self.layoutFinished)
 
-               if windowTitle is None:
-                       windowTitle = _("Select")
-               self.setTitle(windowTitle)
+       def layoutFinished(self):
+               if self.windowTitle is None:
+                       if self.getSkinTitle():
+                               self.windowTitle = _("Select")
+                       else:
+                               self.windowTitle = ""
+               self.setTitle(self.windowTitle)
 
        def autoResize(self):
                orgwidth = self.instance.size().width()