diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index 5df2aac8f..adcb33ca4 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include "gui/movieplayer.h" #include "gui/pictureviewer.h" @@ -48,7 +49,8 @@ #include #include - +#include +extern cVideo * videoDecoder; CMediaPlayerMenu::CMediaPlayerMenu() { @@ -101,6 +103,28 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey) return menu_return::RETURN_REPAINT; } + else if (actionKey == "movieplayer") + { +#if 0 //Is it really necessary to lock here? Moviebrowser got its own configurable parental lock. + bool show = true; + if ((g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_ONSIGNAL) || (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED)) { + CZapProtection zapProtection( g_settings.parentallock_pincode, 0x100 ); + show = zapProtection.check(); + } + + if(show){ +#endif + int mode = CNeutrinoApp::getInstance()->getMode(); + if( mode == NeutrinoMessages::mode_radio ) + videoDecoder->StopPicture(); + CMoviePlayerGui::getInstance().exec(NULL, "tsmoviebrowser"); + if( mode == NeutrinoMessages::mode_radio ) + videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg"); +#if 0 + } +#endif + return menu_return::RETURN_REPAINT;; + } int res = initMenuMedia(); @@ -216,9 +240,8 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) //show movieplayer submenu with selectable items for moviebrowser or filebrowser void CMediaPlayerMenu::showMoviePlayer(CMenuWidget *moviePlayer, CPersonalizeGui *p) { - CMoviePlayerGui *movieplayer_gui = &CMoviePlayerGui::getInstance(); - CMenuForwarder *fw_mbrowser = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, movieplayer_gui, "tsmoviebrowser", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); - CMenuForwarder *fw_file = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, movieplayer_gui, "fileplayback", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); + CMenuForwarder *fw_mbrowser = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, this, "movieplayer", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + CMenuForwarder *fw_file = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, &CMoviePlayerGui::getInstance(), "fileplayback", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); p->addIntroItems(moviePlayer); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index d986f00d5..f9fa0b1b4 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2131,21 +2131,8 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) media->exec(NULL, ""); } else if( msg == CRCInput::RC_video || msg == CRCInput::RC_play ) { - bool show = true; - if ((g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_ONSIGNAL) || (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED)) { - CZapProtection* zapProtection = new CZapProtection( g_settings.parentallock_pincode, 0x100 ); - show = zapProtection->check(); - delete zapProtection; - } - if(show) { - //StopSubtitles(); - if( mode == mode_radio ) - videoDecoder->StopPicture(); - CMoviePlayerGui::getInstance().exec(NULL, "tsmoviebrowser"); - if( mode == mode_radio ) - videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg"); - //StartSubtitles(); - } + //open moviebrowser via media player menu object + CMediaPlayerMenu::getInstance()->exec(NULL,"movieplayer"); } else if (CRCInput::isNumeric(msg) && g_RemoteControl->director_mode ) { g_RemoteControl->setSubChannel(CRCInput::getNumericValue(msg));