summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-03-02 21:48:40 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2013-03-02 21:48:40 -0600
commit7bd9856f9552e2a705b48365395394fe26a16147 (patch)
tree6572a5c71fc92b0511a86f9037f5040a1f144df5 /kcontrol
parentde495952421bf4846fe0e723ed8ef657d1d8beeb (diff)
downloadtdebase-7bd9856f9552e2a705b48365395394fe26a16147.tar.gz
tdebase-7bd9856f9552e2a705b48365395394fe26a16147.zip
Provide GUI check box control for tdmrc AllowRootLogin.
This resolves bug report 1296.
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/tdm/tdm-conv.cpp9
-rw-r--r--kcontrol/tdm/tdm-conv.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/kcontrol/tdm/tdm-conv.cpp b/kcontrol/tdm/tdm-conv.cpp
index 06a1b0443..487e8adbb 100644
--- a/kcontrol/tdm/tdm-conv.cpp
+++ b/kcontrol/tdm/tdm-conv.cpp
@@ -154,6 +154,11 @@ TDMConvenienceWidget::TDMConvenienceWidget(TQWidget *parent, const char *name)
" circumventing a password-secured screen lock possible.") );
connect(cbarlen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
+ allowRootLogin = new TQCheckBox(i18n("Allow &Root Login"), btGroup);
+ TQWhatsThis::add( allowRootLogin, i18n("When set this allows root logins directly in TDM. "
+ "This is discouraged by some people. Use with caution.") );
+ connect(allowRootLogin, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
+
TQGridLayout *main = new TQGridLayout(this, 5, 2, 10);
main->addWidget(paranoia, 0, 0);
main->addWidget(alGroup, 1, 0);
@@ -183,6 +188,7 @@ void TDMConvenienceWidget::makeReadOnly()
((TQWidget*)npGroup->child("qt_groupbox_checkbox"))->setEnabled(false);
npuserlv->setEnabled(false);
cbarlen->setEnabled(false);
+ allowRootLogin->setEnabled(false);
npRadio->setEnabled(false);
ppRadio->setEnabled(false);
spRadio->setEnabled(false);
@@ -213,6 +219,7 @@ void TDMConvenienceWidget::save()
config->setGroup("X-*-Core");
config->writeEntry( "AutoReLogin", cbarlen->isChecked() );
+ config->writeEntry( "AllowRootLogin", allowRootLogin->isChecked() );
config->setGroup("X-:*-Greeter");
config->writeEntry( "PreselectUser", npRadio->isChecked() ? "None" :
@@ -241,6 +248,7 @@ void TDMConvenienceWidget::load()
config->setGroup("X-*-Core");
cbarlen->setChecked(config->readBoolEntry( "AutoReLogin", false) );
+ allowRootLogin->setChecked(config->readBoolEntry( "AllowRootLogin", false) );
config->setGroup("X-:*-Greeter");
TQString presstr = config->readEntry( "PreselectUser", "None" );
@@ -266,6 +274,7 @@ void TDMConvenienceWidget::defaults()
npRadio->setChecked(true);
npGroup->setChecked(false);
cbarlen->setChecked(false);
+ allowRootLogin->setChecked(false);
cbjumppw->setChecked(false);
autoUser = "";
preselUser = "";
diff --git a/kcontrol/tdm/tdm-conv.h b/kcontrol/tdm/tdm-conv.h
index 4015e21b3..39e0e30f9 100644
--- a/kcontrol/tdm/tdm-conv.h
+++ b/kcontrol/tdm/tdm-conv.h
@@ -69,7 +69,7 @@ private slots:
private:
TQGroupBox *alGroup, *puGroup, *npGroup, *btGroup;
- TQCheckBox *againcb, *cbarlen, *cbjumppw, *autoLockCheck;
+ TQCheckBox *againcb, *cbarlen, *cbjumppw, *autoLockCheck, *allowRootLogin;
TQRadioButton *npRadio, *ppRadio, *spRadio;
KComboBox *userlb, *puserlb;
TQSpinBox *delaysb;