- movieplayer: enable neutrino main menu ...

... parts of this code is (C) martii
This commit is contained in:
svenhoefer
2015-12-01 21:02:15 +01:00
parent 423b1e0bc7
commit 829359b851
4 changed files with 43 additions and 26 deletions

View File

@@ -983,6 +983,8 @@ void CMoviePlayerGui::PlayFileLoop(void)
repeat_mode = REPEAT_OFF; repeat_mode = REPEAT_OFF;
g_settings.movieplayer_repeat_on = repeat_mode; g_settings.movieplayer_repeat_on = repeat_mode;
callInfoViewer(); callInfoViewer();
} else if (msg == (neutrino_msg_t) CRCInput::RC_setup) {
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::SHOW_MAINMENU, 0);
} else if (msg == (neutrino_msg_t) g_settings.mpkey_play) { } else if (msg == (neutrino_msg_t) g_settings.mpkey_play) {
if (time_forced) { if (time_forced) {
time_forced = false; time_forced = false;

View File

@@ -2152,6 +2152,35 @@ void CNeutrinoApp::showInfo()
StartSubtitles(); StartSubtitles();
} }
void CNeutrinoApp::showMainMenu()
{
StopSubtitles();
InfoClock->enableInfoClock(false);
int old_ttx = g_settings.cacheTXT;
int old_epg = g_settings.epg_scan;
int old_mode = g_settings.epg_scan_mode;
int old_save_mode = g_settings.epg_save_mode;
mainMenu->exec(NULL, "");
InfoClock->enableInfoClock(true);
StartSubtitles();
saveSetup(NEUTRINO_SETTINGS_FILE);
if (old_save_mode != g_settings.epg_save_mode)
CEpgScan::getInstance()->ConfigureEIT();
if (old_epg != g_settings.epg_scan || old_mode != g_settings.epg_scan_mode) {
if (g_settings.epg_scan_mode != CEpgScan::MODE_OFF)
CEpgScan::getInstance()->Start();
else
CEpgScan::getInstance()->Clear();
}
if (old_ttx != g_settings.cacheTXT) {
if(g_settings.cacheTXT) {
tuxtxt_init();
} else
tuxtxt_close();
}
}
void CNeutrinoApp::screensaver(bool on) void CNeutrinoApp::screensaver(bool on)
{ {
if (on) if (on)
@@ -2167,8 +2196,10 @@ void CNeutrinoApp::screensaver(bool on)
} }
} }
void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) void CNeutrinoApp::RealRun(CMenuWidget &_mainMenu)
{ {
mainMenu = &_mainMenu;
neutrino_msg_t msg; neutrino_msg_t msg;
neutrino_msg_data_t data; neutrino_msg_data_t data;
@@ -2251,31 +2282,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
/* the only hardcoded key to check before key bindings */ /* the only hardcoded key to check before key bindings */
else if( msg == CRCInput::RC_setup ) { else if( msg == CRCInput::RC_setup ) {
if(!g_settings.minimode) { if(!g_settings.minimode) {
StopSubtitles(); showMainMenu();
InfoClock->enableInfoClock(false);
int old_ttx = g_settings.cacheTXT;
int old_epg = g_settings.epg_scan;
int old_mode = g_settings.epg_scan_mode;
int old_save_mode = g_settings.epg_save_mode;
mainMenu.exec(NULL, "");
InfoClock->enableInfoClock(true);
StartSubtitles();
saveSetup(NEUTRINO_SETTINGS_FILE);
if (old_save_mode != g_settings.epg_save_mode)
CEpgScan::getInstance()->ConfigureEIT();
if (old_epg != g_settings.epg_scan || old_mode != g_settings.epg_scan_mode) {
if (g_settings.epg_scan_mode != CEpgScan::MODE_OFF)
CEpgScan::getInstance()->Start();
else
CEpgScan::getInstance()->Clear();
}
if (old_ttx != g_settings.cacheTXT) {
if(g_settings.cacheTXT) {
tuxtxt_init();
} else
tuxtxt_close();
}
} }
} }
else if( ( msg == (neutrino_msg_t) g_settings.key_quickzap_up ) || ( msg == (neutrino_msg_t) g_settings.key_quickzap_down ) ) else if( ( msg == (neutrino_msg_t) g_settings.key_quickzap_up ) || ( msg == (neutrino_msg_t) g_settings.key_quickzap_down ) )
@@ -2741,6 +2748,11 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
return messages_return::handled; return messages_return::handled;
} }
} }
if (msg == NeutrinoMessages::SHOW_MAINMENU) {
showMainMenu();
return messages_return::handled;
}
res = res | g_RemoteControl->handleMsg(msg, data); res = res | g_RemoteControl->handleMsg(msg, data);
res = res | g_InfoViewer->handleMsg(msg, data); res = res | g_InfoViewer->handleMsg(msg, data);

View File

@@ -73,6 +73,7 @@ public:
private: private:
CFrameBuffer * frameBuffer; CFrameBuffer * frameBuffer;
CMenuWidget *mainMenu;
CConfigFile configfile; CConfigFile configfile;
CScanSettings scanSettings; CScanSettings scanSettings;
CPersonalizeGui personalize; CPersonalizeGui personalize;
@@ -214,6 +215,7 @@ public:
bool StartPip(const t_channel_id channel_id); bool StartPip(const t_channel_id channel_id);
void SelectSubtitles(); void SelectSubtitles();
void showInfo(void); void showInfo(void);
void showMainMenu(void);
CConfigFile* getConfigFile() {return &configfile;}; CConfigFile* getConfigFile() {return &configfile;};
bool SDTreloadChannels; bool SDTreloadChannels;

View File

@@ -73,6 +73,7 @@ struct NeutrinoMessages {
UNLOCK_RC = CRCInput::RC_Messages + 20, UNLOCK_RC = CRCInput::RC_Messages + 20,
REBOOT = CRCInput::RC_Messages + 21, REBOOT = CRCInput::RC_Messages + 21,
RELOAD_SETUP = CRCInput::RC_Messages + 22, RELOAD_SETUP = CRCInput::RC_Messages + 22,
SHOW_MAINMENU = CRCInput::RC_Messages + 23,
EVT_VOLCHANGED = CRCInput::RC_Events + 1, EVT_VOLCHANGED = CRCInput::RC_Events + 1,
EVT_MUTECHANGED = CRCInput::RC_Events + 2, EVT_MUTECHANGED = CRCInput::RC_Events + 2,