diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-06-08 21:02:38 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-06-08 21:02:38 -0500 |
commit | 8a61818a86d7d7f6b6332790d80b50a8b3a73146 (patch) | |
tree | 8f6a474c1f659a5cd2435744bd02b4ecea5b54c4 | |
parent | 5b597230f0b8f2aed44816ffc3ef5d6f01ef44c5 (diff) | |
download | tdebase-8a61818a86d7d7f6b6332790d80b50a8b3a73146.tar.gz tdebase-8a61818a86d7d7f6b6332790d80b50a8b3a73146.zip |
Add check box control to enable/disable the session exit (feedback)
dialog box.
This resolves bug report 681.
-rw-r--r-- | kcontrol/smserver/kcmsmserver.cpp | 6 | ||||
-rw-r--r-- | kcontrol/smserver/smserverconfigdlg.ui | 17 | ||||
-rw-r--r-- | ksmserver/shutdown.cpp | 14 |
3 files changed, 30 insertions, 7 deletions
diff --git a/kcontrol/smserver/kcmsmserver.cpp b/kcontrol/smserver/kcmsmserver.cpp index e1d22cf51..5ea993964 100644 --- a/kcontrol/smserver/kcmsmserver.cpp +++ b/kcontrol/smserver/kcmsmserver.cpp @@ -92,6 +92,9 @@ void SMServerConfig::load(bool useDefaults ) } dialog->excludeLineedit->setText( c->readEntry("excludeApps")); + c->setGroup("Logout"); + dialog->showLogoutStatusDialog->setChecked(c->readBoolEntry("showLogoutStatusDlg", true)); + delete c; emit changed(useDefaults); @@ -103,6 +106,7 @@ void SMServerConfig::save() c->setGroup("General"); c->writeEntry( "confirmLogout", dialog->confirmLogoutCheck->isChecked()); c->writeEntry( "offerShutdown", dialog->offerShutdownCheck->isChecked()); + TQString s = "restorePreviousLogout"; if ( dialog->emptySessionRadio->isChecked() ) s = "default"; @@ -117,6 +121,8 @@ void SMServerConfig::save() int(KApplication::ShutdownTypeReboot) : int(KApplication::ShutdownTypeNone)); c->writeEntry("excludeApps", dialog->excludeLineedit->text()); + c->setGroup("Logout"); + c->writeEntry( "showLogoutStatusDlg", dialog->showLogoutStatusDialog->isChecked()); c->sync(); delete c; diff --git a/kcontrol/smserver/smserverconfigdlg.ui b/kcontrol/smserver/smserverconfigdlg.ui index 079fb8908..8ab9801cf 100644 --- a/kcontrol/smserver/smserverconfigdlg.ui +++ b/kcontrol/smserver/smserverconfigdlg.ui @@ -62,6 +62,17 @@ <string>O&ffer shutdown options</string> </property> </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>showLogoutStatusDialog</cstring> + </property> + <property name="text"> + <string>Show logout stat&us dialog</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Check this option if you want to see a dialog box showing the logout status.</string> + </property> + </widget> </vbox> </widget> <widget class="TQButtonGroup"> @@ -207,6 +218,12 @@ <slot>configChanged()</slot> </connection> <connection> + <sender>showLogoutStatusDialog</sender> + <signal>toggled(bool)</signal> + <receiver>SMServerConfigDlg</receiver> + <slot>configChanged()</slot> + </connection> + <connection> <sender>loginGroup</sender> <signal>clicked(int)</signal> <receiver>SMServerConfigDlg</receiver> diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index 2ba3df92a..fc55c5d7a 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -167,10 +167,10 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm, if (sdmode == KApplication::ShutdownModeDefault) sdmode = KApplication::ShutdownModeInteractive; - // shall we show a nice fancy logout screen? - bool showFancyLogout = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showFancyLogout", true); + // shall we show a logout status dialog box? + bool showLogoutStatusDlg = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showLogoutStatusDlg", true); - if (showFancyLogout) { + if (showLogoutStatusDlg) { KSMShutdownIPFeedback::start(); } @@ -235,7 +235,7 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm, // Set the real desktop background to black so that exit looks // clean regardless of what was on "our" desktop. - if (!showFancyLogout) { + if (!showLogoutStatusDlg) { TQT_TQWIDGET(kapp->desktop())->setBackgroundColor( Qt::black ); } state = Shutdown; @@ -275,7 +275,7 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm, completeShutdownOrCheckpoint(); } else { - if (showFancyLogout) { + if (showLogoutStatusDlg) { KSMShutdownIPFeedback::stop(); } } @@ -525,8 +525,8 @@ void KSMServer::completeShutdownOrCheckpoint() if ( waitForPhase2 ) return; - bool showFancyLogout = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showFancyLogout", true); - if (showFancyLogout && state != Checkpoint) { + bool showLogoutStatusDlg = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showLogoutStatusDlg", true); + if (showLogoutStatusDlg && state != Checkpoint) { KSMShutdownIPFeedback::showit(); // hide the UGLY logout process from the user shutdownNotifierIPDlg = KSMShutdownIPDlg::showShutdownIP(); while (!KSMShutdownIPFeedback::ispainted()) { |