r8478 - in /vdr/vdr-plugin-extrecmenu/trunk/debian: changelog control copyright patches/00list patches/91_vdr-1.7.12-extrec.dpatch
tom-guest at users.alioth.debian.org
tom-guest at users.alioth.debian.org
Wed Mar 17 01:50:45 UTC 2010
Author: tom-guest
Date: Wed Mar 17 01:50:45 2010
New Revision: 8478
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/?sc=1&rev=8478
Log:
* Added 91_vdr-1.7.12-extrec.dpatch
* Standards-Version: 3.8.4
Added:
vdr/vdr-plugin-extrecmenu/trunk/debian/patches/91_vdr-1.7.12-extrec.dpatch
Modified:
vdr/vdr-plugin-extrecmenu/trunk/debian/changelog
vdr/vdr-plugin-extrecmenu/trunk/debian/control
vdr/vdr-plugin-extrecmenu/trunk/debian/copyright
vdr/vdr-plugin-extrecmenu/trunk/debian/patches/00list
Modified: vdr/vdr-plugin-extrecmenu/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-extrecmenu/trunk/debian/changelog?rev=8478&op=diff
==============================================================================
--- vdr/vdr-plugin-extrecmenu/trunk/debian/changelog (original)
+++ vdr/vdr-plugin-extrecmenu/trunk/debian/changelog Wed Mar 17 01:50:45 2010
@@ -1,3 +1,10 @@
+vdr-plugin-extrecmenu (1.2~test1-3) experimental; urgency=low
+
+ * Added 91_vdr-1.7.12-extrec.dpatch
+ * Standards-Version: 3.8.4
+
+ -- Thomas Günther <tom at toms-cafe.de> Mon, 15 Mar 2010 18:05:54 +0100
+
vdr-plugin-extrecmenu (1.2~test1-2) experimental; urgency=low
* Removed non-standard shebang line from debian/rules
Modified: vdr/vdr-plugin-extrecmenu/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-extrecmenu/trunk/debian/control?rev=8478&op=diff
==============================================================================
--- vdr/vdr-plugin-extrecmenu/trunk/debian/control (original)
+++ vdr/vdr-plugin-extrecmenu/trunk/debian/control Wed Mar 17 01:50:45 2010
@@ -4,7 +4,7 @@
Maintainer: Debian VDR Team <pkg-vdr-dvb-devel at lists.alioth.debian.org>
Uploaders: Thomas Günther <tom at toms-cafe.de>, Tobias Grimm <etobi at debian.org>, Thomas Schmidt <tschmidt at debian.org>
Build-Depends: debhelper (>= 5), cdbs, dpatch, vdr-dev (>= 1.6.0-5), gettext
-Standards-Version: 3.8.3
+Standards-Version: 3.8.4
Vcs-Svn: svn://svn.debian.org/pkg-vdr-dvb/vdr/vdr-plugin-extrecmenu/trunk/
Vcs-Browser: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-extrecmenu/trunk/
Modified: vdr/vdr-plugin-extrecmenu/trunk/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-extrecmenu/trunk/debian/copyright?rev=8478&op=diff
==============================================================================
--- vdr/vdr-plugin-extrecmenu/trunk/debian/copyright (original)
+++ vdr/vdr-plugin-extrecmenu/trunk/debian/copyright Wed Mar 17 01:50:45 2010
@@ -15,8 +15,8 @@
(C) 2006 Mike Constabel (dvdarchive.sh)
Copyright (Debian packaging):
+ (C) 2006 - 2010 Tobias Grimm, Thomas Günther, Thomas Schmidt
(C) 2006 Stefan Wagner
- (C) 2006 - 2009 Tobias Grimm, Thomas Günther, Thomas Schmidt
License:
This program is free software; you can redistribute it and/or modify
Modified: vdr/vdr-plugin-extrecmenu/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-extrecmenu/trunk/debian/patches/00list?rev=8478&op=diff
==============================================================================
--- vdr/vdr-plugin-extrecmenu/trunk/debian/patches/00list (original)
+++ vdr/vdr-plugin-extrecmenu/trunk/debian/patches/00list Wed Mar 17 01:50:45 2010
@@ -1,2 +1,3 @@
01_dvdarchive-path
90_extrecmenu-1.2-test1-am2b
+91_vdr-1.7.12-extrec
Added: vdr/vdr-plugin-extrecmenu/trunk/debian/patches/91_vdr-1.7.12-extrec.dpatch
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-extrecmenu/trunk/debian/patches/91_vdr-1.7.12-extrec.dpatch?rev=8478&op=file
==============================================================================
--- vdr/vdr-plugin-extrecmenu/trunk/debian/patches/91_vdr-1.7.12-extrec.dpatch (added)
+++ vdr/vdr-plugin-extrecmenu/trunk/debian/patches/91_vdr-1.7.12-extrec.dpatch Wed Mar 17 01:50:45 2010
@@ -1,0 +1,204 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 90_extrecmenu-1.2-test1-am2b.dpatch by helau at vdrportal.de
+## http://vdrportal.de/board/thread.php?postid=881950#post881950
+##
+## Thomas Günther <tom at toms-cafe.de>:
+## - Added compatibility to VDR < 1.7.12
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Changes for VDR >= 1.7.12.
+
+ at DPATCH@
+diff -Naurp extrecmenu-1.2-test1-am2b/extrecmenu.c extrecmenu-1.2-test1-am2b-10712/extrecmenu.c
+--- extrecmenu-1.2-test1-am2b/extrecmenu.c 2010-03-17 00:54:41.000000000 +0000
++++ extrecmenu-1.2-test1-am2b-10712/extrecmenu.c 2010-03-17 01:19:43.000000000 +0000
+@@ -74,7 +74,11 @@ bool cPluginExtrecmenu::Start(void)
+
+ MoveCutterThread=new WorkerThread();
+
++#if VDRVERSNUM >= 10712
++ RecordingDirCommands.Load(AddDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N), "dircmds.conf"));
++#else
+ RecordingDirCommands.Load(AddDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N), "dircmds.conf"), true);
++#endif
+
+ return true;
+ }
+diff -Naurp extrecmenu-1.2-test1-am2b/mymenucommands.c extrecmenu-1.2-test1-am2b-10712/mymenucommands.c
+--- extrecmenu-1.2-test1-am2b/mymenucommands.c 2010-03-17 00:54:41.000000000 +0000
++++ extrecmenu-1.2-test1-am2b-10712/mymenucommands.c 2010-03-17 01:35:28.000000000 +0000
+@@ -9,22 +9,108 @@
+ #include <vdr/interface.h>
+ #include "mymenucommands.h"
+
++#if VDRVERSNUM >= 10712
++myMenuCommands::myMenuCommands(const char *Title,cList<cNestedItem> *_Commands,const char *Parameters):cOsdMenu(Title)
++#else
+ myMenuCommands::myMenuCommands(const char *Title,cCommands *_Commands,const char *Parameters):cOsdMenu(Title)
++#endif
+ {
++#if VDRVERSNUM >= 10712
++ result = NULL;
++#endif
+ SetHasHotkeys();
+ commands=_Commands;
++#if VDRVERSNUM >= 10712
++ parameters = Parameters;
++ for (cNestedItem *Command = commands->First(); Command; Command = commands->Next(Command)) {
++ const char *s = Command->Text();
++ if (Command->SubItems())
++ Add(new cOsdItem(hk(cString::sprintf("%s...", s))));
++ else if (Parse(s))
++ Add(new cOsdItem(hk(title)));
++ }
++#else
+ parameters=Parameters?strdup(Parameters):NULL;
+ for(cCommand *command=commands->First();command;command=commands->Next(command))
+ Add(new cOsdItem(hk(command->Title())));
++#endif
+ }
+
+ myMenuCommands::~myMenuCommands()
+ {
++#if VDRVERSNUM >= 10712
++ free(result);
++#else
+ free(parameters);
++#endif
+ }
+
++#if VDRVERSNUM >= 10712
++bool myMenuCommands::Parse(const char *s)
++{
++ const char *p = strchr(s, ':');
++ if (p) {
++ int l = p - s;
++ if (l > 0) {
++ char t[l + 1];
++ stripspace(strn0cpy(t, s, l + 1));
++ l = strlen(t);
++ if (l > 1 && t[l - 1] == '?') {
++ t[l - 1] = 0;
++ confirm = true;
++ }
++ else
++ confirm = false;
++ title = t;
++ command = skipspace(p + 1);
++ return true;
++ }
++ }
++ return false;
++}
++#endif
++
+ eOSState myMenuCommands::Execute()
+ {
++#if VDRVERSNUM >= 10712
++ cNestedItem *Command = commands->Get(Current());
++ if (Command) {
++ if (Command->SubItems())
++ return AddSubMenu(new myMenuCommands(Title(), Command->SubItems(), parameters));
++ if (Parse(Command->Text())) {
++ if (!confirm || Interface->Confirm(cString::sprintf("%s?", *title))) {
++ Skins.Message(mtStatus, cString::sprintf("%s...", *title));
++ free(result);
++ result = NULL;
++ cString cmdbuf;
++ if (!isempty(parameters))
++ cmdbuf = cString::sprintf("%s %s", *command, *parameters);
++ const char *cmd = *cmdbuf ? *cmdbuf : *command;
++ dsyslog("executing command '%s'", cmd);
++ cPipe p;
++ if (p.Open(cmd, "r")) {
++ int l = 0;
++ int c;
++ while ((c = fgetc(p)) != EOF) {
++ if (l % 20 == 0)
++ result = (char *)realloc(result, l + 21);
++ result[l++] = char(c);
++ }
++ if (result)
++ result[l] = 0;
++ p.Close();
++ }
++ else
++ esyslog("ERROR: can't open pipe for command '%s'", cmd);
++ Skins.Message(mtStatus, NULL);
++ if (result)
++ return AddSubMenu(new cMenuText(title, result, fontFix));
++ return osEnd;
++ }
++ }
++ }
++ return osContinue;
++#else
+ cCommand *command=commands->Get(Current());
+ if(command)
+ {
+@@ -54,6 +140,7 @@ eOSState myMenuCommands::Execute()
+ }
+ }
+ return osContinue;
++#endif
+ }
+
+ eOSState myMenuCommands::ProcessKey(eKeys Key)
+diff -Naurp extrecmenu-1.2-test1-am2b/mymenucommands.h extrecmenu-1.2-test1-am2b-10712/mymenucommands.h
+--- extrecmenu-1.2-test1-am2b/mymenucommands.h 2010-01-16 17:52:11.000000000 +0000
++++ extrecmenu-1.2-test1-am2b-10712/mymenucommands.h 2010-03-17 01:18:56.000000000 +0000
+@@ -1,11 +1,25 @@
+ class myMenuCommands:public cOsdMenu
+ {
+ private:
++#if VDRVERSNUM >= 10712
++ cList<cNestedItem> *commands;
++ cString parameters;
++ cString title;
++ cString command;
++ bool confirm;
++ char *result;
++ bool Parse(const char *s);
++#else
+ cCommands *commands;
+ char *parameters;
++#endif
+ eOSState Execute(void);
+ public:
++#if VDRVERSNUM >= 10712
++ myMenuCommands(const char *Title, cList<cNestedItem> *Commands, const char *Parameters = NULL);
++#else
+ myMenuCommands(const char *Title, cCommands *Commands, const char *Parameters = NULL);
++#endif
+ virtual ~myMenuCommands();
+ virtual eOSState ProcessKey(eKeys Key);
+ };
+diff -Naurp extrecmenu-1.2-test1-am2b/mymenusetup.c extrecmenu-1.2-test1-am2b-10712/mymenusetup.c
+--- extrecmenu-1.2-test1-am2b/mymenusetup.c 2010-03-17 00:54:41.000000000 +0000
++++ extrecmenu-1.2-test1-am2b-10712/mymenusetup.c 2010-03-17 01:16:14.000000000 +0000
+@@ -5,7 +5,11 @@
+ #include <vdr/menu.h>
+ #include "mymenusetup.h"
+
++#if VDRVERSNUM >= 10712
++cNestedItemList RecordingDirCommands;
++#else
+ cCommands RecordingDirCommands;
++#endif
+
+ mySetup::mySetup()
+ {
+diff -Naurp extrecmenu-1.2-test1-am2b/mymenusetup.h extrecmenu-1.2-test1-am2b-10712/mymenusetup.h
+--- extrecmenu-1.2-test1-am2b/mymenusetup.h 2010-03-17 00:54:41.000000000 +0000
++++ extrecmenu-1.2-test1-am2b-10712/mymenusetup.h 2010-03-17 01:15:31.000000000 +0000
+@@ -1,6 +1,10 @@
+ #include <vdr/menu.h>
+
++#if VDRVERSNUM >= 10712
++extern cNestedItemList RecordingDirCommands;
++#else
+ extern cCommands RecordingDirCommands;
++#endif
+
+ class mySetup
+ {
More information about the pkg-vdr-dvb-changes
mailing list