On 12/07/2011 01:01 PM, Arturo Martinez wrote:
Is there a patch for vdr-prefermenu to work with vdr 1.7.21 ?
If you prefer the small OSD of original prefermenu-plugin then there are 3 patches in debian unstable so it works also with new versions of vdr (I tested it with 1.7.22). The patches are attached.
-- Matti Lehtimäki
#! /bin/sh /usr/share/dpatch/dpatch-run ## 01_Makefile-fPIC-fix.dpatch by Thomas Schmidt <thomas.schmidt@xxxxxxxxxxxxxxxxxxxxx> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Adds -fPIC to Makefile @DPATCH@ diff -urNad /usr/src/self-compiled/vdr/plugins/prefermenu/vdr-plugin-prefermenu-0.6.2/Makefile vdr-plugin-prefermenu-0.6.2/Makefile --- /usr/src/self-compiled/vdr/plugins/prefermenu/vdr-plugin-prefermenu-0.6.2/Makefile 2004-08-05 22:48:29.000000000 +0200 +++ vdr-plugin-prefermenu-0.6.2/Makefile 2004-08-05 22:49:27.000000000 +0200 @@ -16,7 +16,7 @@ ### The C++ compiler and options: CXX ?= g++ -CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual +CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual ### The directory environment:
#!/bin/sh /usr/share/dpatch/dpatch-run ## makefile ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: add -D_GNU_SOURCE to enable GNU extensions @DPATCH@ Index: vdr-plugin-prefermenu-0.6.6/Makefile =================================================================== --- vdr-plugin-prefermenu-0.6.6.orig/Makefile 2011-04-09 13:51:33.000000000 +0200 +++ vdr-plugin-prefermenu-0.6.6/Makefile 2011-04-09 13:51:34.000000000 +0200 @@ -46,6 +46,7 @@ endif DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -D_GNU_SOURCE ### The object files (add further files here):
#! /bin/sh /usr/share/dpatch/dpatch-run ## 90_prefermenu-0.6.6-1.5.3+SetAreas-bugfix.dpatch by Thomas Günther <tom@xxxxxxxxxxxx> ## http://toms-cafe.de/vdr/download/prefermenu-0.6.6-1.5.3+SetAreas-bugfix.diff ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Changes for VDR >= 1.5.3. @DPATCH@ Index: vdr-plugin-prefermenu-0.6.6/prefermenu.c =================================================================== --- vdr-plugin-prefermenu-0.6.6.orig/prefermenu.c 2005-01-11 20:09:40.000000000 +0100 +++ vdr-plugin-prefermenu-0.6.6/prefermenu.c 2011-04-09 13:51:46.000000000 +0200 @@ -75,6 +75,7 @@ } // Clean up the file with current VDR channels.conf PreferedChannelsList.Save(); + const int LINEHEIGHT = cFont::GetFont(fontOsd)->Height(); config.height= (config.lines * (LINEHEIGHT+BORDERSIZE+2))+BORDERSIZE; return new cPreferOsd; } Index: vdr-plugin-prefermenu-0.6.6/preferosd.c =================================================================== --- vdr-plugin-prefermenu-0.6.6.orig/preferosd.c 2006-05-06 15:19:28.000000000 +0200 +++ vdr-plugin-prefermenu-0.6.6/preferosd.c 2011-04-09 13:51:46.000000000 +0200 @@ -60,7 +60,8 @@ } osd=cOsdProvider::NewOsd(config.originx, config.originy); if (osd) { - tArea Area = { 0, 0, config.width+LINEHEIGHT, config.height-1, 4}; + const int LINEHEIGHT = cFont::GetFont(fontOsd)->Height(); + tArea Area = { 0, 0, ((config.width+LINEHEIGHT) & ~0x01) - 1, config.height-1, 4}; osd->SetAreas(&Area, 1); DrawPreferMenu(0,0); DisplayPreferMenu(); @@ -168,6 +169,7 @@ { if (current > 1) { current -= 1; + const int LINEHEIGHT = cFont::GetFont(fontOsd)->Height(); DrawPreferMenu(-LINEHEIGHT,1); DisplayPreferMenu(); //DrawPreferMneu(-10,1); @@ -181,6 +183,7 @@ { if (current < number) { current += 1; + const int LINEHEIGHT = cFont::GetFont(fontOsd)->Height(); DrawPreferMenu(+LINEHEIGHT,-1); DisplayPreferMenu(); //DrawPreferMenu(+10,-1); @@ -315,6 +318,8 @@ void cPreferOsd::DrawPreferMenu(int delta, int highlight) { + const cFont *font = cFont::GetFont(fontOsd); + const int LINEHEIGHT = font->Height(); int middle = int(config.height/2) + config.height%2; @@ -390,6 +395,8 @@ void cPreferOsd::DrawChannelsNames(int delta) { + const cFont *font = cFont::GetFont(fontOsd); + const int LINEHEIGHT = font->Height(); // XXX The margin is hardcoded for now // TODO: make it more flexible Index: vdr-plugin-prefermenu-0.6.6/preferosd.h =================================================================== --- vdr-plugin-prefermenu-0.6.6.orig/preferosd.h 2006-05-04 21:59:17.000000000 +0200 +++ vdr-plugin-prefermenu-0.6.6/preferosd.h 2011-04-09 13:51:46.000000000 +0200 @@ -4,8 +4,6 @@ #include <vdr/plugin.h> static const int BORDERSIZE = 2; -static const cFont *font = cFont::GetFont(fontOsd); -static const int LINEHEIGHT = font->Height(); class cPreferOsd : public cOsdObject {
_______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr