diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index f4063ab46..02aad2a17 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -649,6 +649,7 @@ mainmenu.settings Einstellungen mainmenu.shutdown Ausschalten mainmenu.sleeptimer SleepTimer mainmenu.tvmode TV-Modus +mainmenu.tvradio_switch TV-Radio Umschaltung mainsettings.audio Audio mainsettings.head Einstellungen mainsettings.keybinding Tasten diff --git a/data/locale/english.locale b/data/locale/english.locale index ebe88132d..a493dd164 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -649,6 +649,7 @@ mainmenu.settings Settings mainmenu.shutdown Shutdown mainmenu.sleeptimer SleepTimer mainmenu.tvmode TV-Mode +mainmenu.tvradio_switch TV-Radio Switch mainsettings.audio Audio mainsettings.head Settings mainsettings.keybinding Key Setup diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b51f9d24c..5be2cbca5 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3521,11 +3521,11 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) switchClockOnOff(); returnval = menu_return::RETURN_EXIT_ALL; } -// else if (actionKey=="tv_radio_switch")//used in mainmenu -// { -// switchTvRadioMode(); -// returnval = menu_return::RETURN_EXIT_ALL; -// } + else if (actionKey=="tv_radio_switch")//used in mainmenu + { + switchTvRadioMode(); + returnval = menu_return::RETURN_EXIT_ALL; + } else if (actionKey=="tv")//used in mainmenu { switchTvRadioMode(mode_tv); diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 3b594b9a3..d759af64c 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -150,6 +150,10 @@ void CNeutrinoApp::InitMenuMain() CMenuItem *radioswitch = new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE]); + //tv <-> radio toggle + CMenuItem *tvradio_switch = new CMenuForwarder(LOCALE_MAINMENU_TVRADIO_SWITCH, true, NULL, this, "tv_radio_switch", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE]); + //timer CMenuItem *timerlist = new CMenuForwarder(LOCALE_TIMERLIST_NAME, true, NULL, new CTimerList(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW); personalize.addItem(MENU_MAIN, timerlist, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TIMER]); diff --git a/src/system/locals.h b/src/system/locals.h index 82d6abaf0..69227f7b4 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -676,6 +676,7 @@ typedef enum LOCALE_MAINMENU_SHUTDOWN, LOCALE_MAINMENU_SLEEPTIMER, LOCALE_MAINMENU_TVMODE, + LOCALE_MAINMENU_TVRADIO_SWITCH, LOCALE_MAINSETTINGS_AUDIO, LOCALE_MAINSETTINGS_HEAD, LOCALE_MAINSETTINGS_KEYBINDING, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 89b23513a..4c1fc34ce 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -676,6 +676,7 @@ const char * locale_real_names[] = "mainmenu.shutdown", "mainmenu.sleeptimer", "mainmenu.tvmode", + "mainmenu.tvradio_switch", "mainsettings.audio", "mainsettings.head", "mainsettings.keybinding", diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 56b904006..b8ba83218 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -39,6 +39,7 @@ const struct personalize_settings_t personalize_settings[SNeutrinoSettings::P_SE //main menu {"personalize_tv_mode" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, + {"personalize_tv_radio_mode" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE}, //toggle {"personalize_radio_mode" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, {"personalize_timer" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, {"personalize_media" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, diff --git a/src/system/settings.h b/src/system/settings.h index 56a698e21..0cdab057b 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -138,6 +138,7 @@ struct SNeutrinoSettings //main menu P_MAIN_TV_MODE, + P_MAIN_TV_RADIO_MODE, //togglemode P_MAIN_RADIO_MODE, P_MAIN_TIMER, P_MAIN_MEDIA,