diff options
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | HISTORY.DE | 3 | ||||
-rw-r--r-- | doc-src/en/epgsearch.4.txt | 2 | ||||
-rw-r--r-- | epgsearchsvdrp.c | 30 | ||||
-rw-r--r-- | menu_main.c | 4 |
5 files changed, 27 insertions, 15 deletions
@@ -10,7 +10,8 @@ new: - 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 + the summary of the current event. If any epgsearch menu is open a subsequent + SVDRP call will close it again. fixes: - fixed a crash when pressing 'Ok' in an empty timers done menu @@ -10,7 +10,8 @@ neu: - 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. + oder der Inhaltsangabe der aktuellen Sendung. Falls irgendein epgsearch-Menü + geöffnet ist, schließt ein weiteres SVDRP-Kommando dieses wieder. fixes: - Absturz beim Drücken von 'Ok' in leerem Menü erledigter Timer behoben diff --git a/doc-src/en/epgsearch.4.txt b/doc-src/en/epgsearch.4.txt index bcd7512..8267c35 100644 --- a/doc-src/en/epgsearch.4.txt +++ b/doc-src/en/epgsearch.4.txt @@ -410,6 +410,8 @@ the following commands are available: * 'QRYF [hours]' to get the results for the favorites menu, see QRYS for result format. The optional parameter specifies the number of hours to evaluate and defaults to 24h. + * 'MENU [PRG|NOW|SUM]' calls one of the main menus of epgsearch or the summary + of the current event. =head2 channel group management: diff --git a/epgsearchsvdrp.c b/epgsearchsvdrp.c index e4b17a6..31540f6 100644 --- a/epgsearchsvdrp.c +++ b/epgsearchsvdrp.c @@ -46,6 +46,7 @@ using std::set; template< class Iter > Iter advance_copy( Iter it, std::size_t count = 1) { using std::advance; advance( it, count ); return it; } extern int updateForced; +extern int exitToMainMenu; const char **cPluginEpgsearch::SVDRPHelpPages(void) { @@ -1270,20 +1271,29 @@ cString cPluginEpgsearch::SVDRPCommand(const char *Command, const char *Option, { 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; + if (cMenuSearchMain::forceMenu == 0) + { + 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"; + } else { - ReplyCode = 901; - return cString::sprintf("unknown option '%s'", Option); + cRemote::Put(kBack); + exitToMainMenu = 1; + return "menu closed"; } } - cRemote::CallPlugin("epgsearch"); - return "menu called"; } return NULL; diff --git a/menu_main.c b/menu_main.c index 5ba1d08..a288c42 100644 --- a/menu_main.c +++ b/menu_main.c @@ -74,15 +74,13 @@ cMenuSearchMain::cMenuSearchMain(void) AddSubMenu(new cMenuWhatsOnSearch(schedules, cDevice::CurrentChannel())); } if (forceMenu == 3) - { ShowSummary(); - } - forceMenu = 0; } cMenuSearchMain::~cMenuSearchMain() { cMenuWhatsOnSearch::ScheduleChannel(); // makes sure any posted data is cleared + forceMenu = 0; } int cMenuSearchMain::GetTab(int Tab) |