gui/mediaplayer.cpp: return result from audio/movie players,

thanks satbaby for patch
This commit is contained in:
[CST] Focus
2012-11-16 15:52:02 +04:00
parent 6d7f1efd06
commit a4df1e2939

View File

@@ -91,39 +91,27 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
{ {
if (audioPlayer == NULL) if (audioPlayer == NULL)
audioPlayer = new CAudioPlayerGui(); audioPlayer = new CAudioPlayerGui();
audioPlayer->exec(NULL, "init"); int res = audioPlayer->exec(NULL, "init");
return menu_return::RETURN_REPAINT; return res /*menu_return::RETURN_REPAINT*/;
} }
else if (actionKey == "inetplayer") else if (actionKey == "inetplayer")
{ {
if (inetPlayer == NULL) if (inetPlayer == NULL)
inetPlayer = new CAudioPlayerGui(true); inetPlayer = new CAudioPlayerGui(true);
inetPlayer->exec(NULL, "init"); int res = inetPlayer->exec(NULL, "init");
return menu_return::RETURN_REPAINT; return res; //menu_return::RETURN_REPAINT;
} }
else if (actionKey == "movieplayer") else if (actionKey == "movieplayer")
{ {
#if 0 //Is it really necessary to lock here? Moviebrowser got its own configurable parental lock. int mode = CNeutrinoApp::getInstance()->getMode();
bool show = true; if( mode == NeutrinoMessages::mode_radio )
if ((g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_ONSIGNAL) || (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED)) { videoDecoder->StopPicture();
CZapProtection zapProtection( g_settings.parentallock_pincode, 0x100 ); int res = CMoviePlayerGui::getInstance().exec(NULL, "tsmoviebrowser");
show = zapProtection.check(); if( mode == NeutrinoMessages::mode_radio )
} videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg");
return res;
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(); int res = initMenuMedia();
@@ -236,7 +224,6 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p)
setUsageMode();//set default usage_mode setUsageMode();//set default usage_mode
} }
return res; return res;
} }