From b61adf86d00ec8a360c307823995cc4efbb4d68e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 1 Aug 2017 14:44:21 +0200 Subject: [PATCH 1/4] menu: fix icon for CGenericMenuNext forwarder Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/27b111820f3833a77f04bbaf717b4ce6c658b698 Author: vanhofen Date: 2017-08-01 (Tue, 01 Aug 2017) Origin message was: ------------------ - menu: fix icon for CGenericMenuNext forwarder ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index b5bb24b0e..90cfeb631 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -55,7 +55,7 @@ CMenuSeparator CGenericMenuSeparator(0, NONEXISTANT_LOCALE, true); CMenuSeparator CGenericMenuSeparatorLine(CMenuSeparator::LINE, NONEXISTANT_LOCALE, true); CMenuForwarder CGenericMenuBack(LOCALE_MENU_BACK, true, NULL, NULL, NULL, CRCInput::RC_nokey, NEUTRINO_ICON_BUTTON_LEFT, NULL, true); CMenuForwarder CGenericMenuCancel(LOCALE_MENU_CANCEL, true, NULL, NULL, NULL, CRCInput::RC_nokey, NEUTRINO_ICON_BUTTON_HOME, NULL, true); -CMenuForwarder CGenericMenuNext(LOCALE_MENU_NEXT, true, NULL, NULL, NULL, CRCInput::RC_nokey, NEUTRINO_ICON_BUTTON_HOME, NULL, true); +CMenuForwarder CGenericMenuNext(LOCALE_MENU_NEXT, true, NULL, NULL, NULL, CRCInput::RC_nokey, NEUTRINO_ICON_BUTTON_RIGHT, NULL, true); CMenuSeparator * const GenericMenuSeparator = &CGenericMenuSeparator; CMenuSeparator * const GenericMenuSeparatorLine = &CGenericMenuSeparatorLine; CMenuForwarder * const GenericMenuBack = &CGenericMenuBack; From ec7ea3a2c8e52212ee1fdf607a40a56878fa436b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 6 Aug 2017 21:00:45 +0200 Subject: [PATCH 2/4] english.locale: small corrections in channellist locales Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/752ddf25df3227b554e0d7471a6bdc55c4bf6915 Author: vanhofen Date: 2017-08-06 (Sun, 06 Aug 2017) Origin message was: ------------------ - english.locale: small corrections in channellist locales ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/english.locale | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/locale/english.locale b/data/locale/english.locale index eefe40372..9d373da9d 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -269,16 +269,16 @@ channellist.epgtext_align_right right channellist.extended Show event progress channellist.extended_colored with colored progressbar channellist.extended_simple with simple progressbar -channellist.favs Favoriten -channellist.foot Channel Information -channellist.foot_freq Sat/Freq Info -channellist.foot_next next Event +channellist.favs Favorites +channellist.foot Channel information +channellist.foot_freq Sat/Freq info +channellist.foot_next Next event channellist.foot_off off channellist.foot_sort_alpha sorted[alpha] channellist.foot_sort_chnum sorted[number] channellist.foot_sort_freq sorted[freq] channellist.foot_sort_sat sorted[sat] -channellist.head All Services +channellist.head All services channellist.history History channellist.history_clear Clear history channellist.keep_numbers Persistent channel numbers From c9e8652129f319a40e485a0378f39aa201a6220f Mon Sep 17 00:00:00 2001 From: GetAway Date: Sun, 6 Aug 2017 21:29:07 +0200 Subject: [PATCH 3/4] neutrino.cpp: repaint of background in radio mode, when close UPNP-Browser Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/95b535016f4a8b2d4edfbcec223a87f3c9b4aebb Author: GetAway Date: 2017-08-06 (Sun, 06 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b25ed8e7b..519ebdfda 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4103,7 +4103,7 @@ void CNeutrinoApp::radioMode( bool rezap) CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); videoDecoder->Standby(false); } - mode = mode_radio; + #ifdef ENABLE_PIP pipDecoder->Pig(g_settings.pip_radio_x, g_settings.pip_radio_y, g_settings.pip_radio_width, g_settings.pip_radio_height, @@ -4111,6 +4111,12 @@ void CNeutrinoApp::radioMode( bool rezap) #endif CRecordManager::getInstance()->StopAutoRecord(); + if (mode != mode_webtv) { + frameBuffer->useBackground(false); + frameBuffer->paintBackground(); + } + mode = mode_radio; + g_RemoteControl->radioMode(); SetChannelMode(g_settings.channel_mode_radio); From aaee0baf0778c70c2e0d340439aab53afdb7c451 Mon Sep 17 00:00:00 2001 From: GetAway Date: Sun, 6 Aug 2017 23:03:25 +0200 Subject: [PATCH 4/4] neutrino: disable some menus in upnp & ts mode to prevent inoperability of neutrino Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/90de51de3807c76f66f642c94fec82cd1f7d2f6f Author: GetAway Date: 2017-08-06 (Sun, 06 Aug 2017) ------------------ This commit was generated by Migit --- src/gui/user_menue.cpp | 13 +++++++------ src/gui/widget/menue.cpp | 8 +++++++- src/gui/widget/menue.h | 3 +++ src/neutrino_menue.cpp | 18 +++++++++++++++--- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index a7d77530d..657956f86 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -184,6 +184,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) menu->addItem(GenericMenuSeparator); bool _mode_ts = CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_ts; + bool _mode_upnp = CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_upnp; bool _mode_webtv = (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_webtv) && (!CZapit::getInstance()->GetCurrentChannel()->getScriptName().empty()); @@ -249,7 +250,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) case SNeutrinoSettings::ITEM_AUDIO_SELECT: { keyhelper.get(&key,&icon); - menu_item = new CMenuDForwarder(LOCALE_AUDIOSELECTMENUE_HEAD, !_mode_ts, NULL, new CAudioSelectMenuHandler, "-1", key,icon); + menu_item = new CMenuDForwarder(LOCALE_AUDIOSELECTMENUE_HEAD, !_mode_ts && !_mode_upnp, NULL, new CAudioSelectMenuHandler, "-1", key,icon); // FIXME menu_item->setHint("", NONEXISTANT_LOCALE); break; } @@ -285,7 +286,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) if (g_settings.recording_type == RECORDING_OFF) break; keyhelper.get(&key,&icon,CRCInput::RC_green); - menu_item = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, !_mode_ts, NULL, neutrino, "tsmoviebrowser", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, !_mode_ts && !_mode_upnp, NULL, neutrino, "tsmoviebrowser", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MB); break; } @@ -407,14 +408,14 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) case SNeutrinoSettings::ITEM_YOUTUBE: { keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, !_mode_ts, NULL, neutrino, "ytplayback", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, !_mode_ts && !_mode_upnp, NULL, neutrino, "ytplayback", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); break; } case SNeutrinoSettings::ITEM_FILEPLAY: { keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, !_mode_ts, NULL, neutrino, "fileplayback", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, !_mode_ts && !_mode_upnp, NULL, neutrino, "fileplayback", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_FILEPLAY, LOCALE_MENU_HINT_FILEPLAY); break; } @@ -442,14 +443,14 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) case SNeutrinoSettings::ITEM_AUDIOPLAY: { keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, neutrino, "audioplayer", key, icon); + menu_item = new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, !_mode_ts && !_mode_upnp, NULL, neutrino, "audioplayer", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY); break; } case SNeutrinoSettings::ITEM_INETPLAY: { keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_INETRADIO_NAME, true, NULL, neutrino, "inetplayer", key, icon); + menu_item = new CMenuForwarder(LOCALE_INETRADIO_NAME, !_mode_ts && !_mode_upnp, NULL, neutrino, "inetplayer", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO); break; } diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index be765c30c..f944ccfb9 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -131,7 +131,13 @@ bool CMenuItem::initModeCondition(const int& stb_mode) void CMenuItem::disableByCondition(const menu_item_disable_cond_t& condition) { int stb_mode = CNeutrinoApp::getInstance()->getMode(); - +#if ENABLE_UPNP + if (condition & DCOND_MODE_UPNP){ + if (stb_mode == CNeutrinoApp::mode_upnp) + if (initModeCondition(stb_mode)) + return; + } +#endif if (condition & DCOND_MODE_TS){ if (stb_mode == CNeutrinoApp::mode_ts) if (initModeCondition(stb_mode)) diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 3b47f51de..4aa5797ca 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -78,6 +78,9 @@ enum DCOND_MODE_TV = 2, DCOND_MODE_RADIO = 4, DCOND_MODE_TS = 8 +#if ENABLE_UPNP + ,DCOND_MODE_UPNP = 16 +#endif }/*menu_item_disable_cond_t*/; class CChangeObserver diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index fc673329b..3b281fcae 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -164,17 +164,29 @@ void CNeutrinoApp::InitMenuMain() //tv <-> radio toggle CMenuForwarder *tvradio_switch = new CMenuForwarder(LOCALE_MAINMENU_TVRADIO_SWITCH, true, NULL, this, "tv_radio_switch", CRCInput::RC_red); tvradio_switch->setHint(NEUTRINO_ICON_HINT_TVRADIO_SWITCH, LOCALE_MENU_HINT_TVRADIO_SWITCH); - personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); + personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS +#if ENABLE_UPNP + | DCOND_MODE_UPNP +#endif + ); //tv-mode CMenuForwarder *tvswitch = new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red); tvswitch->setHint(NEUTRINO_ICON_HINT_TVMODE, LOCALE_MENU_HINT_TVMODE); - personalize.addItem(MENU_MAIN, tvswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_TV | DCOND_MODE_TS); //observed + personalize.addItem(MENU_MAIN, tvswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_TV | DCOND_MODE_TS //observed +#if ENABLE_UPNP + | DCOND_MODE_UPNP +#endif + ); //radio-mode CMenuForwarder *radioswitch = new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green); radioswitch->setHint(NEUTRINO_ICON_HINT_RADIOMODE, LOCALE_MENU_HINT_RADIOMODE); - personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_RADIO | DCOND_MODE_TS); //observed + personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_RADIO | DCOND_MODE_TS //observed +#if ENABLE_UPNP + | DCOND_MODE_UPNP +#endif + ); } //timer