From f8558cb3c426b813e506afccce8154412673394c Mon Sep 17 00:00:00 2001 From: Francois Andriot Date: Sun, 16 Mar 2014 18:53:12 +0100 Subject: [PATCH] Use the "confirm logout" option in KSMServer::logoutTimed --- ksmserver/shutdown.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index 537790407..0dda6598c 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -338,9 +338,10 @@ void KSMServer::shutdown( TDEApplication::ShutdownConfirm confirm, void KSMServer::logoutTimed( int sdtype, int sdmode, TQString bootOption ) { - int confirmDelay; + int confirmDelay = 0; TDEConfig* config = TDEGlobal::config(); + config->reparseConfiguration(); // config may have changed in the KControl module config->setGroup( "General" ); if ( sdtype == TDEApplication::ShutdownTypeHalt ) { @@ -350,14 +351,20 @@ void KSMServer::logoutTimed( int sdtype, int sdmode, TQString bootOption ) confirmDelay = config->readNumEntry( "confirmRebootDelay", 31 ); } else { - confirmDelay = config->readNumEntry( "confirmLogoutDelay", 31 ); + if(config->readBoolEntry("confirmLogout", true)) { + confirmDelay = config->readNumEntry( "confirmLogoutDelay", 31 ); + } } bool result = true; - if (confirmDelay) { - KSMShutdownFeedback::start(); // make the screen gray + if (confirmDelay > 0) { + if(config->readBoolEntry("doFancyLogout", true)) { + KSMShutdownFeedback::start(); // make the screen gray + } result = KSMDelayedMessageBox::showTicker( (TDEApplication::ShutdownType)sdtype, bootOption, confirmDelay ); - KSMShutdownFeedback::stop(); // make the screen become normal again + if(config->readBoolEntry("doFancyLogout", true)) { + KSMShutdownFeedback::stop(); // make the screen become normal again + } } if ( result )