Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > d86b5295c5577708848c16d0c598128c > files > 4

vdr-skinenigmang-0.1.2-11.fc18.src.rpm

From 5772879e19b1588bbb541a6f7565caf5b9dbd5d6 Mon Sep 17 00:00:00 2001
From: Andreas Mair
Date: Wed, 06 Jun 2012 14:23:02 +0000
Subject: Fixed: Main menu info area with VDR 1.7.28+.

---
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;
--
cgit v0.9.0.2-39-g756e