Add GUI check box for tdmrc[X-:*-Core] TerminateServer setting located at

KControl->System Administration->Login Manager->Shutdown->Restart X-server with session exit.
pull/2/head
Darrell Anderson 11 years ago
parent 33b2e52215
commit 882522b23a

@ -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");

@ -56,6 +56,7 @@ private:
TQLabel *sdllabel, *sdrlabel;
KURLRequester *restart_lined, *shutdown_lined;
KBackedComboBox *bm_combo;
TQCheckBox *tsbox;
};

Loading…
Cancel
Save