mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
neutrino media player menu: call moviebrowser from media player object
We had 2 ways to open the moviebrowser and one was with parental lock, the
other without.
btw: Is it really necessary to lock here?
Moviebrowser got its own configurable parental lock.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2064 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: f7bf5932a9
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-01-17 (Tue, 17 Jan 2012)
Origin message was:
------------------
*neutrino media player menu: call moviebrowser from media player object
We had 2 ways to open the moviebrowser and one was with parental lock, the
other without.
btw: Is it really necessary to lock here?
Moviebrowser got its own configurable parental lock.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2064 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <neutrino_menue.h>
|
||||
#include <neutrinoMessages.h>
|
||||
|
||||
#include "gui/movieplayer.h"
|
||||
#include "gui/pictureviewer.h"
|
||||
@@ -48,7 +49,8 @@
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <system/debug.h>
|
||||
|
||||
#include <video.h>
|
||||
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);
|
||||
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user