diff options
author | Francois Andriot <[email protected]> | 2014-03-16 18:53:12 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2014-03-16 19:01:45 +0100 |
commit | f8558cb3c426b813e506afccce8154412673394c (patch) | |
tree | 843c710392c628c7e0c12249be7ad1872c1cc1f8 /ksmserver | |
parent | 81d9dc49395fd67b87876499ee45174d732cc85a (diff) | |
download | tdebase-f8558cb3c426b813e506afccce8154412673394c.tar.gz tdebase-f8558cb3c426b813e506afccce8154412673394c.zip |
Use the "confirm logout" option in KSMServer::logoutTimed
Diffstat (limited to 'ksmserver')
-rw-r--r-- | ksmserver/shutdown.cpp | 17 |
1 files 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 ) |