summaryrefslogtreecommitdiff
path: root/plugins/prefermenu
diff options
context:
space:
mode:
authorroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
committerroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
commit0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch)
tree11517ce0d3d2977c6732b3aa583b0008083e0bd3 /plugins/prefermenu
downloadx-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz
x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2
hello world
Diffstat (limited to 'plugins/prefermenu')
-rw-r--r--plugins/prefermenu/patches/prefermenu-0.6.6-1.5.3+SetAreas-bugfix.diff74
-rw-r--r--plugins/prefermenu/plugin.sh52
2 files changed, 126 insertions, 0 deletions
diff --git a/plugins/prefermenu/patches/prefermenu-0.6.6-1.5.3+SetAreas-bugfix.diff b/plugins/prefermenu/patches/prefermenu-0.6.6-1.5.3+SetAreas-bugfix.diff
new file mode 100644
index 0000000..16aa518
--- /dev/null
+++ b/plugins/prefermenu/patches/prefermenu-0.6.6-1.5.3+SetAreas-bugfix.diff
@@ -0,0 +1,74 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 90_prefermenu-0.6.6-1.5.3+SetAreas-bugfix.dpatch by Thomas Günther <tom@toms-cafe.de>
+## 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@
+--- prefermenu-0.6.6/prefermenu.c
++++ prefermenu-0.6.6/prefermenu.c
+@@ -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;
+ }
+--- prefermenu-0.6.6/preferosd.c
++++ prefermenu-0.6.6/preferosd.c
+@@ -60,6 +60,7 @@
+ }
+ 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);
+@@ -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
+--- prefermenu-0.6.6/preferosd.h
++++ prefermenu-0.6.6/preferosd.h
+@@ -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 {
diff --git a/plugins/prefermenu/plugin.sh b/plugins/prefermenu/plugin.sh
new file mode 100644
index 0000000..8fa1224
--- /dev/null
+++ b/plugins/prefermenu/plugin.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis)
+# von Marc Wernecke - www.zulu-entertainment.de
+# 05.05.2008
+#
+# vdr-prefermenu
+
+# defaults
+source ./../../x-vdr.conf
+source ./../../setup.conf
+source ./../../functions
+
+WEB="http://vdr-wiki.de/vdr/vdr-prefermenu/vdr-prefermenu-0.6.6.tgz"
+VERSION="prefermenu-0.6.6"
+LINK="prefermenu"
+
+VAR=`basename $WEB`
+DIR=`pwd`
+
+# plugin entfernen
+function clean_plugin() {
+ cd $SOURCEDIR/VDR/PLUGINS/src
+ rm -rf $LINK*
+ rm -f $VDRLIBDIR/libvdr-$LINK*
+ log "cleaning $LINK"
+}
+
+# plugin installieren
+function install_plugin() {
+ download_plugin
+ extract_plugin
+ cd $SOURCEDIR/VDR/PLUGINS/src
+ rm -f $LINK
+ ln -vfs $VERSION $LINK
+ patch_plugin
+
+ ## plugin specials - start ##
+
+ ## plugin specials - ende ##
+}
+
+# plugin commands
+if [ $# \> 0 ]; then
+ cmd=$1
+ cmd_plugin
+else
+ install_plugin
+ log "install-plugin fuer $VERSION ist fertig"
+fi
+
+exit 0