File 0009-Fixed-Main-menu-info-area-with-VDR-1.7.28.patch of Package vdr-plugin-skinenigmang
From 5772879e19b1588bbb541a6f7565caf5b9dbd5d6 Mon Sep 17 00:00:00 2001
From: Andreas Mair <amair.sob@googlemail.com>
Date: Wed, 6 Jun 2012 16:23:02 +0200
Subject: [PATCH 09/19] Fixed: Main menu info area with VDR 1.7.28+.
---
HISTORY | 1 +
enigma.c | 11 +++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/HISTORY b/HISTORY
index 7d55f56..ba88423 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2,6 +2,7 @@ VDR Skin 'EnigmaNG' Revision History
------------------------------------------
2012-xx-xx: Version 0.1.3
+- Fixed: Main menu info area with VDR 1.7.28+.
- Added: Setup options to set width of signal information and progress bar in channel info OSD.
2012-04-29: Version 0.1.2
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;
--
2.20.1