summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-03-02 21:13:34 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2013-03-02 21:13:34 -0600
commit882522b23ab809294c32b0ea4da628c80100c3da (patch)
tree31c48adeb70407dcf77c62288bbdcae34480dfb8 /kcontrol
parent33b2e52215d0733158fb32153c7d3b3ff2fa18d2 (diff)
downloadtdebase-882522b23ab809294c32b0ea4da628c80100c3da.tar.gz
tdebase-882522b23ab809294c32b0ea4da628c80100c3da.zip
Add GUI check box for tdmrc[X-:*-Core] TerminateServer setting located at
KControl->System Administration->Login Manager->Shutdown->Restart X-server with session exit.
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/tdm/tdm-shut.cpp11
-rw-r--r--kcontrol/tdm/tdm-shut.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/kcontrol/tdm/tdm-shut.cpp b/kcontrol/tdm/tdm-shut.cpp
index 80f96e134..2d8a565bc 100644
--- a/kcontrol/tdm/tdm-shut.cpp
+++ b/kcontrol/tdm/tdm-shut.cpp
@@ -45,7 +45,6 @@ TDMSessionsWidget::TDMSessionsWidget(TQWidget *parent, const char *name)
{
TQString wtstr;
-
TQGroupBox *group0 = new TQGroupBox( i18n("Allow Shutdown"), this );
sdlcombo = new TQComboBox( FALSE, group0 );
@@ -101,6 +100,11 @@ TDMSessionsWidget::TDMSessionsWidget(TQWidget *parent, const char *name)
TQWhatsThis::add( bm_label, wtstr );
TQWhatsThis::add( bm_combo, wtstr );
+ tsbox = new TQCheckBox( i18n("Restart X-Server with session exit"), this );
+ connect( tsbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()) );
+ wtstr = i18n("Whether the login manager should restart the local X-Server after a session exit instead of resetting. Use this when the X-Server leaks memory, crashes the system on reset attempts, or otherwise exhibits display issues.");
+ TQWhatsThis::add( tsbox, wtstr );
+
TQBoxLayout *main = new TQVBoxLayout( this, 10 );
TQGridLayout *lgroup0 = new TQGridLayout( group0, 1, 1, 10);
TQGridLayout *lgroup1 = new TQGridLayout( group1, 1, 1, 10);
@@ -109,6 +113,7 @@ TDMSessionsWidget::TDMSessionsWidget(TQWidget *parent, const char *name)
main->addWidget(group0);
main->addWidget(group1);
main->addWidget(group4);
+ main->addWidget(tsbox);
main->addStretch();
lgroup0->addRowSpacing(0, group0->fontMetrics().height()/2);
@@ -149,6 +154,7 @@ void TDMSessionsWidget::makeReadOnly()
shutdown_lined->button()->setEnabled(false);
bm_combo->setEnabled(false);
+ tsbox->setEnabled(false);
}
void TDMSessionsWidget::writeSD(TQComboBox *combo)
@@ -166,6 +172,7 @@ void TDMSessionsWidget::save()
{
config->setGroup("X-:*-Core");
writeSD(sdlcombo);
+ config->writeEntry( "TerminateServer", tsbox->isChecked() );
config->setGroup("X-*-Core");
writeSD(sdrcombo);
@@ -194,6 +201,8 @@ void TDMSessionsWidget::load()
{
config->setGroup("X-:*-Core");
readSD(sdlcombo, "All");
+ tsbox->setChecked(config->readBoolEntry("TerminateServer", false));
+
config->setGroup("X-*-Core");
readSD(sdrcombo, "Root");
diff --git a/kcontrol/tdm/tdm-shut.h b/kcontrol/tdm/tdm-shut.h
index bbc6fdc29..a8d22adc2 100644
--- a/kcontrol/tdm/tdm-shut.h
+++ b/kcontrol/tdm/tdm-shut.h
@@ -56,6 +56,7 @@ private:
TQLabel *sdllabel, *sdrlabel;
KURLRequester *restart_lined, *shutdown_lined;
KBackedComboBox *bm_combo;
+ TQCheckBox *tsbox;
};