GUISkin: add getSkinTitle
authorDima73 <Dima-73@inbox.lv>
Sat, 12 Dec 2015 20:22:09 +0000 (22:22 +0200)
committerErik Slagter <erik@openpli.org>
Sun, 13 Dec 2015 12:28:29 +0000 (13:28 +0100)
(cherry picked from commit 6f0dc116daba6e89b0fa01d30cb13f30cbdc0461)
Signed-off-by: Erik Slagter <erik@openpli.org>

lib/python/Components/GUISkin.py

index 5d4068a..3f3d6dd 100644 (file)
@@ -74,12 +74,16 @@ class GUISkin:
        def getTitle(self):
                return self["Title"].text
 
+       def getSkinTitle(self):
+               return hasattr(self, "skin_title") and self.skin_title or ""
+
        title = property(getTitle, setTitle)
 
        def setDesktop(self, desktop):
                self.desktop = desktop
 
        def applySkin(self):
+               self.skin_title = ""
                z = 0
                baseres = (720, 576) # FIXME: a skin might have set another resolution, which should be the base res
                idx = 0
@@ -89,6 +93,7 @@ class GUISkin:
                        if key == "zPosition":
                                z = int(value)
                        elif key == "title":
+                               self.skin_title = value
                                skin_title_idx = idx
                                if title:
                                        self.skinAttributes[skin_title_idx] = ("title", title)