diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index 2b089178a..d42abf8f9 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -396,9 +396,14 @@ void CPersonalizeGui::ShowUserMenu(CMenuWidget* p_widget, vectoraddItem(new CMenuOptionChooser(usermenu[0].menue_title, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RED_BUTTON], PERSONALIZE_ACTIVE_MODE_OPTIONS, PERSONALIZE_ACTIVE_MODE_MAX, true, user_menu_notifier));/*LOCALE_INFOVIEWER_EVENTLIST*/ + //green + p_widget->addItem(new CMenuOptionChooser(usermenu[1].menue_title, &g_settings.personalize[SNeutrinoSettings::P_MAIN_GREEN_BUTTON], PERSONALIZE_ACTIVE_MODE_OPTIONS, PERSONALIZE_ACTIVE_MODE_MAX, true, user_menu_notifier)); + //yellow + p_widget->addItem(new CMenuOptionChooser(usermenu[2].menue_title, &g_settings.personalize[SNeutrinoSettings::P_MAIN_YELLOW_BUTTON], PERSONALIZE_ACTIVE_MODE_OPTIONS, PERSONALIZE_ACTIVE_MODE_MAX, true, user_menu_notifier)); //blue p_widget->addItem(new CMenuOptionChooser(usermenu[3].menue_title, &g_settings.personalize[SNeutrinoSettings::P_MAIN_BLUE_BUTTON], PERSONALIZE_ACTIVE_MODE_OPTIONS, PERSONALIZE_ACTIVE_MODE_MAX, true, user_menu_notifier));/*LOCALE_INFOVIEWER_STREAMINFO*/ @@ -901,18 +906,22 @@ void CPersonalizeGui::restoreSettings() //helper class to enable/disable some items in usermenu setup -CUserMenuNotifier::CUserMenuNotifier( CMenuItem* i1, CMenuItem* i2) +CUserMenuNotifier::CUserMenuNotifier( CMenuItem* i1, CMenuItem* i2, CMenuItem *i3, CMenuItem *i4) { - toDisable[0]=i1; - toDisable[1]=i2; + toDisable[0]=i1; + toDisable[1]=i2; + toDisable[2]=i3; + toDisable[3]=i4; } bool CUserMenuNotifier::changeNotify(const neutrino_locale_t, void *) { toDisable[0]->setActive(g_settings.personalize[SNeutrinoSettings::P_MAIN_RED_BUTTON]); - toDisable[1]->setActive(g_settings.personalize[SNeutrinoSettings::P_MAIN_BLUE_BUTTON]); - - return false; + toDisable[1]->setActive(g_settings.personalize[SNeutrinoSettings::P_MAIN_GREEN_BUTTON]); + toDisable[2]->setActive(g_settings.personalize[SNeutrinoSettings::P_MAIN_YELLOW_BUTTON]); + toDisable[3]->setActive(g_settings.personalize[SNeutrinoSettings::P_MAIN_BLUE_BUTTON]); + + return false; } //helper class to enable/disable pin setup diff --git a/src/gui/personalize.h b/src/gui/personalize.h index c9c7b4c2e..b3c00ea97 100644 --- a/src/gui/personalize.h +++ b/src/gui/personalize.h @@ -68,9 +68,12 @@ extern CPlugins * g_PluginList; /* neutrino.cpp */ class CUserMenuNotifier : public CChangeObserver { private: - CMenuItem* toDisable[2]; + + CMenuItem* toDisable[4]; + public: - CUserMenuNotifier( CMenuItem*, CMenuItem*); + CUserMenuNotifier( CMenuItem*, CMenuItem*, CMenuItem*, CMenuItem*); + bool changeNotify(const neutrino_locale_t = NONEXISTANT_LOCALE, void *data = NULL); }; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a8db601d1..42919c114 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2117,6 +2117,33 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) else ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); } + else if ((msg == CRCInput::RC_audio) && !g_settings.audio_run_player) + { + StopSubtitles(); + usermenu.showUserMenu(SNeutrinoSettings::BUTTON_GREEN); + StartSubtitles(); + } + else if( msg == CRCInput::RC_green) + { + if (g_settings.personalize[SNeutrinoSettings::P_MAIN_GREEN_BUTTON] == CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED) + { + StopSubtitles(); + usermenu.showUserMenu(SNeutrinoSettings::BUTTON_GREEN); + StartSubtitles(); + } + else + ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); + } + else if( msg == CRCInput::RC_yellow ) { // NVODs + if (g_settings.personalize[SNeutrinoSettings::P_MAIN_YELLOW_BUTTON] == CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED) + { + StopSubtitles(); + usermenu.showUserMenu(SNeutrinoSettings::BUTTON_YELLOW); + StartSubtitles(); + } + else + ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_PERSONALIZE_MENUDISABLEDHINT),450, 10); + } else if( (msg == CRCInput::RC_green) || ((msg == CRCInput::RC_audio) && !g_settings.audio_run_player) ) { StopSubtitles(); diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 15c32b6cb..d9d45c3e9 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -35,6 +35,8 @@ const struct personalize_settings_t personalize_settings[SNeutrinoSettings::P_SE //user menu {"personalize_bluebutton" , CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED}, // features + {"personalize_yellowbutton" , CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED}, // features + {"personalize_greenbutton" , CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED}, // features {"personalize_redbutton" , CPersonalizeGui::PERSONALIZE_ACTIVE_MODE_ENABLED}, // epg/info //main menu diff --git a/src/system/settings.h b/src/system/settings.h index 84f3f4bca..cbb7b0c25 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -142,9 +142,11 @@ struct SNeutrinoSettings //user menu P_MAIN_BLUE_BUTTON, - P_MAIN_RED_BUTTON, - - //main menu + P_MAIN_YELLOW_BUTTON, + P_MAIN_GREEN_BUTTON, + P_MAIN_RED_BUTTON, + + //main menu P_MAIN_TV_MODE, P_MAIN_TV_RADIO_MODE, //togglemode P_MAIN_RADIO_MODE,