summaryrefslogtreecommitdiff
path: root/enigma.c
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2012-06-06 16:23:02 +0200
committerAndreas Mair <amair.sob@googlemail.com>2012-06-06 16:23:02 +0200
commit5772879e19b1588bbb541a6f7565caf5b9dbd5d6 (patch)
tree36764175921792c51ac3eecd2b8bbc8f7f274f8e /enigma.c
parent2fb36b85a08044c687354f56ec60ffe3515ebfb8 (diff)
downloadvdr-plugin-skinenigmang-5772879e19b1588bbb541a6f7565caf5b9dbd5d6.tar.gz
vdr-plugin-skinenigmang-5772879e19b1588bbb541a6f7565caf5b9dbd5d6.tar.bz2
Fixed: Main menu info area with VDR 1.7.28+.
Diffstat (limited to 'enigma.c')
-rw-r--r--enigma.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/enigma.c b/enigma.c
index 4db0a7d..6282017 100644
--- a/enigma.c
+++ b/enigma.c
@@ -1740,11 +1740,16 @@ void cSkinEnigmaDisplayMenu::SetTitle(const char *Title)
strTitle = NULL;
}
+#if VDRVERSNUM >= 10728
+#define IS_MAINMENU (MenuCategory() == mcMain)
+#else
char *strTitlePrefix = NULL;
if (-1 == asprintf(&strTitlePrefix, "%s - ", trVDR("VDR")))
return;
+#define IS_MAINMENU (strncmp(strTitlePrefix, Title, strlen(strTitlePrefix)) == 0)
+#endif
- if ((Title == NULL) || (isMainMenu && strncmp(strTitlePrefix, Title, strlen(strTitlePrefix)) == 0)) {
+ if ((Title == NULL) || (isMainMenu && IS_MAINMENU)) {
if (fLockNeeded && !fLocked) {
fLocked = true;
TE_LOCK;
@@ -1756,7 +1761,7 @@ void cSkinEnigmaDisplayMenu::SetTitle(const char *Title)
bool old_fShowLogo = fShowLogo;
bool old_fShowInfo = fShowInfo;
- if (strTitle == NULL || strncmp(strTitlePrefix, strTitle, strlen(strTitlePrefix)) == 0) {
+ if (strTitle == NULL || IS_MAINMENU) {
isMainMenu = true;
fShowLogo = fShowLogoDefault ? EnigmaConfig.showSymbolsMenu : false;
fShowInfo = EnigmaConfig.showInfo;
@@ -1799,7 +1804,9 @@ void cSkinEnigmaDisplayMenu::SetTitle(const char *Title)
if (fLockNeeded && !fLocked) TE_UNLOCK;
}
}
+#if VDRVERSNUM < 10728
free (strTitlePrefix);
+#endif
free(strLastDate);
strLastDate = NULL;