From 848877367bfbc6d74e00e949c93f46cdbe4702a6 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 29 Jul 2018 00:54:55 +0200 Subject: [PATCH] channellist: move avoid-zap-in-movieplayer-mode-message ... ... to a global reachable place to avoid all zap tries Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/984e187855b291af2d0729b9defa2a14ec5da9b4 Author: vanhofen Date: 2018-07-29 (Sun, 29 Jul 2018) Origin message was: ------------------ - channellist: move avoid-zap-in-movieplayer-mode-message ... ... to a global reachable place to avoid all zap tries --- src/gui/channellist.cpp | 12 ++++++------ src/gui/epgplus.cpp | 5 +---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index e7293ba79..2011bef3d 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -778,8 +778,6 @@ int CChannelList::show() actzap = true; oldselected = selected; paintBody(); // refresh zapped vs selected - } else if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_ts) { - ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEPLAYER_ZAP); } else if(SameTP()) { zapOnExit = true; loop=false; @@ -960,10 +958,6 @@ int CChannelList::show() printf("CChannelList:: bouquetList->exec res %d\n", res); } - - if(NeutrinoModes::mode_ts == CNeutrinoApp::getInstance()->getMode()) - return -1; - if(zapOnExit) res = selected; @@ -1208,6 +1202,12 @@ void CChannelList::zapToChannel(CZapitChannel *channel, bool force) if(channel == NULL) return; + if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_ts) + { + ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEPLAYER_ZAP); + return; + } + /* we record when we switched away from a channel, so that the parental-PIN code can check for timeout. last_unlocked_time == 0 means: the PIN was not entered "tuned" is the *old* channel, before zap */ diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 89da4b458..44c84c0cf 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -1081,10 +1081,7 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque { if (selectedChannelEntry) { - if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_ts) - ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEPLAYER_ZAP); - else - CNeutrinoApp::getInstance()->channelList->zapTo_ChannelID(selectedChannelEntry->channel->getChannelID()); + CNeutrinoApp::getInstance()->channelList->zapTo_ChannelID(selectedChannelEntry->channel->getChannelID()); } current_bouquet = bouquetList->getActiveBouquetNumber(); }