diff options
author | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-07-28 10:25:40 +0000 |
---|---|---|
committer | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-07-28 10:25:40 +0000 |
commit | b1376935b035fd0994705ce7083d116bf4c61e30 (patch) | |
tree | 0d5fe13ff06af3e949e36ad9178cf270c80f8358 /vdr-patch | |
parent | 68e0fa1bf7d1c311b632b7409ff62e3769ed2a8e (diff) | |
download | vdr-plugin-menuorg-b1376935b035fd0994705ce7083d116bf4c61e30.tar.gz vdr-plugin-menuorg-b1376935b035fd0994705ce7083d116bf4c61e30.tar.bz2 |
moved some code from the patch to the plugin
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/submenu/trunk@5664 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
Diffstat (limited to 'vdr-patch')
-rwxr-xr-x | vdr-patch/opt-37_submenu.dpatch | 112 |
1 files changed, 9 insertions, 103 deletions
diff --git a/vdr-patch/opt-37_submenu.dpatch b/vdr-patch/opt-37_submenu.dpatch index 92335ea..ea9f50d 100755 --- a/vdr-patch/opt-37_submenu.dpatch +++ b/vdr-patch/opt-37_submenu.dpatch @@ -3,21 +3,9 @@ ## DP: This patch is needed for the submenu plugin. @DPATCH@ -diff -urNad vdr-1.4.7~/Makefile vdr-1.4.7/Makefile ---- vdr-1.4.7~/Makefile 2007-07-26 23:27:29.000000000 +0200 -+++ vdr-1.4.7/Makefile 2007-07-26 23:27:30.000000000 +0200 -@@ -38,7 +38,7 @@ - lirc.o menu.o menuitems.o nit.o osdbase.o osd.o pat.o player.o plugin.o rcu.o\ - receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sdt.o sections.o\ - skinclassic.o skins.o skinsttng.o sources.o spu.o status.o svdrp.o themes.o thread.o\ -- timers.o tools.o transfer.o vdr.o videodir.o -+ timers.o tools.o transfer.o vdr.o videodir.o submenupatch.o - - OBJS += osdcontroller.o rcontroller.o dvbsub.o vdrttxtsubshooks.o - diff -urNad vdr-1.4.7~/menu.c vdr-1.4.7/menu.c ---- vdr-1.4.7~/menu.c 2007-07-26 23:27:29.000000000 +0200 -+++ vdr-1.4.7/menu.c 2007-07-26 23:30:16.000000000 +0200 +--- vdr-1.4.7~/menu.c 2007-07-28 12:12:30.000000000 +0200 ++++ vdr-1.4.7/menu.c 2007-07-28 12:12:31.000000000 +0200 @@ -31,6 +31,7 @@ #include "vdrttxtsubshooks.h" #include "dvbsub.h" @@ -101,89 +89,10 @@ diff -urNad vdr-1.4.7~/menu.c vdr-1.4.7/menu.c default: switch (Key) { case kRecord: case kRed: if (!HadSubMenu) -diff -urNad vdr-1.4.7~/submenupatch.c vdr-1.4.7/submenupatch.c ---- vdr-1.4.7~/submenupatch.c 1970-01-01 01:00:00.000000000 +0100 -+++ vdr-1.4.7/submenupatch.c 2007-07-26 23:27:30.000000000 +0200 -@@ -0,0 +1,75 @@ -+/* -+ * vdr-submenu - A plugin for the Linux Video Disk Recorder -+ * Copyright (c) 2007 Tobias Grimm <vdr@e-tobi.net> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * $Id$ -+ * -+ */ -+ -+#include "submenupatch.h" -+ -+namespace SubMenuPatch -+{ -+ -+class CustomMainMenuItem: public MainMenuItem -+{ -+ private: -+ cOsdItem* _osdItem; -+ -+ public: -+ CustomMainMenuItem(cOsdItem* osdItem) {_osdItem = osdItem; }; -+ virtual bool IsCustomMenuItem() { return true; }; -+ virtual bool IsPluginMenuItem() { return false; }; -+ virtual cOsdItem* CustomMenuItem() { return _osdItem; }; -+ virtual const char* PluginMenuEntry() { return NULL; }; -+ virtual int PluginIndex() { return 0; }; -+}; -+ -+class PluginMainMenuItem: public MainMenuItem -+{ -+ private: -+ const char* _mainMenuEntry; -+ int _pluginIndex; -+ -+ public: -+ PluginMainMenuItem(const char* mainMenuEntry, int pluginIndex) -+ { -+ _mainMenuEntry = mainMenuEntry; -+ _pluginIndex = pluginIndex; -+ }; -+ virtual bool IsCustomMenuItem() { return false; }; -+ virtual bool IsPluginMenuItem() { return true; }; -+ virtual cOsdItem* CustomMenuItem() { return NULL; }; -+ virtual const char* PluginMenuEntry() { return _mainMenuEntry; }; -+ virtual int PluginIndex() { return _pluginIndex; }; -+}; -+ -+ISubMenuProvider::~ISubMenuProvider() -+{ -+} -+ -+MainMenuItem* MainMenuItem::CreateCustomMenuItem(cOsdItem* item) -+{ -+ return new CustomMainMenuItem(item); -+} -+ -+MainMenuItem* MainMenuItem::CreatePluginMenuItem(const char* pluginMainMenuEntry, int pluginIndex) -+{ -+ return new PluginMainMenuItem(pluginMainMenuEntry, pluginIndex); -+} -+ -+}; diff -urNad vdr-1.4.7~/submenupatch.h vdr-1.4.7/submenupatch.h --- vdr-1.4.7~/submenupatch.h 1970-01-01 01:00:00.000000000 +0100 -+++ vdr-1.4.7/submenupatch.h 2007-07-26 23:27:30.000000000 +0200 -@@ -0,0 +1,60 @@ ++++ vdr-1.4.7/submenupatch.h 2007-07-28 12:13:57.000000000 +0200 +@@ -0,0 +1,57 @@ +/* + * vdr-submenu - A plugin for the Linux Video Disk Recorder + * Copyright (c) 2007 Tobias Grimm <vdr@e-tobi.net> @@ -209,20 +118,17 @@ diff -urNad vdr-1.4.7~/submenupatch.h vdr-1.4.7/submenupatch.h +#ifndef __SUBMENUPATCH_H +#define __SUBMENUPATCH_H + -+#include "osdbase.h" +#include <vector> + ++class cOsdItem; ++ +namespace SubMenuPatch +{ + -+class MainMenuItem ++class IMainMenuItem +{ + public: -+ static MainMenuItem* CreateCustomMenuItem(cOsdItem* item); -+ static MainMenuItem* CreatePluginMenuItem(const char* pluginMainMenuEntry, int pluginIndex); -+ -+ public: -+ virtual ~MainMenuItem() {}; ++ virtual ~IMainMenuItem() {}; + virtual bool IsCustomMenuItem() = 0; + virtual bool IsPluginMenuItem() = 0; + virtual cOsdItem* CustomMenuItem() = 0; @@ -230,7 +136,7 @@ diff -urNad vdr-1.4.7~/submenupatch.h vdr-1.4.7/submenupatch.h + virtual int PluginIndex() = 0; +}; + -+typedef std::vector<MainMenuItem*> MainMenuItemsList; ++typedef std::vector<IMainMenuItem*> MainMenuItemsList; + +class ISubMenuProvider +{ |