*neutrino: partial revert of r1985, but without clock

User request: implementation of timerlist needs personalisation
see also: http://www.dbox2world.net/board293-coolstream-hd1/board314-coolstream-development/p137661-dikussion-neues-hauptmen%C3%BC-mit-timerliste/#post137661

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1995 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
thilo
2011-12-23 22:04:40 +00:00
parent a7558578c8
commit 9141258e3a
3 changed files with 32 additions and 13 deletions

View File

@@ -3555,14 +3555,21 @@ void CNeutrinoApp::radioMode( bool rezap)
}
}
//switching from current mode to next mode between tv or radio
void CNeutrinoApp::switchTvRadioMode()
//switching from current mode to tv or radio mode or to optional parameter prev_mode
void CNeutrinoApp::switchTvRadioMode(const int prev_mode)
{
if (prev_mode != mode_unknown){
if (prev_mode == mode_tv && mode != mode_tv )
tvMode();
else if(prev_mode == mode_radio && mode != mode_radio)
radioMode();
}else {
if (mode == mode_radio )
tvMode();
else if(mode == mode_tv)
radioMode();
}
}
//switching clock on or off depends of current displayed or not
void CNeutrinoApp::switchClockOnOff()
@@ -3605,9 +3612,19 @@ 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
// else if (actionKey=="tv_radio_switch")//used in mainmenu
// {
// switchTvRadioMode();
// returnval = menu_return::RETURN_EXIT_ALL;
// }
else if (actionKey=="tv")//used in mainmenu
{
switchTvRadioMode();
switchTvRadioMode(mode_tv);
returnval = menu_return::RETURN_EXIT_ALL;
}
else if (actionKey=="radio")//used in mainmenu
{
switchTvRadioMode(mode_radio);
returnval = menu_return::RETURN_EXIT_ALL;
}
else if(actionKey=="scart") {

View File

@@ -206,7 +206,7 @@ public:
int getLastMode() {
return lastMode;
}
void switchTvRadioMode();
void switchTvRadioMode(const int prev_mode = mode_unknown);
void switchClockOnOff();
bool isMuted() {

View File

@@ -101,14 +101,16 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings
dprintf(DEBUG_DEBUG, "init mainmenue\n");
mainMenu.addItem(GenericMenuSeparator);
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv_radio_switch", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), true);
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), true);
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
//games
if (g_PluginList->hasPlugin(CPlugins::P_TYPE_GAME))
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_GAMES, true, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME), "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_GAMES, true, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME), "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
//timer
mainMenu.addItem(new CMenuForwarder(LOCALE_TIMERLIST_NAME, true, NULL, new CTimerList(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
// //TODO: timer
// mainMenu.addItem(new CMenuForwarder(LOCALE_TIMERLIST_NAME, true, NULL, new CTimerList(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
//multimedia menu
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MEDIA, true, NULL, CMediaPlayerMenu::getInstance(), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));