From b7bbace80542be5b49c81b1e41d2898348d6239f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 21 Mar 2018 00:45:21 +0100 Subject: [PATCH] neutrino: simplify key_zaphistory/key_current_transponder calls * allow these both keys in movieplayer too; handling has been missing there Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e8b9104a72af3dc7931ea08735a4be2f0144ad27 Author: vanhofen Date: 2018-03-21 (Wed, 21 Mar 2018) Origin message was: ------------------ - neutrino: simplify key_zaphistory/key_current_transponder calls * allow these both keys in movieplayer too; handling has been missing there ------------------ This commit was generated by Migit --- src/neutrino.cpp | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b98db8ab9..2be6c10b4 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2716,7 +2716,7 @@ void CNeutrinoApp::quickZap(int msg) void CNeutrinoApp::numericZap(int msg) { StopSubtitles(); - int res = channelList->numericZap( msg ); + int res = channelList->numericZap(msg); StartSubtitles(res < 0); if (res >= 0 && CRCInput::isNumeric(msg)) { if (g_settings.channellist_numeric_adjust && first_mode_found >= 0) { @@ -2914,17 +2914,20 @@ void CNeutrinoApp::RealRun() else quickZap( msg ); } - else if( msg == (neutrino_msg_t) g_settings.key_zaphistory ) { - //NI InfoIcons - if(g_settings.key_zaphistory == CRCInput::RC_home) { - if(g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_POPUP) { + else if (msg == (neutrino_msg_t) g_settings.key_lastchannel) { + numericZap(msg); + } + else if (msg == (neutrino_msg_t) g_settings.key_zaphistory || msg == (neutrino_msg_t) g_settings.key_current_transponder) { + //NI InfoIcons; hide, if one of the keys above is assigned to RC_home + if (msg == CRCInput::RC_home) + { + if (g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_POPUP) InfoIcons->hideIcons(); - } } - // Zap-History "Bouquet" + InfoClock->enableInfoClock(false); InfoIcons->enableInfoIcons(false); //NI InfoIcons - numericZap( msg ); + numericZap(msg); InfoClock->enableInfoClock(true); InfoIcons->enableInfoIcons(true); //NI InfoIcons } @@ -2937,10 +2940,6 @@ void CNeutrinoApp::RealRun() } } #endif - else if( msg == (neutrino_msg_t) g_settings.key_lastchannel ) { - // Quick Zap - numericZap( msg ); - } else if(msg == (neutrino_msg_t) g_settings.key_timeshift) { #if 0 if (mode == NeutrinoModes::mode_webtv) { @@ -2949,13 +2948,6 @@ void CNeutrinoApp::RealRun() #endif CRecordManager::getInstance()->StartTimeshift(); } - else if (msg == (neutrino_msg_t) g_settings.key_current_transponder) { - InfoClock->enableInfoClock(false); - InfoIcons->enableInfoIcons(false); //NI InfoIcons - numericZap( msg ); - InfoClock->enableInfoClock(true); - InfoIcons->enableInfoIcons(true); //NI InfoIcons - } #ifdef ENABLE_PIP else if (msg == (neutrino_msg_t) g_settings.key_pip_close) { t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID(); @@ -3188,6 +3180,8 @@ int CNeutrinoApp::showChannelList(const neutrino_msg_t _msg, bool from_menu) if (bouquetList->Bouquets.empty()) SetChannelMode(LIST_MODE_PROV); nNewChannel = bouquetList->exec(true); + } else if (msg == (neutrino_msg_t) g_settings.key_zaphistory || msg == (neutrino_msg_t) g_settings.key_current_transponder) { + channelList->numericZap(msg); } _repeat: printf("CNeutrinoApp::showChannelList: nNewChannel %d\n", nNewChannel);fflush(stdout); @@ -3436,7 +3430,8 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) } /* ================================== KEYS ================================================ */ - if( msg == CRCInput::RC_ok || (!g_InfoViewer->getSwitchMode() && CNeutrinoApp::getInstance()->listModeKey(msg))) { + if( msg == CRCInput::RC_ok || msg == (neutrino_msg_t) g_settings.key_zaphistory || msg == (neutrino_msg_t) g_settings.key_current_transponder + || (!g_InfoViewer->getSwitchMode() && CNeutrinoApp::getInstance()->listModeKey(msg))) { if( (mode == NeutrinoModes::mode_tv) || (mode == NeutrinoModes::mode_radio) || (mode == NeutrinoModes::mode_ts) || (mode == NeutrinoModes::mode_webtv) || (mode == NeutrinoModes::mode_webradio)) { showChannelList(msg); return messages_return::handled;