diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-08-26 21:49:39 +0200 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-08-26 21:49:39 +0200 |
commit | bca6bdb7708f405aebc61936176a831ec7469f59 (patch) | |
tree | 4b78a67814b51b35b37e1cc0dbc32017001c6489 | |
parent | bd99ed281a1d552f1d4a8aa3baee89d06e6c72c8 (diff) | |
download | vdr-plugin-epgsearch-bca6bdb7708f405aebc61936176a831ec7469f59.tar.gz vdr-plugin-epgsearch-bca6bdb7708f405aebc61936176a831ec7469f59.tar.bz2 |
new SVDRP command 'MENU'
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | HISTORY.DE | 2 | ||||
-rw-r--r-- | epgsearch.c | 2 | ||||
-rw-r--r-- | epgsearchsvdrp.c | 25 | ||||
-rw-r--r-- | menu_main.c | 11 | ||||
-rw-r--r-- | menu_main.h | 2 |
6 files changed, 40 insertions, 4 deletions
@@ -9,6 +9,8 @@ new: * %chgrp% returns the VDR channel group name corresponding to an event - french translation update, thanks to Patrice Staudt - italian translation update, thanks to Diego Pierotto +- new SVDRP command 'MENU [NOW|PRG|SUM]' to call one of the main OSD menus or + the summary of the current event fixes: - fixed a crash when pressing 'Ok' in an empty timers done menu @@ -9,6 +9,8 @@ neu: * %chgrp% liefert die VDR Kanalgruppe einer Sendung - Update der französischen Übersetzung, Danke an Patrice Staudt - Update der italienischen Übersetzung, Danke an Diego Pierotto +- neues SVDRP-Kommando 'MENU [NOW|PRG|SUM]' zum Aufruf eines der OSD-Hauptmenüs + oder der Inhaltsangabe der aktuellen Sendung. fixes: - Absturz beim Drücken von 'Ok' in leerem Menü erledigter Timer behoben diff --git a/epgsearch.c b/epgsearch.c index bcc6b9c..d9f6b7f 100644 --- a/epgsearch.c +++ b/epgsearch.c @@ -69,7 +69,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include <langinfo.h> #endif -static const char VERSION[] = "0.9.25.beta3"; +static const char VERSION[] = "0.9.25.beta4"; static const char DESCRIPTION[] = trNOOP("search the EPG for repeats and more"); // globals diff --git a/epgsearchsvdrp.c b/epgsearchsvdrp.c index 6a9319f..e4b17a6 100644 --- a/epgsearchsvdrp.c +++ b/epgsearchsvdrp.c @@ -38,6 +38,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #include "menu_dirselect.h" #include "menu_deftimercheckmethod.h" #include "conflictcheck.h" +#include "menu_main.h" using std::string; using std::set; @@ -127,6 +128,9 @@ const char **cPluginEpgsearch::SVDRPHelpPages(void) "LSCC [ REL ]\n" " Returns the current timer conflicts. With the option\n" " 'REL' only relevant conflicts are listed", + "MENU [ NOW|PRG|SUM ]\n" + " Calls one of the main menus of epgsearch or the summary\n" + " of the current event", NULL }; return HelpPages; @@ -1262,6 +1266,25 @@ cString cPluginEpgsearch::SVDRPCommand(const char *Command, const char *Option, return cString("no conflicts found"); } } - + else if (strcasecmp(Command, "MENU") == 0) + { + if (*Option) + { + if (strcasecmp(Option, "PRG") == 0) + cMenuSearchMain::forceMenu = 2; + else if (strcasecmp(Option, "NOW") == 0) + cMenuSearchMain::forceMenu = 1; + else if (strcasecmp(Option, "SUM") == 0) + cMenuSearchMain::forceMenu = 3; + else + { + ReplyCode = 901; + return cString::sprintf("unknown option '%s'", Option); + } + } + cRemote::CallPlugin("epgsearch"); + return "menu called"; + } + return NULL; } diff --git a/menu_main.c b/menu_main.c index 2f2d1ee..5ba1d08 100644 --- a/menu_main.c +++ b/menu_main.c @@ -43,6 +43,8 @@ int toggleKeys=0; int exitToMainMenu = 0; extern int gl_InfoConflict; +int cMenuSearchMain::forceMenu = 0; // 1 = now, 2 = schedule, 3 = summary + // --- cMenuSearchMain --------------------------------------------------------- cMenuSearchMain::cMenuSearchMain(void) :cOsdMenu("", GetTab(1), GetTab(2), GetTab(3), GetTab(4), GetTab(5)) @@ -57,7 +59,7 @@ cMenuSearchMain::cMenuSearchMain(void) schedules = cSchedules::Schedules(schedulesLock); if (channel) { cMenuWhatsOnSearch::SetCurrentChannel(channel->Number()); - if (EPGSearchConfig.StartMenu == 0) + if (EPGSearchConfig.StartMenu == 0 || forceMenu != 0) PrepareSchedule(channel); SetHelpKeys(); cMenuWhatsOnSearch::currentShowMode = showNow; @@ -66,11 +68,16 @@ cMenuSearchMain::cMenuSearchMain(void) //isyslog("duration epgs sched: %d", tnow.millitm - gl_time.millitm + ((tnow.millitm - gl_time.millitm<0)?1000:0)); } - if (EPGSearchConfig.StartMenu == 1) + if ((EPGSearchConfig.StartMenu == 1 || forceMenu == 1) && forceMenu != 2) { InWhatsOnMenu = true; AddSubMenu(new cMenuWhatsOnSearch(schedules, cDevice::CurrentChannel())); } + if (forceMenu == 3) + { + ShowSummary(); + } + forceMenu = 0; } cMenuSearchMain::~cMenuSearchMain() diff --git a/menu_main.h b/menu_main.h index 170918a..b1045d7 100644 --- a/menu_main.h +++ b/menu_main.h @@ -58,6 +58,8 @@ class cMenuSearchMain : public cOsdMenu { #ifdef USE_GRAPHTFT virtual const char* MenuKind() { return "MenuEpgsSchedule"; } #endif + + static int forceMenu; }; #endif |