diff -Naur vdr-plugin-yaepghd/HISTORY yaepghd-ext-patch-v3/HISTORY
--- vdr-plugin-yaepghd/HISTORY	2010-08-08 17:54:50.821009433 +0200
+++ yaepghd-ext-patch-v3/HISTORY	2010-08-08 17:39:34.401004736 +0200
@@ -17,3 +17,18 @@
 - Fixed a bug in channel listing (Rolf Ahrenberg).
 - Fixed theme selection on the setup page (Rolf Ahrenberg).
 - Fixed cPlugin::ConfigDirectory() to called only from main thread (Rolf Ahrenberg).
+
+2010: Version 0.0.2beta
+
+- Use vdr function for channel switching (Rolf Ahrenberg).
+- Add makefile option for debuging output (Rolf Ahrenberg).
+- Fixed a bug in setup menu (Rolf Ahrenberg).
+- Changed compile options in makefile (Rolf Ahrenberg).
+- Added ability to set timers and show event info (gnapheus,tomas))
+- Changed date generation (CR7, tomas))
+- Replace newlines with spaces in EPG Description for e.g tvmovieepg (tomas)
+- Changed makefile for vdr 1.7.10
+- fixed display of wrong week day (tomas) 
+- new MainMenuHooks patch (gnapheus, Joe_D).
+- Fixed hide main menu entry(gnapheus) 
+
diff -Naur vdr-plugin-yaepghd/Makefile yaepghd-ext-patch-v3/Makefile
--- vdr-plugin-yaepghd/Makefile	2010-08-08 17:54:50.821009433 +0200
+++ yaepghd-ext-patch-v3/Makefile	2010-08-08 17:39:34.401004736 +0200
@@ -1,17 +1,18 @@
 #
 # Makefile for a Video Disk Recorder plugin
 #
-# $Id$
-
-# Use Reel eHD card
-#YAEPGHD_REEL_EHD = 1
+# $Id: Makefile 1.2 2010/02/06 14:50:03 kls Exp $
 
 # The official name of this plugin.
 # This name will be used in the '-P...' option of VDR to load the plugin.
 # By default the main source file also carries this name.
 # IMPORTANT: the presence of this macro is important for the Make.config
 # file. So it must be defined, even if it is not used here!
-#
+
+# Use Reel eHD card
+#YAEPGHD_REEL_EHD = 1
+
+
 PLUGIN = yaepghd
 
 ### The version number of this plugin (taken from the main source file):
@@ -29,6 +30,10 @@
 LIBDIR = ../../lib
 TMPDIR = /tmp
 
+### Make sure that necessary options are included:
+
+include $(VDRDIR)/Make.global
+
 ### Allow user defined options to overwrite defaults:
 
 -include $(VDRDIR)/Make.config
@@ -59,7 +64,7 @@
 
 ### The object files (add further files here):
 
-OBJS = $(PLUGIN).o
+OBJS = $(PLUGIN).o 
 
 ### The main target:
 
diff -Naur vdr-plugin-yaepghd/patches/MainMenuHooks.patch yaepghd-ext-patch-v3/patches/MainMenuHooks.patch
--- vdr-plugin-yaepghd/patches/MainMenuHooks.patch	1970-01-01 01:00:00.000000000 +0100
+++ yaepghd-ext-patch-v3/patches/MainMenuHooks.patch	2010-08-08 17:39:34.411005891 +0200
@@ -0,0 +1,106 @@
+--- vdr-1.6.0/menu.c.orig	2008-03-16 12:15:28.000000000 +0100
++++ vdr-1.6.0/menu.c	2010-08-01 09:22:52.000000000 +0200
+@@ -2973,15 +2973,31 @@
+ 
+   // Initial submenus:
+ 
++  cOsdObject *menu = NULL;
+   switch (State) {
+-    case osSchedule:   AddSubMenu(new cMenuSchedule); break;
+-    case osChannels:   AddSubMenu(new cMenuChannels); break;
+-    case osTimers:     AddSubMenu(new cMenuTimers); break;
+-    case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
+-    case osSetup:      AddSubMenu(new cMenuSetup); break;
+-    case osCommands:   AddSubMenu(new cMenuCommands(tr("Commands"), &Commands)); break;
++    case osSchedule:
++        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osSchedule", &menu))
++            menu = new cMenuSchedule;
++        break;
++    case osChannels:
++        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osChannels", &menu))
++            menu = new cMenuChannels;
++        break;
++    case osTimers:
++        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osTimers", &menu))
++            menu = new cMenuTimers;
++        break;
++    case osRecordings:
++        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osRecordings", &menu))
++            menu = new cMenuRecordings(NULL, 0, true);
++        break;
++    case osSetup:      menu = new cMenuSetup; break;
++    case osCommands:   menu = new cMenuCommands(tr("Commands"), &Commands); break;
+     default: break;
+     }
++  if (menu)
++     if (menu->IsMenu())
++       AddSubMenu((cOsdMenu *) menu);
+ }
+ 
+ cOsdObject *cMenuMain::PluginOsdObject(void)
+@@ -3096,13 +3112,34 @@
+   eOSState state = cOsdMenu::ProcessKey(Key);
+   HadSubMenu |= HasSubMenu();
+ 
++  cOsdObject *menu = NULL;
+   switch (state) {
+-    case osSchedule:   return AddSubMenu(new cMenuSchedule);
+-    case osChannels:   return AddSubMenu(new cMenuChannels);
+-    case osTimers:     return AddSubMenu(new cMenuTimers);
+-    case osRecordings: return AddSubMenu(new cMenuRecordings);
+-    case osSetup:      return AddSubMenu(new cMenuSetup);
+-    case osCommands:   return AddSubMenu(new cMenuCommands(tr("Commands"), &Commands));
++    case osSchedule:
++        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osSchedule", &menu))
++            menu = new cMenuSchedule;
++        else
++            state = osContinue;
++        break;
++    case osChannels:
++        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osChannels", &menu))
++            menu = new cMenuChannels;
++        else
++            state = osContinue;
++        break;
++    case osTimers:
++        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osTimers", &menu))
++            menu = new cMenuTimers;
++        else
++            state = osContinue;
++        break;
++    case osRecordings:
++        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osRecordings", &menu))
++            menu = new cMenuRecordings;
++        else
++            state = osContinue;
++        break;
++    case osSetup:      menu = new cMenuSetup; break;
++    case osCommands:   menu = new cMenuCommands(tr("Commands"), &Commands); break;
+     case osStopRecord: if (Interface->Confirm(tr("Stop recording?"))) {
+                           cOsdItem *item = Get(Current());
+                           if (item) {
+@@ -3154,6 +3191,12 @@
+                default:      break;
+                }
+     }
++  if (menu) {
++      if (menu->IsMenu())
++         return AddSubMenu((cOsdMenu *) menu);
++      pluginOsdObject = menu;
++      return osPlugin;
++  } 
+   if (!HasSubMenu() && Update(HadSubMenu))
+      Display();
+   if (Key != kNone) {
+--- vdr-1.6.0/config.h.orig	2008-03-23 11:26:10.000000000 +0100
++++ vdr-1.6.0/config.h	2010-08-01 09:17:00.000000000 +0200
+@@ -36,6 +36,8 @@
+ // plugins to work with newer versions of the core VDR as long as no
+ // VDR header files have changed.
+ 
++#define MAINMENUHOOKSVERSION "1.1.0"
++#define MAINMENUHOOKSVERSNUM 10100  // Version * 10000 + Major * 100 + Minor
++
+ #define MAXPRIORITY 99
+ #define MAXLIFETIME 99
+ 
diff -Naur vdr-plugin-yaepghd/patches/vdr-1.6.0-yaepghd.patch yaepghd-ext-patch-v3/patches/vdr-1.6.0-yaepghd.patch
--- vdr-plugin-yaepghd/patches/vdr-1.6.0-yaepghd.patch	2010-08-08 17:54:50.821009433 +0200
+++ yaepghd-ext-patch-v3/patches/vdr-1.6.0-yaepghd.patch	2010-08-08 17:39:34.411005891 +0200
@@ -5,29 +5,11 @@
  #define APIVERSION  "1.6.0"
  #define APIVERSNUM   10600  // Version * 10000 + Major * 100 + Minor
  
-+#define YAEPGHDVERSNUM 1
++#define YAEPGHDVERSNUM 2
 +
  // When loading plugins, VDR searches them by their APIVERSION, which
  // may be smaller than VDRVERSION in case there have been no changes to
  // VDR header files since the last APIVERSION. This allows compiled
-diff -Nru vdr-1.6.0-vanilla/device.h vdr-1.6.0-yaepghd/device.h
---- vdr-1.6.0-vanilla/device.h	2008-02-23 15:13:04.000000000 +0200
-+++ vdr-1.6.0-yaepghd/device.h	2009-01-24 23:34:01.000000000 +0200
-@@ -242,12 +242,12 @@
-          ///< Direction (only the sign of Direction is evaluated, positive values
-          ///< switch to higher channel numbers).
- private:
--  eSetChannelResult SetChannel(const cChannel *Channel, bool LiveView);
--         ///< Sets the device to the given channel (general setup).
- protected:
-   virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
-          ///< Sets the device to the given channel (actual physical setup).
- public:
-+  eSetChannelResult SetChannel(const cChannel *Channel, bool LiveView);
-+         ///< Sets the device to the given channel (general setup).
-   static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; }
-          ///< Returns the number of the current channel on the primary device.
-   static void SetCurrentChannel(const cChannel *Channel) { currentChannel = Channel ? Channel->Number() : 0; }
 diff -Nru vdr-1.6.0-vanilla/dvbosd.c vdr-1.6.0-yaepghd/dvbosd.c
 --- vdr-1.6.0-vanilla/dvbosd.c	2007-09-16 11:55:54.000000000 +0300
 +++ vdr-1.6.0-yaepghd/dvbosd.c	2009-01-24 23:40:51.000000000 +0200
diff -Naur vdr-plugin-yaepghd/patches/vdr-1.7.14-yaepghd.diff yaepghd-ext-patch-v3/patches/vdr-1.7.14-yaepghd.diff
--- vdr-plugin-yaepghd/patches/vdr-1.7.14-yaepghd.diff	1970-01-01 01:00:00.000000000 +0100
+++ yaepghd-ext-patch-v3/patches/vdr-1.7.14-yaepghd.diff	2010-08-08 17:39:34.411005891 +0200
@@ -0,0 +1,60 @@
+diff -Naur ./vdr-vanilla/config.h ./vdr-yaepghd/config.h
+--- ./vdr-vanilla/config.h	2010-05-22 02:38:34.600962000 -0400
++++ ./vdr-yaepghd/config.h	2010-05-22 02:47:13.956960932 -0400
+@@ -36,6 +36,8 @@
+ // plugins to work with newer versions of the core VDR as long as no
+ // VDR header files have changed.
+ 
++#define YAEPGHDVERSNUM 2
++
+ #define MAXPRIORITY 99
+ #define MAXLIFETIME 99
+ 
+diff -Naur ./vdr-vanilla/osd.c ./vdr-yaepghd/osd.c
+--- ./vdr-vanilla/osd.c	2010-05-22 02:38:34.632966839 -0400
++++ ./vdr-yaepghd/osd.c	2010-05-22 02:41:30.884960821 -0400
+@@ -753,6 +753,7 @@
+   width = height = 0;
+   level = Level;
+   active = false;
++  vidWin.bpp = 0;
+   for (int i = 0; i < Osds.Size(); i++) {
+       if (Osds[i]->level > level) {
+          Osds.Insert(this, i);
+diff -Naur ./vdr-vanilla/osd.h ./vdr-yaepghd/osd.h
+--- ./vdr-vanilla/osd.h	2010-05-22 02:38:34.636967919 -0400
++++ ./vdr-yaepghd/osd.h	2010-05-22 02:41:30.868981878 -0400
+@@ -270,6 +270,8 @@
+   int left, top, width, height;
+   uint level;
+   bool active;
++public:
++  tArea vidWin;
+ protected:
+   cOsd(int Left, int Top, uint Level);
+        ///< Initializes the OSD with the given coordinates.
+diff -Naur ./vdr-vanilla/PLUGINS/src/dvbsddevice/dvbsdffosd.c ./vdr-yaepghd/PLUGINS/src/dvbsddevice/dvbsdffosd.c
+--- ./vdr-vanilla/PLUGINS/src/dvbsddevice/dvbsdffosd.c	2010-05-22 02:38:34.576963926 -0400
++++ ./vdr-yaepghd/PLUGINS/src/dvbsddevice/dvbsdffosd.c	2010-05-22 02:45:03.324961972 -0400
+@@ -51,6 +51,10 @@
+         osdMem = cap.val;
+ #endif
+      }
++     if (vidWin.bpp != 0) {
++        Cmd(OSD_SetWindow, 0, 5);
++        Cmd(OSD_Close);
++     }
+ }
+ 
+ cDvbSdFfOsd::~cDvbSdFfOsd()
+@@ -196,6 +200,10 @@
+          Cmd(OSD_SetWindow, 0, i + 1);
+          Cmd(OSD_MoveWindow, 0, Left() + Bitmap->X0(), Top() + Bitmap->Y0());
+          }
++     if (vidWin.bpp != 0) {
++        Cmd(OSD_SetWindow, 0, 5);
++        Cmd(OSD_OpenRaw, vidWin.bpp, vidWin.x1, vidWin.y1, vidWin.x2, vidWin.y2, NULL);
++        }
+      shown = true;
+      }
+ }
diff -Naur vdr-plugin-yaepghd/po/de_DE.po yaepghd-ext-patch-v3/po/de_DE.po
--- vdr-plugin-yaepghd/po/de_DE.po	2010-08-08 17:54:50.821009433 +0200
+++ yaepghd-ext-patch-v3/po/de_DE.po	2010-08-08 18:00:15.981005719 +0200
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: Yaepghd 0.0.1\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2009-01-30 20:42+0200\n"
+"POT-Creation-Date: 2010-08-07 20:31+0200\n"
 "PO-Revision-Date: 2009-01-28 10:51+0200\n"
 "Last-Translator: Klaus Schmidinger <kls@cadsoft.de>\n"
 "Language-Team: <vdr@linuxtv.org>\n"
@@ -17,14 +17,15 @@
 msgid "No Info"
 msgstr "Keine Daten verf�gbar."
 
-msgid "Screenshot"
-msgstr ""
+#, fuzzy
+msgid "Timer"
+msgstr "Zeit-Format"
 
 msgid "Page up"
-msgstr ""
+msgstr "Seite hoch"
 
 msgid "Page down"
-msgstr ""
+msgstr "Seite runter"
 
 msgid "Once"
 msgstr "Sobald"
@@ -48,25 +49,25 @@
 msgstr "Frequenz"
 
 msgid "24h"
-msgstr ""
+msgstr "24h"
 
 msgid "12h"
-msgstr ""
+msgstr "12h"
 
 msgid "Up"
-msgstr ""
+msgstr "Hoch"
 
 msgid "Down"
-msgstr ""
+msgstr "Runter"
 
 msgid "Manual"
-msgstr ""
+msgstr "Manuell"
 
 msgid "Semi-automatic"
-msgstr ""
+msgstr "Halbautomatisch"
 
 msgid "Automatic"
-msgstr ""
+msgstr "Automatisch"
 
 msgid "Hide mainmenu entry"
 msgstr "Hauptmen�eintrag verstecken"
@@ -75,16 +76,19 @@
 msgstr ""
 
 msgid "Channel change"
-msgstr ""
+msgstr "Kanal wechseln"
 
 msgid "Time format"
-msgstr "Zeit-Format"
+msgstr "Zeitformat"
 
 msgid "Channel order"
-msgstr ""
+msgstr "Kanalreihenfolge"
+
+msgid "Channel number"
+msgstr "Kanalnummer"
 
 msgid "Yet another EPG in HD"
-msgstr ""
+msgstr "Yet another EPG in HD"
 
 msgid "YaepgHD"
-msgstr ""
+msgstr "YaepgHD"
diff -Naur vdr-plugin-yaepghd/po/fi_FI.po yaepghd-ext-patch-v3/po/fi_FI.po
--- vdr-plugin-yaepghd/po/fi_FI.po	2010-08-08 17:54:50.821009433 +0200
+++ yaepghd-ext-patch-v3/po/fi_FI.po	2010-08-08 18:00:15.991005693 +0200
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: Yaepghd 0.0.1\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2009-01-30 20:42+0200\n"
+"POT-Creation-Date: 2010-08-07 20:31+0200\n"
 "PO-Revision-Date: 2009-01-28 10:51+0200\n"
 "Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
 "Language-Team: <vdr@linuxtv.org>\n"
@@ -18,8 +18,9 @@
 msgid "No Info"
 msgstr "Ei tietoja"
 
-msgid "Screenshot"
-msgstr "Ota kuva"
+#, fuzzy
+msgid "Timer"
+msgstr "Kellonajan esitysmuoto"
 
 msgid "Page up"
 msgstr "Sivu ylös"
@@ -73,7 +74,7 @@
 msgstr "Piilota valinta päävalikosta"
 
 msgid "Replace original schedule"
-msgstr "Korvaa alkuperäinen ohjelmaopas"
+msgstr ""
 
 msgid "Channel change"
 msgstr "Kanavanvaihto"
@@ -82,6 +83,10 @@
 msgstr "Kellonajan esitysmuoto"
 
 msgid "Channel order"
+msgstr "Kanavajärjestys"
+
+#, fuzzy
+msgid "Channel number"
 msgstr "Kanavajärjetys"
 
 msgid "Yet another EPG in HD"
@@ -89,3 +94,6 @@
 
 msgid "YaepgHD"
 msgstr "Ohjelmaopas (YaepgHD)"
+
+#~ msgid "Screenshot"
+#~ msgstr "Ota kuva"
diff -Naur vdr-plugin-yaepghd/po/fr_FR.po yaepghd-ext-patch-v3/po/fr_FR.po
--- vdr-plugin-yaepghd/po/fr_FR.po	1970-01-01 01:00:00.000000000 +0100
+++ yaepghd-ext-patch-v3/po/fr_FR.po	2010-08-08 18:00:16.001006115 +0200
@@ -0,0 +1,98 @@
+# VDR plugin language source file.
+# Copyright (C) 2009 bball <bball950@yahoo.com>
+# This file is distributed under the same license as the yaepghd package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Yaepghd 0.0.1\n"
+"Report-Msgid-Bugs-To: <see README>\n"
+"POT-Creation-Date: 2010-08-07 20:31+0200\n"
+"PO-Revision-Date: 2009-01-28 10:51+0200\n"
+"Last-Translator: Klaus Schmidinger <kls@cadsoft.de>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "No Info"
+msgstr "Aucune donn�es."
+
+#, fuzzy
+msgid "Timer"
+msgstr "Format horaire"
+
+msgid "Page up"
+msgstr "Page vers le haut"
+
+msgid "Page down"
+msgstr "Page vers le bas"
+
+msgid "Once"
+msgstr "Une fois"
+
+msgid "Every day"
+msgstr "Tous les jours"
+
+msgid "Mon-Fri"
+msgstr "Lu-Ve"
+
+msgid "Sun-Sat"
+msgstr "Sam-Dim"
+
+msgid "Start"
+msgstr "D�marrer"
+
+msgid "Stop"
+msgstr "Arreter"
+
+msgid "Frequency"
+msgstr "Fr�quence"
+
+msgid "24h"
+msgstr "24h"
+
+msgid "12h"
+msgstr "12h"
+
+msgid "Up"
+msgstr "Haut"
+
+msgid "Down"
+msgstr "Bas"
+
+msgid "Manual"
+msgstr "Manuel"
+
+msgid "Semi-automatic"
+msgstr "Semi-automatique"
+
+msgid "Automatic"
+msgstr "Automatique"
+
+msgid "Hide mainmenu entry"
+msgstr "Cacher dans le menu principal"
+
+msgid "Replace original schedule"
+msgstr "Remplacer le guide des programmes original"
+
+msgid "Channel change"
+msgstr "Changement de cha�ne"
+
+msgid "Time format"
+msgstr "Format horaire"
+
+msgid "Channel order"
+msgstr "Ordre des cha�nes"
+
+#, fuzzy
+msgid "Channel number"
+msgstr "Ordre des cha�nes"
+
+msgid "Yet another EPG in HD"
+msgstr "Yet another EPG in HD"
+
+msgid "YaepgHD"
+msgstr "YaepgHD"
+
+#~ msgid "Screenshot"
+#~ msgstr "Capture d'�cran"
diff -Naur vdr-plugin-yaepghd/po/it_IT.po yaepghd-ext-patch-v3/po/it_IT.po
--- vdr-plugin-yaepghd/po/it_IT.po	1970-01-01 01:00:00.000000000 +0100
+++ yaepghd-ext-patch-v3/po/it_IT.po	2010-08-08 18:00:16.021004666 +0200
@@ -0,0 +1,101 @@
+# VDR plugin language source file.
+# Copyright (C) 2009 bball <bball950@yahoo.com>
+# This file is distributed under the same license as the yaepghd package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Yaepghd 0.0.1\n"
+"Report-Msgid-Bugs-To: <see README>\n"
+"POT-Creation-Date: 2010-08-07 20:31+0200\n"
+"PO-Revision-Date: 2009-02-08 23:04+0100\n"
+"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
+"Language-Team:  <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Italian\n"
+"X-Poedit-Country: ITALY\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+msgid "No Info"
+msgstr "Nessuna informazione"
+
+#, fuzzy
+msgid "Timer"
+msgstr "Formato ora"
+
+msgid "Page up"
+msgstr "Pagina su"
+
+msgid "Page down"
+msgstr "Pagina giù"
+
+msgid "Once"
+msgstr "Una volta"
+
+msgid "Every day"
+msgstr "Ogni giorno"
+
+msgid "Mon-Fri"
+msgstr "Lu-Ve"
+
+msgid "Sun-Sat"
+msgstr "Do-Sa"
+
+msgid "Start"
+msgstr "Inizio"
+
+msgid "Stop"
+msgstr "Fine"
+
+msgid "Frequency"
+msgstr "Frequenza"
+
+msgid "24h"
+msgstr "24h"
+
+msgid "12h"
+msgstr "12h"
+
+msgid "Up"
+msgstr "Su"
+
+msgid "Down"
+msgstr "Giù"
+
+msgid "Manual"
+msgstr "Manuale"
+
+msgid "Semi-automatic"
+msgstr "Semi automatico"
+
+msgid "Automatic"
+msgstr "Automatico"
+
+msgid "Hide mainmenu entry"
+msgstr "Nascondi voce menu principale"
+
+msgid "Replace original schedule"
+msgstr "Sostituisci programmazione originale"
+
+msgid "Channel change"
+msgstr "Cambio canale"
+
+msgid "Time format"
+msgstr "Formato ora"
+
+msgid "Channel order"
+msgstr "Ordine canale"
+
+#, fuzzy
+msgid "Channel number"
+msgstr "Ordine canale"
+
+msgid "Yet another EPG in HD"
+msgstr "Un altro gestore EPG in HD"
+
+msgid "YaepgHD"
+msgstr "YaepgHD"
+
+#~ msgid "Screenshot"
+#~ msgstr "Schermata"
diff -Naur vdr-plugin-yaepghd/README yaepghd-ext-patch-v3/README
--- vdr-plugin-yaepghd/README	2010-08-08 17:54:50.821009433 +0200
+++ yaepghd-ext-patch-v3/README	2010-08-08 17:39:34.411005891 +0200
@@ -59,7 +59,7 @@
 tar -xzf /put/your/path/here/vdr-yaepghd-X.Y.Z.tgz
 ln -s yaepghd-X.Y.Z yaepghd
 cd /put/your/path/here/VDR
-patch -p1 < PLUGINS/src/yaepghd/patches/vdr-X.Y.Z-yaepghd.patch
+patch -p1 < PLUGINS/src/yaepghd/patches/vdr-X.Y.Z-yaepghd.patch # Optional
 cp -R PLUGINS/src/yaepghd/yaepghd /path/to/vdrconf/plugins/
 make
 make plugins
@@ -67,6 +67,9 @@
 
 Notes:
 
+- Yaepghd patch provides an optional VDR API modications for scaling
+  video window. The video stays untouched without the patch.
+
 - Video window doesn't scale back to normal when quiting the plugin
   with FF cards.
 
diff -Naur vdr-plugin-yaepghd/yaepghd/default.theme yaepghd-ext-patch-v3/yaepghd/default.theme
--- vdr-plugin-yaepghd/yaepghd/default.theme	2010-08-08 17:54:50.821009433 +0200
+++ yaepghd-ext-patch-v3/yaepghd/default.theme	2010-08-08 17:47:16.961005000 +0200
@@ -8,6 +8,7 @@
 eventTimeFont="Accidental Presidency;20"
 eventDescFont="Accidental Presidency;20"
 eventDateFont="Accidental Presidency;20"
+eventInfoFont="Accidental Presidency;20"
 gridEventColor=FFFFFFFF
 gridSelFg=FF000000
 gridSelBg=FFF8AF31
@@ -19,15 +20,17 @@
 eventTimeColor=FF1B537C
 eventDescColor=FFFFFFFF
 eventDateColor=FF1B537C
+eventInfoColor=FF1B537C
 tlineBoxColor=FFFFFFFF
 gridEventGeom=154,288,516,234
 gridChanGeom=25,288,113,234
 gridTimeGeom=154,251,516,32
 gridDateGeom=25,251,113,32
 eventTitleGeom=144,20,306,70
-eventTimeGeom=144,96,306,37
+eventTimeGeom=144,96,156,37
 eventDescGeom=25,135,425,115
 eventDateGeom=25,96,117,37
+eventInfoGeom=300,96,100,37
 tlineLocGeom=154,283,516,3
 tlineBoxGeom=0,0,9,3
 vidWinGeom=456,32,196,130
diff -Naur vdr-plugin-yaepghd/yaepghd.c yaepghd-ext-patch-v3/yaepghd.c
--- vdr-plugin-yaepghd/yaepghd.c	2010-08-08 17:54:50.821009433 +0200
+++ yaepghd-ext-patch-v3/yaepghd.c	2010-08-08 17:50:20.583505135 +0200
@@ -24,10 +24,8 @@
 #include <vdr/osd.h>
 #include <vdr/device.h>
 #include <vdr/thread.h>
-
-#ifndef YAEPGHDVERSNUM
-#error "You must apply the yaepghd patch for VDR!"
-#endif
+#include <vdr/player.h>
+#include <vdr/timers.h>
 
 #if defined(APIVERSNUM) && APIVERSNUM < 10600
 #error "VDR-1.6.0 API version or greater is required!"
@@ -36,6 +34,7 @@
 /**
  * Macros
  */
+#define WO_MSG_RECDLG // RecDlg and Msg is not used yet
 
 #ifdef DEBUG
 #define ASSERT                   assert
@@ -70,6 +69,7 @@
 #define GRID_TIME_FONT           THEME_FONT("gridTimeFont")
 #define GRID_DATE_FONT           THEME_FONT("gridDateFont")
 #define EVENT_TITLE_FONT         THEME_FONT("eventTitleFont")
+#define EVENT_INFO_FONT          THEME_FONT("eventInfoFont")
 #define EVENT_TIME_FONT          THEME_FONT("eventTimeFont")
 #define EVENT_DESC_FONT          THEME_FONT("eventDescFont")
 #define EVENT_DATE_FONT          THEME_FONT("eventDateFont")
@@ -81,6 +81,7 @@
 #define GRID_DATE_COLOR          THEME_COLOR("gridDateColor")
 #define GRID_SEP_COLOR           THEME_COLOR("gridSepColor")
 #define EVENT_TITLE_COLOR        THEME_COLOR("eventTitleColor")
+#define EVENT_INFO_COLOR         THEME_COLOR("eventInfoColor")
 #define EVENT_TIME_COLOR         THEME_COLOR("eventTimeColor")
 #define EVENT_DESC_COLOR         THEME_COLOR("eventDescColor")
 #define EVENT_DATE_COLOR         THEME_COLOR("eventDateColor")
@@ -90,6 +91,7 @@
 #define GRID_TIME_GEOM           THEME_GEOM("gridTimeGeom")
 #define GRID_DATE_GEOM           THEME_GEOM("gridDateGeom")
 #define EVENT_TITLE_GEOM         THEME_GEOM("eventTitleGeom")
+#define EVENT_INFO_GEOM          THEME_GEOM("eventInfoGeom")
 #define EVENT_TIME_GEOM          THEME_GEOM("eventTimeGeom")
 #define EVENT_DESC_GEOM          THEME_GEOM("eventDescGeom")
 #define EVENT_DATE_GEOM          THEME_GEOM("eventDateGeom")
@@ -104,6 +106,7 @@
 #define TEXT_BORDER              THEME_IVAL("textBorder")
 #define TEXT_SPACE               THEME_IVAL("textSpace")
 
+#ifndef WO_MSG_RECDLG
 #define REC_DLG_IMG              THEME_IMAGE("recDlgImage")
 #define REC_DLG_FONT             THEME_FONT("recDlgFont")
 #define REC_DLG_COLOR            THEME_COLOR("recDlgColor")
@@ -121,6 +124,7 @@
 #define MSG_BOX_FONT             THEME_FONT("msgBoxFont")
 #define MSG_BOX_COLOR            THEME_COLOR("msgBoxColor")
 #define MSG_BOX_GEOM             THEME_GEOM("msgBoxGeom")
+#endif
 
 /* Manner in which channel is changed while in YAEPG */
 enum eChanneChangeType {
@@ -152,10 +156,13 @@
  * Private Data
  */
 static int         iHideMenuEntry           = false;
+#if MAINMENUHOOKSVERSNUM == 10100
 static int         iReplaceOrgSchedule      = false;
+#endif
 static int         iChannelChange           = CHANNEL_CHANGE_MANUAL;
 static int         iTimeFormat              = TIME_FORMAT_12H;
 static int         iChannelOrder            = CHANNEL_ORDER_DOWN;
+static int         iChannelNumber           = false;
 static std::string sThemeName               = "default";
 static std::string sThemeDir                = "";
 
@@ -272,6 +279,7 @@
    AddElement("gridTimeFont", THEME_FONT);
    AddElement("gridDateFont", THEME_FONT);
    AddElement("eventTitleFont", THEME_FONT);
+   AddElement("eventInfoFont", THEME_FONT);
    AddElement("eventTimeFont", THEME_FONT);
    AddElement("eventDescFont", THEME_FONT);
    AddElement("eventDateFont", THEME_FONT);
@@ -283,6 +291,7 @@
    AddElement("gridTimeColor", THEME_COLOR);
    AddElement("gridDateColor", THEME_COLOR);
    AddElement("eventTitleColor", THEME_COLOR);
+   AddElement("eventInfoColor", THEME_COLOR);
    AddElement("eventTimeColor", THEME_COLOR);
    AddElement("eventDescColor", THEME_COLOR);
    AddElement("eventDateColor", THEME_COLOR);
@@ -292,6 +301,7 @@
    AddElement("gridTimeGeom", THEME_GEOM);
    AddElement("gridDateGeom", THEME_GEOM);
    AddElement("eventTitleGeom", THEME_GEOM);
+   AddElement("eventInfoGeom", THEME_GEOM);
    AddElement("eventTimeGeom", THEME_GEOM);
    AddElement("eventDescGeom", THEME_GEOM);
    AddElement("eventDateGeom", THEME_GEOM);
@@ -306,6 +316,7 @@
    AddElement("textBorder", THEME_IVAL);
    AddElement("textSpace", THEME_IVAL);
 
+#ifndef WO_MSG_RECDLG
    AddElement("recDlgImage", THEME_IMAGE);
    AddElement("recDlgGeom", THEME_GEOM);
    AddElement("recDlgColor", THEME_COLOR);
@@ -323,6 +334,7 @@
    AddElement("msgBoxFont", THEME_FONT);
    AddElement("msgBoxGeom", THEME_GEOM);
    AddElement("msgBoxColor", THEME_COLOR);
+#endif   
 }
 
 cYaepgTheme *
@@ -765,6 +777,12 @@
       *s-- = '\0';
    }
 
+      /* Remove newlines in descriptions */
+   char *newlineText = tokText;
+   strreplace(newlineText, '\n', ' ');
+   
+   
+
    /* Break text up into lines */
    char *line, *nextLine = tokText;
 
@@ -1334,9 +1352,19 @@
       chanInfo[i].nameBox.FgColor(GRID_CHAN_COLOR);
       chanInfo[i].nameBox.BgColor(clrTransparent);
       chanInfo[i].nameBox.Flags((eTextFlags)(TBOX_VALIGN_LEFT | TBOX_HALIGN_CENTER));
-      chanInfo[i].nameBox.X(geom.x + (geom.w / 2));
+      
+	  if (iChannelNumber)
+	  {
+	     chanInfo[i].nameBox.X(geom.x + (geom.w / 2));
+		 chanInfo[i].nameBox.W(geom.w / 2);
+	  }
+	  else
+	  {
+	     chanInfo[i].nameBox.X(geom.x);
+		 chanInfo[i].nameBox.W(geom.w );
+	  }
+	  
       chanInfo[i].nameBox.Y(geom.y + ROUND((float)i * (chanRowHeight + (float)horizSpace)));
-      chanInfo[i].nameBox.W(geom.w / 2);
       chanInfo[i].nameBox.H(ROUND(chanRowHeight));
       chanInfo[i].nameBox.Generate();
 
@@ -1354,7 +1382,8 @@
    YAEPG_INFO("Drawing grid channels at (%d %d)", geom.x, geom.y);
 
    for (int i = 0; i < (int)chanInfo.size(); i++) {
-      chanInfo[i].numBox.Draw(bmp);
+	  if (iChannelNumber)
+	     chanInfo[i].numBox.Draw(bmp);
       chanInfo[i].nameBox.Draw(bmp);
    }
 }
@@ -1460,12 +1489,8 @@
 void
 cYaepgGridDate::UpdateTime(time_t _t)
 {
-   struct tm locTime;
-
+   sprintf(dateStr,"%s", *DateString(_t));
    t = _t;
-   localtime_r(&t, &locTime);
-   snprintf(dateStr, sizeof(dateStr), "%s %d/%d",
-            *WeekDayName((locTime.tm_wday + 6) % 6), locTime.tm_mon, locTime.tm_mday);
    Generate();
 }
 
@@ -1551,6 +1576,68 @@
    box.Draw(bmp);
 }
 
+
+
+
+
+/*
+ *****************************************************************************
+ * cYaepgEventInfo
+ *****************************************************************************
+ */
+class cYaepgEventInfo {
+private:
+   tGeom geom;
+   const cEvent *event;
+   cYaepgTextBox box;
+
+public:
+   cYaepgEventInfo(const cEvent *_event);
+   void UpdateEvent(const cEvent *_event) { event = _event; Generate(); }
+   void Generate(void);
+   void Draw(cBitmap *bmp);
+};
+
+cYaepgEventInfo::cYaepgEventInfo(const cEvent *_event) :
+   event(_event)
+{
+   geom = EVENT_INFO_GEOM;
+   Generate();
+}
+
+static const char *TimerMatchChars = " tT"; 
+
+void
+cYaepgEventInfo::Generate(void)
+{
+   int timerMatch=tmNone; 
+   Timers.GetMatch(event, &timerMatch);
+   char t = TimerMatchChars[timerMatch];
+   char v = event->Vps() && (event->Vps() - event->StartTime()) ? 'V' : ' ';
+   char r = event->SeenWithin(30) && event->IsRunning() ? '*' : ' '; 
+   cString buffer;
+   buffer = cString::sprintf("%c %c %c", t, v, r);
+   
+   box.Text(buffer);
+   box.Font(EVENT_INFO_FONT);
+   box.FgColor(EVENT_INFO_COLOR);
+   box.BgColor(clrTransparent);
+   box.Flags((eTextFlags)(TBOX_VALIGN_LEFT | TBOX_HALIGN_CENTER));
+   box.X(geom.x);
+   box.Y(geom.y);
+   box.W(geom.w);
+   box.H(geom.h);
+   box.Generate();
+}
+
+void
+cYaepgEventInfo::Draw(cBitmap *bmp)
+{
+   YAEPG_INFO("Drawing event info at (%d %d)", geom.x, geom.y);
+
+   box.Draw(bmp);
+}
+
 /*
  *****************************************************************************
  * cYaepgEventTime
@@ -1700,10 +1787,10 @@
    localtime_r(&t, &locTime);
    if (iTimeFormat == TIME_FORMAT_24H) {
       snprintf(timeStr, sizeof(timeStr), "%s %02d:%02d",
-               *WeekDayName((locTime.tm_wday + 6) % 6), locTime.tm_hour, locTime.tm_min);
+               *WeekDayName((locTime.tm_wday + 7) % 7), locTime.tm_hour, locTime.tm_min);
    } else {
       snprintf(timeStr, sizeof(timeStr), "%s %d:%02d%s",
-               *WeekDayName((locTime.tm_wday + 6) % 6),
+               *WeekDayName((locTime.tm_wday + 7) % 7),
                FMT_12HR(locTime.tm_hour), locTime.tm_min,
                FMT_AMPM(locTime.tm_hour));
    }
@@ -1822,7 +1909,7 @@
 };
 
 const char *cYaepgHelpBar::helpStrs[4] = {
-   trNOOP("Screenshot"),
+   trNOOP("Timer"),
    trNOOP("Page up"),
    trNOOP("Page down"),
    trVDR("Button$Switch")
@@ -1843,7 +1930,7 @@
    for (int i = 0; i < 4; i++) {
       boxes[i].Text(tr(helpStrs[i]));
       boxes[i].Font(GRID_EVENT_FONT);
-      boxes[i].FgColor(GRID_EVENT_COLOR);
+      boxes[i].FgColor(EVENT_TITLE_COLOR);
       boxes[i].BgColor(clrTransparent);
       boxes[i].Flags((eTextFlags)(TBOX_VALIGN_LEFT | TBOX_HALIGN_CENTER));
       boxes[i].X(geom.x + (i * boxWidth) + dotDiam);
@@ -1868,9 +1955,6 @@
    }
    
    for (int i = 0; i < 4; i++) {
-      bmp->DrawEllipse(dots[i].x1, dots[i].y1,
-                       dots[i].x2, dots[i].y2,
-                       dots[i].color);
       boxes[i].Draw(bmp);
    }
 }
@@ -1993,6 +2077,7 @@
    return state;
 }
 
+#ifndef WO_MSG_RECDLG
 /*
  *****************************************************************************
  * cYaepgRecDlg
@@ -2201,7 +2286,7 @@
    t = event->StartTime();
    localtime_r(&t, &locTime);
    freqs[1][5] = ' ';
-   strcpy(&freqs[1][6], *WeekDayName((locTime.tm_wday + 6) % 6));
+   strcpy(&freqs[1][6], *WeekDayName((locTime.tm_wday + 7) % 7));
    freqInput.UpdateStra((char **)freqs);
 }
 
@@ -2263,6 +2348,7 @@
    bmp->DrawBitmap(geom.x, geom.y, *MSG_BG_IMG);
    msgBox.Draw(bmp);
 }
+#endif
 
 #ifdef YAEPGHD_REEL_EHD
 /*
@@ -2464,6 +2550,8 @@
 static cReelVidWin *reelVidWin = NULL;
 #endif
 
+
+
 /*
  *****************************************************************************
  * cYaepgHd
@@ -2476,7 +2564,6 @@
    time_t startTime;
    tArea mainWin;
    cBitmap *mainBmp;
-
    std::vector< cChannel * > chanVec;
    const cEvent *event;
    cTimeMs lastInput;
@@ -2488,11 +2575,15 @@
    cYaepgGridTime *gridTime;
    cYaepgGridDate *gridDate;
    cYaepgEventTitle *eventTitle;
+   cYaepgEventInfo *eventInfo;
    cYaepgEventTime *eventTime;
    cYaepgEventDesc *eventDesc;
    cYaepgEventDate *eventDate;
    cYaepgTimeLine *timeLine;
    cYaepgHelpBar *helpBar;
+   #ifndef WO_MSG_RECDLG
+   cYaepgHelpBar *recDlg;
+   #endif
 
 public:
    cYaepghd(void);
@@ -2506,6 +2597,7 @@
    void UpdateEvent(const cEvent *newEvent);
    void MoveCursor(eCursorDir dir);
    void SwitchToCurrentChannel(bool closeVidWin = false);
+   void AddDelTimer(void);
    void Draw(void);
 };
 
@@ -2523,11 +2615,20 @@
    gridTime(NULL),
    gridDate(NULL),
    eventTitle(NULL),
+   eventInfo(NULL),
    eventTime(NULL),
    eventDesc(NULL),
    eventDate(NULL),
    timeLine(NULL),
+   #ifndef  WO_MSG_RECDLG
+   helpBar(NULL),
+   recDlg(NULL)
+   #else
    helpBar(NULL)
+   #endif
+   
+   
+   
 {
    memset(&mainWin, 0, sizeof(mainWin));
    chanVec.clear();
@@ -2543,6 +2644,7 @@
    delete gridDate;
    delete timeLine;
    delete eventTitle;
+   delete eventInfo;
    delete eventTime;
    delete eventDesc;
    delete eventDate;
@@ -2581,6 +2683,7 @@
                          BG_IMAGE->Bpp());
    osd->SetAreas(&mainWin, 1);
 
+#ifdef YAEPGHDVERSNUM
    /* Set up the video window parameters */
    if (VID_WIN_GEOM.w != 0 && VID_WIN_GEOM.h != 0) {
       osd->vidWin.x1 = VID_WIN_GEOM.x;
@@ -2589,6 +2692,7 @@
       osd->vidWin.y2 = VID_WIN_GEOM.y + VID_WIN_GEOM.h;
       osd->vidWin.bpp = 12;
    }
+#endif
 
 #ifdef YAEPGHD_REEL_EHD
    reelVidWin->Open(VID_WIN_GEOM);
@@ -2605,6 +2709,7 @@
    timeLine = new cYaepgTimeLine(t);
    const cEvent *e = gridEvents->Event();
    eventTitle = new cYaepgEventTitle(e);
+   eventInfo = new cYaepgEventInfo(e);
    eventTime = new cYaepgEventTime(e);
    eventDesc = new cYaepgEventDesc(e);
    eventDate = new cYaepgEventDate();
@@ -2613,6 +2718,35 @@
    Draw();
 }
 
+void
+cYaepghd::AddDelTimer(void)
+ {
+      const cEvent *event=gridEvents->Event();
+	  int timerMatch;
+	  cTimer *ti;
+	  ti=Timers.GetMatch(event, &timerMatch);
+	  if (timerMatch==tmFull)
+	  {
+         if (ti) 
+		 {
+		    isyslog("deleting timer %s", *ti->ToDescr());
+			Timers.Del(ti);
+		    Timers.SetModified();
+		    eventInfo->UpdateEvent(event);      
+		 }   
+      }
+	  else
+	  {
+         cTimer *timer = new cTimer(event);
+         Timers.Add(timer);
+	     Timers.SetModified();
+	     isyslog("timer %s added (active)", *timer->ToDescr());
+	     eventInfo->UpdateEvent(event);
+      }
+ }
+
+
+
 eOSState
 cYaepghd::ProcessKey(eKeys key)
 {
@@ -2657,8 +2791,12 @@
          else
             state = osEnd;
          break;
+	 
+	 
+
       case kRed:
-         cDevice::PrimaryDevice()->GrabImageFile("yaepghd.jpg", true, 256, -1, -1);
+	     AddDelTimer(); 
+		 needsRedraw = true;
          state = osContinue;
          break;
       case kGreen:
@@ -2683,6 +2821,9 @@
          state = osContinue;
          // -12 hours
          break;
+	 
+	 
+	 
       case k0 ... k9:
          if (directChan || (key != k0)) {
             directChan = ((directChan * 10) + ((key & ~k_Repeat) - k0)) % 100000;
@@ -2852,8 +2993,10 @@
    }
    event = newEvent;
    eventTitle->UpdateEvent(event);
+   eventInfo->UpdateEvent(event);
    eventTime->UpdateEvent(event);
    eventDesc->UpdateEvent(event);
+   
 }
 
 void
@@ -2863,14 +3006,6 @@
 
    if (gridChan && (gridChan->Number() != cDevice::CurrentChannel())) {
       /*
-       * The "Channel not availaible message" will cause vdr to crash. Do a
-       * "lower level" channel switch to avoid the error message.
-       *
-       * XXX Is this still true ? XXX
-       */
-      eSetChannelResult ret;
-
-      /*
        * The eHD card doesn't seem to like changing channels while the video
        * plane is sacled down.  To get around this problem we close/reopen the
        * video window across channel changes.
@@ -2880,10 +3015,7 @@
       cCondWait::SleepMs(100);
 #endif
 
-      ret = cDevice::PrimaryDevice()->SetChannel(gridChan, true);
-      if (ret != scrOk) {
-         fprintf(stderr, "SetChannel(): %d\n", ret);
-      }
+      Channels.SwitchTo(gridChan->Number());
 
 #ifdef YAEPGHD_REEL_EHD
       if (closeVidWin == false) {
@@ -2933,6 +3065,7 @@
    gridDate->Draw(mainBmp);
    timeLine->Draw(mainBmp);
    eventTitle->Draw(mainBmp);
+   eventInfo->Draw(mainBmp);
    eventTime->Draw(mainBmp);
    eventDesc->Draw(mainBmp);
    eventDate->Draw(mainBmp);
@@ -2950,10 +3083,13 @@
 class cMenuSetupYaepg : public cMenuSetupPage {
 private:
    int iNewHideMenuEntry;
+   #if MAINMENUHOOKSVERSNUM == 10100
    int iNewReplaceOrgSchedule;
+   #endif
    int iNewChannelChange;
    int iNewTimeFormat;
    int iNewChannelOrder;
+   int iNewChannelNumber;
    int iNewThemeIndex;
    char **themes;
    int numThemes;
@@ -2973,17 +3109,23 @@
 void cMenuSetupYaepg::Store(void)
 {
    iHideMenuEntry      = iNewHideMenuEntry;
+   #if MAINMENUHOOKSVERSNUM == 10100
    iReplaceOrgSchedule = iNewReplaceOrgSchedule;
+   #endif
    iChannelChange      = iNewChannelChange;
    iTimeFormat         = iNewTimeFormat;
    iChannelOrder       = iNewChannelOrder;
+   iChannelNumber      = iNewChannelNumber;
    sThemeName          = themes[iNewThemeIndex];
 
    SetupStore("HideMenuEntry",      iHideMenuEntry);
+   #if MAINMENUHOOKSVERSNUM == 10100
    SetupStore("ReplaceOrgSchedule", iReplaceOrgSchedule);
+   #endif
    SetupStore("ChannelChange",      iChannelChange);
    SetupStore("TimeFormat",         iTimeFormat);
    SetupStore("ChannelOrder",       iChannelOrder);
+   SetupStore("ChannelNumber",      iChannelNumber);
    SetupStore("Theme",              sThemeName.c_str());
 }
 
@@ -3012,17 +3154,25 @@
    }
 
    iNewHideMenuEntry = iHideMenuEntry;
+   #if MAINMENUHOOKSVERSNUM == 10100
+   iNewReplaceOrgSchedule = iReplaceOrgSchedule;
+   #endif
    iNewChannelChange = iChannelChange;
    iNewTimeFormat    = iTimeFormat;
    iNewChannelOrder  = iChannelOrder;
-   iNewReplaceOrgSchedule = iReplaceOrgSchedule;
+   iNewChannelNumber = iChannelNumber;
 
    Add(new cMenuEditBoolItem (tr("Hide mainmenu entry"), &iNewHideMenuEntry));
+   #if MAINMENUHOOKSVERSNUM == 10100
    Add(new cMenuEditBoolItem (tr("Replace original schedule"), &iNewReplaceOrgSchedule));
+   #endif
    Add(new cMenuEditStraItem (tr("Channel change"), &iNewChannelChange, CHANNEL_CHANGE_COUNT, CH_CHANGE_MODES));
    Add(new cMenuEditStraItem (tr("Time format"), &iNewTimeFormat, TIME_FORMAT_COUNT, TIME_FORMATS));
    Add(new cMenuEditStraItem (tr("Channel order"), &iNewChannelOrder, CHANNEL_ORDER_COUNT, CH_ORDER_FORMATS));
-   Add(new cMenuEditStraItem (trVDR("Setup.OSD$Theme"), &iNewThemeIndex, numThemes, themes));
+   Add(new cMenuEditBoolItem (tr("Channel number"), &iNewChannelNumber));
+   if (numThemes > 0) {
+      Add(new cMenuEditStraItem (trVDR("Setup.OSD$Theme"), &iNewThemeIndex, numThemes, themes));
+   }
 }
 
 cMenuSetupYaepg::~cMenuSetupYaepg()
@@ -3040,7 +3190,7 @@
  * cPluginYaepghd
  *****************************************************************************
  */
-static const char *VERSION        = "0.0.1";
+static const char *VERSION        = "0.0.2beta";
 static const char *DESCRIPTION    = trNOOP("Yet another EPG in HD");
 static const char *MAINMENUENTRY  = trNOOP("YaepgHD");
 
@@ -3059,7 +3209,7 @@
    virtual void MainThreadHook(void);
    virtual cString Active(void);
    virtual time_t WakeupTime(void);
-   virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); }
+   virtual const char *MainMenuEntry(void) { return iHideMenuEntry ? NULL : tr(MAINMENUENTRY); }
    virtual cOsdObject *MainMenuAction(void);
    virtual cMenuSetupPage *SetupMenu(void);
    virtual bool SetupParse(const char *Name, const char *Value);
@@ -3152,7 +3302,8 @@
 cOsdObject *
 cPluginYaepghd::MainMenuAction(void)
 {
-   return new cYaepghd;
+  return new cYaepghd;
+//   return new cYaepghdMenu; 
 }
 
 cMenuSetupPage *
@@ -3169,9 +3320,13 @@
 
    // Parse your own setup parameters and store their values.
    if      (!strcasecmp(Name, "HideMenuEntry")) { iHideMenuEntry = atoi(Value); }
+   #if MAINMENUHOOKSVERSNUM == 10100
+   else if (!strcasecmp(Name, "ReplaceOrgSchedule")) { iReplaceOrgSchedule = atoi(Value); }
+   #endif
    else if (!strcasecmp(Name, "ChannelChange")) { iChannelChange = atoi(Value); }
    else if (!strcasecmp(Name, "TimeFormat"))    { iTimeFormat = atoi(Value); }
    else if (!strcasecmp(Name, "ChannelOrder"))  { iChannelOrder = atoi(Value); }
+   else if (!strcasecmp(Name, "ChannelNumber")) { iChannelNumber = atoi(Value); }
    else if (!strcasecmp(Name, "Theme"))         { Utf8Strn0Cpy(themeName, Value, sizeof(themeName)); sThemeName = themeName; }
    else                                         { return false; }
 
@@ -3181,18 +3336,20 @@
 bool
 cPluginYaepghd::Service(const char *Id, void *Data)
 {
-   if (strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0 && iReplaceOrgSchedule)
+#if MAINMENUHOOKSVERSNUM == 10100
+   if (strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0  && iReplaceOrgSchedule)
    {
       if (!Data) {
          return true;
       }
-      cOsdMenu **menu = (cOsdMenu**)Data;
-      if (menu) {
-         *menu = (cOsdMenu*)MainMenuAction();
+      cOsdObject **osd = (cOsdObject**)Data;
+      if (osd) {
+         *osd = (cOsdObject*)MainMenuAction();
       }
       return true;
    }
-
+#endif
+   // Handle custom service requests from other plugins
    return false;
 }
 
