diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-02-07 22:56:14 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-02-07 23:03:59 +0900 |
commit | d008372a5ab7d7a6157315553b3b36425e837cca (patch) | |
tree | e368daa57dc64d3181e449611f45c7a7a516dad4 | |
parent | 3a7ece7afcc4b8bee190723633e29222cb5ba865 (diff) | |
download | tdebase-d008372a5ab7d7a6157315553b3b36425e837cca.tar.gz tdebase-d008372a5ab7d7a6157315553b3b36425e837cca.zip |
Added option in TCC -> System Administration -> Logic Manager ->
Appearance tab to enable/disable the launch of tdekbdledsync in tde
greeter. This resolves bug 1834.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit be1c4f22face24de36c540df38a903860f0549d0)
-rw-r--r-- | kcontrol/tdm/tdm-appear.cpp | 19 | ||||
-rw-r--r-- | kcontrol/tdm/tdm-appear.h | 1 | ||||
-rw-r--r-- | tdm/config.def | 11 | ||||
-rw-r--r-- | tdm/kfrontend/kgapp.cpp | 1 |
4 files changed, 30 insertions, 2 deletions
diff --git a/kcontrol/tdm/tdm-appear.cpp b/kcontrol/tdm/tdm-appear.cpp index c248cff57..719d30e77 100644 --- a/kcontrol/tdm/tdm-appear.cpp +++ b/kcontrol/tdm/tdm-appear.cpp @@ -242,7 +242,6 @@ TDMAppearanceWidget::TDMAppearanceWidget(TQWidget *parent, const char *name) TQWhatsThis::add( label, wtstr ); TQWhatsThis::add( langcombo, wtstr ); - // The SAK group box group = new TQGroupBox(0, Qt::Vertical, i18n("Secure Attention Key"), this); vbox->addWidget(group); @@ -262,9 +261,18 @@ TDMAppearanceWidget::TDMAppearanceWidget(TQWidget *parent, const char *name) wtstr = i18n("Here you can enable or disable the Secure Attention Key [SAK] anti-spoofing measure."); TQWhatsThis::add( sakbox, wtstr ); + // Keyboard group box + group = new TQGroupBox(0, Qt::Vertical, i18n("Keyboard"), this); + vbox->addWidget(group); - vbox->addStretch(1); + kbdledbox = new TQCheckBox(i18n("Sync keyboard led status"), group); + connect(kbdledbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); + TQGridLayout *hbox3 = new TQGridLayout(group->layout(), 2, 2, KDialog::spacingHint()); + hbox3->setColStretch(1, 1); + hbox3->addWidget(kbdledbox, 1, 0); + TQWhatsThis::add(kbdledbox, i18n("Enable or disable the use of tdekbdledsync to sync keyboard LED status in tdm.")); + vbox->addStretch(1); } void TDMAppearanceWidget::makeReadOnly() @@ -284,6 +292,7 @@ void TDMAppearanceWidget::makeReadOnly() echocombo->setEnabled(false); langcombo->setEnabled(false); sakbox->setEnabled(false); + kbdledbox->setEnabled(false); } void TDMAppearanceWidget::loadLanguageList(KLanguageButton *combo) @@ -497,6 +506,9 @@ void TDMAppearanceWidget::save() kill(tsakpid, SIGTERM); } } + + config->setGroup("X-:*-Greeter"); + config->writeEntry("SyncKbdLED", kbdledbox->isChecked()); } @@ -560,6 +572,9 @@ void TDMAppearanceWidget::load() else { sakbox->setChecked(false); } + + config->setGroup("X-:*-Greeter"); + kbdledbox->setChecked(config->readBoolEntry("SyncKbdLED", true)); } diff --git a/kcontrol/tdm/tdm-appear.h b/kcontrol/tdm/tdm-appear.h index 8e0acc93d..69c2b241b 100644 --- a/kcontrol/tdm/tdm-appear.h +++ b/kcontrol/tdm/tdm-appear.h @@ -92,6 +92,7 @@ private: KLanguageButton *langcombo; TQCheckBox *sakbox; TQLabel *sakwarning; + TQCheckBox *kbdledbox; }; diff --git a/tdm/config.def b/tdm/config.def index 4209c8212..04f3a1d88 100644 --- a/tdm/config.def +++ b/tdm/config.def @@ -2025,6 +2025,17 @@ Comment: Description: If true then the SAK anti-spoofing dialog will be utilized +Key: SyncKbdLED +Type: bool +Default: true +User: core +User: greeter +Instance: #:*/true +Comment: + Sync keyboard led status +Description: + Enable or disable the use of tdekbdledsync to sync keyboard LED status in tdm. + Key: UseAdminSession Type: bool Default: false diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 4ea540285..3fefc00bc 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -225,6 +225,7 @@ kg_main( const char *argv0 ) trinity_desktop_lock_use_sak = false; #endif + trinity_desktop_synchronize_keyboard_lights = _syncKbdLED; if (trinity_desktop_synchronize_keyboard_lights && TQString(getenv("DISPLAY")).startsWith(":")) { kbdl = new TDEProcess; |