Add check box control to enable/disable the session exit (feedback)

dialog box.
This resolves bug report 681.
(cherry picked from commit 8a61818a86)
v3.5.13-sru
Darrell Anderson 13 years ago committed by Slávek Banko
parent 1dcd235e7e
commit f9e6898036

@ -92,6 +92,9 @@ void SMServerConfig::load(bool useDefaults )
} }
dialog->excludeLineedit->setText( c->readEntry("excludeApps")); dialog->excludeLineedit->setText( c->readEntry("excludeApps"));
c->setGroup("Logout");
dialog->showLogoutStatusDialog->setChecked(c->readBoolEntry("showLogoutStatusDlg", true));
delete c; delete c;
emit changed(useDefaults); emit changed(useDefaults);
@ -103,6 +106,7 @@ void SMServerConfig::save()
c->setGroup("General"); c->setGroup("General");
c->writeEntry( "confirmLogout", dialog->confirmLogoutCheck->isChecked()); c->writeEntry( "confirmLogout", dialog->confirmLogoutCheck->isChecked());
c->writeEntry( "offerShutdown", dialog->offerShutdownCheck->isChecked()); c->writeEntry( "offerShutdown", dialog->offerShutdownCheck->isChecked());
TQString s = "restorePreviousLogout"; TQString s = "restorePreviousLogout";
if ( dialog->emptySessionRadio->isChecked() ) if ( dialog->emptySessionRadio->isChecked() )
s = "default"; s = "default";
@ -117,6 +121,8 @@ void SMServerConfig::save()
int(KApplication::ShutdownTypeReboot) : int(KApplication::ShutdownTypeReboot) :
int(KApplication::ShutdownTypeNone)); int(KApplication::ShutdownTypeNone));
c->writeEntry("excludeApps", dialog->excludeLineedit->text()); c->writeEntry("excludeApps", dialog->excludeLineedit->text());
c->setGroup("Logout");
c->writeEntry( "showLogoutStatusDlg", dialog->showLogoutStatusDialog->isChecked());
c->sync(); c->sync();
delete c; delete c;

@ -62,6 +62,17 @@
<string>O&amp;ffer shutdown options</string> <string>O&amp;ffer shutdown options</string>
</property> </property>
</widget> </widget>
<widget class="TQCheckBox">
<property name="name">
<cstring>showLogoutStatusDialog</cstring>
</property>
<property name="text">
<string>Show logout stat&amp;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> </vbox>
</widget> </widget>
<widget class="TQButtonGroup"> <widget class="TQButtonGroup">
@ -206,6 +217,12 @@
<receiver>SMServerConfigDlg</receiver> <receiver>SMServerConfigDlg</receiver>
<slot>configChanged()</slot> <slot>configChanged()</slot>
</connection> </connection>
<connection>
<sender>showLogoutStatusDialog</sender>
<signal>toggled(bool)</signal>
<receiver>SMServerConfigDlg</receiver>
<slot>configChanged()</slot>
</connection>
<connection> <connection>
<sender>loginGroup</sender> <sender>loginGroup</sender>
<signal>clicked(int)</signal> <signal>clicked(int)</signal>

@ -160,10 +160,10 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
if (sdmode == KApplication::ShutdownModeDefault) if (sdmode == KApplication::ShutdownModeDefault)
sdmode = KApplication::ShutdownModeInteractive; sdmode = KApplication::ShutdownModeInteractive;
// shall we show a nice fancy logout screen? // shall we show a logout status dialog box?
bool showFancyLogout = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showFancyLogout", true); bool showLogoutStatusDlg = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showLogoutStatusDlg", true);
if (showFancyLogout) { if (showLogoutStatusDlg) {
KSMShutdownIPFeedback::start(); KSMShutdownIPFeedback::start();
} }
@ -204,7 +204,7 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
// Set the real desktop background to black so that exit looks // Set the real desktop background to black so that exit looks
// clean regardless of what was on "our" desktop. // clean regardless of what was on "our" desktop.
if (!showFancyLogout) { if (!showLogoutStatusDlg) {
TQT_TQWIDGET(kapp->desktop())->setBackgroundColor( Qt::black ); TQT_TQWIDGET(kapp->desktop())->setBackgroundColor( Qt::black );
} }
state = Shutdown; state = Shutdown;
@ -244,7 +244,7 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
completeShutdownOrCheckpoint(); completeShutdownOrCheckpoint();
} }
else { else {
if (showFancyLogout) { if (showLogoutStatusDlg) {
KSMShutdownIPFeedback::stop(); KSMShutdownIPFeedback::stop();
} }
} }
@ -494,8 +494,8 @@ void KSMServer::completeShutdownOrCheckpoint()
if ( waitForPhase2 ) if ( waitForPhase2 )
return; return;
bool showFancyLogout = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showFancyLogout", true); bool showLogoutStatusDlg = KConfigGroup(KGlobal::config(), "Logout").readBoolEntry("showLogoutStatusDlg", true);
if (showFancyLogout && state != Checkpoint) { if (showLogoutStatusDlg && state != Checkpoint) {
KSMShutdownIPFeedback::showit(); // hide the UGLY logout process from the user KSMShutdownIPFeedback::showit(); // hide the UGLY logout process from the user
shutdownNotifierIPDlg = KSMShutdownIPDlg::showShutdownIP(); shutdownNotifierIPDlg = KSMShutdownIPDlg::showShutdownIP();
while (!KSMShutdownIPFeedback::ispainted()) { while (!KSMShutdownIPFeedback::ispainted()) {

Loading…
Cancel
Save