diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 65856a9fe..16095b2cd 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -318,7 +318,8 @@ int CRCInput::messageLoop( bool anyKeyCancels, int timeout ) ( msg == CRCInput::RC_home ) || ( msg == CRCInput::RC_ok ) ) doLoop = false; - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites)) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else { diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 8326163df..821c1ae3a 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -366,12 +366,13 @@ int CBEBouquetWidget::exec(CMenuTarget* parent, const std::string & /*actionKey* cancelMoveBouquet(); } } - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) + { + // do nothing } else { CNeutrinoApp::getInstance()->handleMsg( msg, data ); - // kein canceling... } } hide(); diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 88ae91ab2..bce6cc269 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -447,7 +447,9 @@ int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & /*actionKey* cancelMoveChannel(); } } - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) + { + // do nothing } else { diff --git a/src/gui/buildinfo.cpp b/src/gui/buildinfo.cpp index ca8a31e6d..aab25e95f 100644 --- a/src/gui/buildinfo.cpp +++ b/src/gui/buildinfo.cpp @@ -82,7 +82,7 @@ int CBuildInfo::exec(CMenuTarget* parent, const string & /*actionKey*/) res = menu_return::RETURN_EXIT_ALL; break; } - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { g_RCInput->postMsg (msg, 0); res = menu_return::RETURN_EXIT_ALL; break; diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 0fcb5da92..23c169e48 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -709,8 +709,9 @@ int CChannelList::show() loop = false; } } - else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { if (!edit_state) { + //FIXME: what about LIST_MODE_WEBTV? int newmode = msg == CRCInput::RC_sat ? LIST_MODE_SAT : LIST_MODE_FAV; CNeutrinoApp::getInstance()->SetChannelMode(newmode); res = CHANLIST_CHANGE_MODE; @@ -1318,7 +1319,8 @@ int CChannelList::numericZap(int key) doZap = true; break; } - else if (msg == CRCInput::RC_favorites || msg == CRCInput::RC_sat || msg == CRCInput::RC_www || msg == CRCInput::RC_right) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg) || msg == CRCInput::RC_right) { + // do nothing } else if (CRCInput::isNumeric(msg)) { if (pos == 4) { diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index d9351a9c3..403220faf 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -138,7 +138,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &) res = menu_return::RETURN_EXIT_ALL; doLoop = false; } - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + else if(CNeutrinoApp::getInstance()->listModeKey(msg)) { g_RCInput->postMsg (msg, 0); res = menu_return::RETURN_EXIT_ALL; doLoop = false; diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index c3d9981fa..3c6fa0828 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -1132,7 +1132,7 @@ int EpgPlus::exec (CChannelList * pchannelList, int selectedChannelIndex, CBouqu } } } - else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { g_RCInput->postMsg (msg, 0); res = menu_return::RETURN_EXIT_ALL; loop = false; diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index c3878ed7b..ce034413a 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -1259,14 +1259,6 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start } else loop = false; break; - case CRCInput::RC_favorites: - case CRCInput::RC_sat: - case CRCInput::RC_www: - if( !call_fromfollowlist){ - g_RCInput->postMsg (msg, 0); - loop = false; - } - break; default: if (msg == (neutrino_msg_t)g_settings.key_channelList_cancel) { if(fader.StartFadeOut()) { @@ -1274,7 +1266,14 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start msg = 0; } else loop = false; - } else if (msg == NeutrinoMessages::EVT_SERVICESCHANGED || msg == NeutrinoMessages::EVT_BOUQUETSCHANGED) { + } + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + if (!call_fromfollowlist) { + g_RCInput->postMsg (msg, 0); + loop = false; + } + } + else if (msg == NeutrinoMessages::EVT_SERVICESCHANGED || msg == NeutrinoMessages::EVT_BOUQUETSCHANGED) { g_RCInput->postMsg(msg, data); loop = false; res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 38e2d9662..dfa836f53 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -652,11 +652,12 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna in_search = findEvents(channel_id, channelname); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); } - else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { g_RCInput->postMsg (msg, 0); res = menu_return::RETURN_EXIT_ALL; loop = false; - } else if (msg == NeutrinoMessages::EVT_SERVICESCHANGED || msg == NeutrinoMessages::EVT_BOUQUETSCHANGED) { + } + else if (msg == NeutrinoMessages::EVT_SERVICESCHANGED || msg == NeutrinoMessages::EVT_BOUQUETSCHANGED) { g_RCInput->postMsg(msg, data); loop = false; res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index a8b871128..a5637052c 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -151,7 +151,7 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &) btn_red->kill(); btn_red->paint(false); } - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { g_RCInput->postMsg (msg, 0); res = menu_return::RETURN_EXIT_ALL; break; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 372710cde..e65128d75 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1025,7 +1025,7 @@ void CInfoViewer::loop(bool show_dot) if (msg == (neutrino_msg_t) g_settings.key_screenshot) { res = CNeutrinoApp::getInstance()->handleMsg(msg, data); - } else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { + } else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { g_RCInput->postMsg (msg, 0); res = messages_return::cancel_info; } else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) { diff --git a/src/gui/lua/lua_hintbox.cpp b/src/gui/lua/lua_hintbox.cpp index 4cee2bbbb..cfa25f203 100644 --- a/src/gui/lua/lua_hintbox.cpp +++ b/src/gui/lua/lua_hintbox.cpp @@ -154,7 +154,8 @@ int CLuaInstHintbox::HintboxExec(lua_State *L) D->b->scroll_up(); else D->b->scroll_down(); - } else if ((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + } else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else if (msg == CRCInput::RC_mode) { break; } else if ((msg == CRCInput::RC_next) || (msg == CRCInput::RC_prev)) { diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index ea1319fea..2648480a3 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -990,8 +990,8 @@ int CMovieBrowser::exec(const char* path) { loop = false; } - else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { - //FIXME do nothing ? + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else if (msg == NeutrinoMessages::STANDBY_ON || msg == NeutrinoMessages::LEAVE_ALL || diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index ad2f7d611..1f878adcb 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1585,8 +1585,8 @@ void CMoviePlayerGui::PlayFileLoop(void) } else if (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER) { if (playstate == CMoviePlayerGui::PLAY && (position >= 300000 || (duration < 300000 && (position > (duration /2))))) makeScreenShot(true); - } else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { - //FIXME do nothing ? + } else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else if (msg == (neutrino_msg_t) CRCInput::RC_setup) { CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::SHOW_MAINMENU, 0); } else if (msg == CRCInput::RC_red || msg == CRCInput::RC_green || msg == CRCInput::RC_yellow || msg == CRCInput::RC_blue ) { diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 3f776af5e..d6a102770 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -632,7 +632,8 @@ int CPictureViewerGui::show() loop = false; g_RCInput->postMsg(msg, data); } - else if ((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else { diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index 1906518ee..9b446f0cd 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -209,13 +209,12 @@ int CScreenSetup::exec(CMenuTarget* parent, const std::string &) } break; } - case CRCInput::RC_favorites: - case CRCInput::RC_sat: - case CRCInput::RC_www: - break; - default: - if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) + if (CNeutrinoApp::getInstance()->listModeKey(msg)) + { + break; + } + else if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { loop = false; res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 0856435e0..586fdcfd5 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -238,7 +238,7 @@ int CStreamInfo2::doSignalStrengthLoop () res = menu_return::RETURN_EXIT_ALL; break; } - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + else if(CNeutrinoApp::getInstance()->listModeKey(msg)) { g_RCInput->postMsg (msg, 0); res = menu_return::RETURN_EXIT_ALL; break; diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index ec9cb5085..8af61afe6 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -623,9 +623,8 @@ int CTimerList::show() paint(); } } - // help key } - else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { g_RCInput->postMsg (msg, 0); loop = false; res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/widget/colorchooser.cpp b/src/gui/widget/colorchooser.cpp index 92634eece..a1eef250c 100644 --- a/src/gui/widget/colorchooser.cpp +++ b/src/gui/widget/colorchooser.cpp @@ -229,18 +229,16 @@ int CColorChooser::exec(CMenuTarget* parent, const std::string &) *value[VALUE_ALPHA] = a_alt; loop = false; break; - - case CRCInput::RC_sat: - case CRCInput::RC_favorites: - case CRCInput::RC_www: - break; case CRCInput::RC_timeout: case CRCInput::RC_ok: loop = false; break; - default: - if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) + if (CNeutrinoApp::getInstance()->listModeKey(msg)) + { + break; + } + else if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { loop = false; res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 0f547dfe5..355efb877 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -290,7 +290,8 @@ int ShowHint(const char * const Caption, const char * const Text, const int Widt else hintBox->scroll_down(); } - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) { + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else if(msg == CRCInput::RC_mode) { res = messages_return::handled; diff --git a/src/gui/widget/keyboard_input.cpp b/src/gui/widget/keyboard_input.cpp index 4d459fefe..297e4e61b 100644 --- a/src/gui/widget/keyboard_input.cpp +++ b/src/gui/widget/keyboard_input.cpp @@ -610,8 +610,9 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &) loop = false; res = menu_return::RETURN_EXIT_REPAINT; } - else if ((msg ==CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else { diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 0ddf8d791..2dc01062f 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -223,13 +223,13 @@ int CListBox::exec(CMenuTarget* parent, const std::string & /*actionKey*/) { onBlueKeyPressed(); } - else if ((msg ==CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else { CNeutrinoApp::getInstance()->handleMsg( msg, data ); - // kein canceling... } } diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 21af5cd46..3a74dcbd9 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -966,13 +966,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) break; case (CRCInput::RC_timeout): break; - - case (CRCInput::RC_sat): - case (CRCInput::RC_favorites): - case (CRCInput::RC_www): - g_RCInput->postMsg (msg, 0); - //close any menue on dbox-key case (CRCInput::RC_setup): + //close any menu on menu-key { msg = CRCInput::RC_timeout; retval = menu_return::RETURN_EXIT_ALL; @@ -989,7 +984,10 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) break; default: - if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { + if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + g_RCInput->postMsg (msg, 0); + } + else if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { retval = menu_return::RETURN_EXIT_ALL; msg = CRCInput::RC_timeout; } diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp index f7e497846..7140d7569 100644 --- a/src/gui/widget/messagebox.cpp +++ b/src/gui/widget/messagebox.cpp @@ -273,8 +273,9 @@ int CMessageBox::exec(int timeout) { loop = false; } - else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www) || (msg == CRCInput::RC_spkr)) + else if (CNeutrinoApp::getInstance()->listModeKey(msg) || (msg == CRCInput::RC_spkr)) { + // do nothing } else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all) { diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 503e79233..6e0067e4f 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -730,8 +730,9 @@ int CMsgBox::exec( int timeout, int returnDefaultOnTimeout) { loop = false; } - else if ((msg ==CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all) { diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 4651d33d1..e776e1b6e 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -494,8 +494,9 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) loop=false; res = menu_return::RETURN_EXIT_REPAINT; } - else if ((msg ==CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else { diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index d95d07681..2d04e833b 100644 --- a/src/gui/widget/stringinput_ext.cpp +++ b/src/gui/widget/stringinput_ext.cpp @@ -251,14 +251,14 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & ) timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); } } else { - //keine änderungen - beenden ok loop=false; if(cancel != NULL) *cancel = true; } } - else if ((msg ==CRCInput::RC_sat) || (msg == CRCInput::RC_favorites) || (msg == CRCInput::RC_www)) + else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { + // do nothing } else if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b185cd004..31dc68ce0 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2765,6 +2765,17 @@ void CNeutrinoApp::lockPlayBack(bool blank) videoDecoder->setBlank(true); } +bool CNeutrinoApp::listModeKey(const neutrino_msg_t msg) +{ + if ( + msg == CRCInput::RC_sat + || msg == CRCInput::RC_favorites + || msg == CRCInput::RC_www + ) + return true; + return false; +} + int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) { int res = 0; @@ -2854,7 +2865,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) } /* ================================== KEYS ================================================ */ - if( msg == CRCInput::RC_ok || (!g_InfoViewer->getSwitchMode() && (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www))) { + if( msg == CRCInput::RC_ok || (!g_InfoViewer->getSwitchMode() && CNeutrinoApp::getInstance()->listModeKey(msg))) { if( (mode == mode_tv) || (mode == mode_radio) || (mode == mode_ts) || (mode == mode_webtv)) { showChannelList(msg); return messages_return::handled; diff --git a/src/neutrino.h b/src/neutrino.h index 61f616bfd..151aadd2b 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -189,6 +189,7 @@ public: // //onchange bool changeNotify(const neutrino_locale_t OptionName, void *); + bool listModeKey(const neutrino_msg_t msg); int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data); int getMode() {