From 282560875b5b5525d8aac9c31c33e29379bdedf5 Mon Sep 17 00:00:00 2001 From: satbaby Date: Fri, 9 Nov 2012 14:50:55 +0100 Subject: [PATCH] src/neutrino.cpp:-add ask MESSAGEBOX for INACTIVITY SLEEPTIMER --- src/neutrino.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index c740fa2e5..760a5c07e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2658,10 +2658,21 @@ _repeat: return messages_return::handled; } else if( msg == NeutrinoMessages::SLEEPTIMER) { - if(skipSleepTimer) { - printf("NeutrinoMessages::SLEEPTIMER: skiping\n"); - skipSleepTimer = false; - return messages_return::handled; + if(data) {//INACTIVITY SLEEPTIMER + 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::INACTIVITY SLEEPTIMER: skiping\n"); + skipShutdownTimer = false; + return messages_return::handled; + } + }else{ //MAIN-MENU SLEEPTIMER + if(skipSleepTimer) { + printf("NeutrinoMessages::SLEEPTIMER: skiping\n"); + skipSleepTimer = false; + return messages_return::handled; + } } if(g_settings.shutdown_real) ExitRun(true, (cs_get_revision() > 7));