neutrino.cpp: make sleeptimer similar to shutdown with MsgBox at announce

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5002a8bfa7
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-10-18 (Thu, 18 Oct 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-10-18 20:21:19 +02:00
parent 3e28f86c85
commit dfdebd67ea
2 changed files with 9 additions and 16 deletions

View File

@@ -227,6 +227,7 @@ CNeutrinoApp::CNeutrinoApp()
TVchannelList = NULL; TVchannelList = NULL;
RADIOchannelList = NULL; RADIOchannelList = NULL;
skipShutdownTimer = false; skipShutdownTimer = false;
skipSleepnTimer = false;
current_muted = 0; current_muted = 0;
recordingstatus = 0; recordingstatus = 0;
g_channel_list_changed = 0; g_channel_list_changed = 0;
@@ -2724,28 +2725,19 @@ _repeat:
return messages_return::handled; return messages_return::handled;
} }
else if( msg == NeutrinoMessages::ANNOUNCE_SLEEPTIMER) { else if( msg == NeutrinoMessages::ANNOUNCE_SLEEPTIMER) {
if( mode != mode_scart ) if( mode != mode_scart && mode != mode_standby)
ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_SLEEPTIMERBOX_ANNOUNCE)); skipSleepnTimer = (ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_SLEEPTIMERBOX_ANNOUNCE,CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, true) == CMessageBox::mbrYes);
return messages_return::handled; return messages_return::handled;
} }
else if( msg == NeutrinoMessages::SLEEPTIMER) { else if( msg == NeutrinoMessages::SLEEPTIMER) {
if(data) { if(skipSleepnTimer) {
skipShutdownTimer =
(ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_SHUTDOWNTIMER_ANNOUNCE,
CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, true) == CMessageBox::mbrYes);//FIXME
if(skipShutdownTimer) {
printf("NeutrinoMessages::SLEEPTIMER: skiping\n"); printf("NeutrinoMessages::SLEEPTIMER: skiping\n");
skipShutdownTimer = false; skipSleepnTimer = false;
return messages_return::handled; return messages_return::handled;
} }
else {
printf("NeutrinoMessages::SLEEPTIMER: shutdown\n");
ExitRun(true, (cs_get_revision() > 7));
}
}
if(g_settings.shutdown_real) if(g_settings.shutdown_real)
ExitRun(true, (cs_get_revision() > 7)); ExitRun(true, (cs_get_revision() > 7));
else else if(mode != mode_standby)
standbyMode( true ); standbyMode( true );
return messages_return::handled; return messages_return::handled;
} }

View File

@@ -118,6 +118,7 @@ private:
int current_muted; int current_muted;
bool skipShutdownTimer; bool skipShutdownTimer;
bool skipSleepnTimer;
bool pbBlinkChange; bool pbBlinkChange;
int tvsort[LIST_MODE_LAST]; int tvsort[LIST_MODE_LAST];