diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 21:48:40 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-03-04 19:57:11 +0100 |
commit | 170d641554896663c3e4c0af5217cfbbad1b183c (patch) | |
tree | ea63a609417bd5176c90d9999b6371f97c63363f /kcontrol | |
parent | b71d74b498ef2fa5e8902574732ebed3114886a9 (diff) | |
download | tdebase-170d641554896663c3e4c0af5217cfbbad1b183c.tar.gz tdebase-170d641554896663c3e4c0af5217cfbbad1b183c.zip |
Provide GUI check box control for tdmrc AllowRootLogin.
This resolves bug report 1296.
(cherry picked from commit 7bd9856f9552e2a705b48365395394fe26a16147)
Diffstat (limited to 'kcontrol')
-rw-r--r-- | kcontrol/kdm/kdm-conv.cpp | 9 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-conv.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/kcontrol/kdm/kdm-conv.cpp b/kcontrol/kdm/kdm-conv.cpp index 155d5b380..fd01e5871 100644 --- a/kcontrol/kdm/kdm-conv.cpp +++ b/kcontrol/kdm/kdm-conv.cpp @@ -154,6 +154,11 @@ KDMConvenienceWidget::KDMConvenienceWidget(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 KDM. " + "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 KDMConvenienceWidget::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 KDMConvenienceWidget::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 KDMConvenienceWidget::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 KDMConvenienceWidget::defaults() npRadio->setChecked(true); npGroup->setChecked(false); cbarlen->setChecked(false); + allowRootLogin->setChecked(false); cbjumppw->setChecked(false); autoUser = ""; preselUser = ""; diff --git a/kcontrol/kdm/kdm-conv.h b/kcontrol/kdm/kdm-conv.h index be8bebf35..7e52481a1 100644 --- a/kcontrol/kdm/kdm-conv.h +++ b/kcontrol/kdm/kdm-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; |