From 110c64f56db10405446cafb17a1c18308fff0b96 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 27 Aug 2005 09:37:33 +0200 Subject: [PATCH] Moved cMenuEditTimer and cMenuEvent to menu.h so that plugins can use it --- CONTRIBUTORS | 2 ++ HISTORY | 2 ++ menu.c | 26 +------------------------- menu.h | 26 +++++++++++++++++++++++++- 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3d78a785..803c3be4 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1439,6 +1439,8 @@ Klaus Heppenheimer Thomas Günther for fixing handling the frame number display if '7' is pressed before the first editing mark, or '9' after the last one + for suggesting to move cMenuEditTimer and cMenuEvent to menu.h so that plugins + can use it David Woodhouse for his help in replacing the get/put_unaligned() macros from asm/unaligned.h with diff --git a/HISTORY b/HISTORY index 91e86e66..b9a840b9 100644 --- a/HISTORY +++ b/HISTORY @@ -3734,3 +3734,5 @@ Video Disk Recorder Revision History trouble than it fixed. - Fixed detecting short channel names for "Kabel Deutschland", who uses a comma as delimiter (thanks to Marco Schlüßler). +- Moved cMenuEditTimer and cMenuEvent to menu.h so that plugins can use it (suggested + by Thomas Günther). diff --git a/menu.c b/menu.c index 44871fe6..1e514749 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.356 2005/08/26 12:49:26 kls Exp $ + * $Id: menu.c 1.357 2005/08/27 09:37:23 kls Exp $ */ #include "menu.h" @@ -19,7 +19,6 @@ #include "eitscan.h" #include "i18n.h" #include "interface.h" -#include "menuitems.h" #include "plugin.h" #include "recording.h" #include "remote.h" @@ -605,20 +604,6 @@ eOSState cMenuText::ProcessKey(eKeys Key) // --- cMenuEditTimer -------------------------------------------------------- -class cMenuEditTimer : public cOsdMenu { -private: - cTimer *timer; - cTimer data; - int channel; - bool addIfConfirmed; - cMenuEditDateItem *firstday; - void SetFirstDayItem(void); -public: - cMenuEditTimer(cTimer *Timer, bool New = false); - virtual ~cMenuEditTimer(); - virtual eOSState ProcessKey(eKeys Key); - }; - cMenuEditTimer::cMenuEditTimer(cTimer *Timer, bool New) :cOsdMenu(tr("Edit timer"), 12) { @@ -904,15 +889,6 @@ eOSState cMenuTimers::ProcessKey(eKeys Key) // --- cMenuEvent ------------------------------------------------------------ -class cMenuEvent : public cOsdMenu { -private: - const cEvent *event; -public: - cMenuEvent(const cEvent *Event, bool CanSwitch = false); - virtual void Display(void); - virtual eOSState ProcessKey(eKeys Key); -}; - cMenuEvent::cMenuEvent(const cEvent *Event, bool CanSwitch) :cOsdMenu(tr("Event")) { diff --git a/menu.h b/menu.h index 93712e4e..f3278113 100644 --- a/menu.h +++ b/menu.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.h 1.70 2005/05/15 14:34:54 kls Exp $ + * $Id: menu.h 1.71 2005/08/27 09:37:33 kls Exp $ */ #ifndef __MENU_H @@ -15,6 +15,7 @@ #include "epg.h" #include "osdbase.h" #include "dvbplayer.h" +#include "menuitems.h" #include "recorder.h" #include "skins.h" @@ -29,6 +30,29 @@ public: virtual eOSState ProcessKey(eKeys Key); }; +class cMenuEditTimer : public cOsdMenu { +private: + cTimer *timer; + cTimer data; + int channel; + bool addIfConfirmed; + cMenuEditDateItem *firstday; + void SetFirstDayItem(void); +public: + cMenuEditTimer(cTimer *Timer, bool New = false); + virtual ~cMenuEditTimer(); + virtual eOSState ProcessKey(eKeys Key); + }; + +class cMenuEvent : public cOsdMenu { +private: + const cEvent *event; +public: + cMenuEvent(const cEvent *Event, bool CanSwitch = false); + virtual void Display(void); + virtual eOSState ProcessKey(eKeys Key); + }; + class cMenuMain : public cOsdMenu { private: time_t lastActivity;