From d1acd750684b808e447c17e4b0b5125ed4a4ba95 Mon Sep 17 00:00:00 2001 From: Claudio Bantaloukas Date: Sun, 1 Jan 2017 14:08:14 +0100 Subject: [PATCH] Moved "Lock databases on screen lock" setting to security settings widget. Changed wording and preference variable name for conformity with existing settings. --- src/gui/MainWindow.cpp | 2 +- src/gui/SettingsWidget.cpp | 4 ++-- src/gui/SettingsWidgetSecurity.ui | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 65062fb79..3d5fad919 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -965,7 +965,7 @@ void MainWindow::hideYubiKeyPopup() void MainWindow::handleScreenLock() { - if (config()->get("AutoCloseOnScreenLock").toBool()){ + if (config()->get("security/lockdatabasescreenlock").toBool()){ lockDatabasesAfterInactivity(); } } diff --git a/src/gui/SettingsWidget.cpp b/src/gui/SettingsWidget.cpp index 15f812a0d..75ebf2601 100644 --- a/src/gui/SettingsWidget.cpp +++ b/src/gui/SettingsWidget.cpp @@ -141,7 +141,6 @@ void SettingsWidget::loadSettings() } } - m_generalUi->autoCloseOnScreenLockCheckBox->setChecked(config()->get("AutoCloseOnScreenLock").toBool()); m_secUi->clearClipboardCheckBox->setChecked(config()->get("security/clearclipboard").toBool()); m_secUi->clearClipboardSpinBox->setValue(config()->get("security/clearclipboardtimeout").toInt()); @@ -149,6 +148,7 @@ void SettingsWidget::loadSettings() m_secUi->lockDatabaseIdleCheckBox->setChecked(config()->get("security/lockdatabaseidle").toBool()); m_secUi->lockDatabaseIdleSpinBox->setValue(config()->get("security/lockdatabaseidlesec").toInt()); m_secUi->lockDatabaseMinimizeCheckBox->setChecked(config()->get("security/lockdatabaseminimize").toBool()); + m_secUi->lockDatabaseOnScreenLockCheckBox->setChecked(config()->get("security/lockdatabasescreenlock").toBool()); m_secUi->passwordCleartextCheckBox->setChecked(config()->get("security/passwordscleartext").toBool()); m_secUi->passwordRepeatCheckBox->setChecked(config()->get("security/passwordsrepeat").toBool()); @@ -188,7 +188,6 @@ void SettingsWidget::saveSettings() config()->set("AutoTypeEntryTitleMatch", m_generalUi->autoTypeEntryTitleMatchCheckBox->isChecked()); int currentLangIndex = m_generalUi->languageComboBox->currentIndex(); - config()->set("AutoCloseOnScreenLock", m_generalUi->autoCloseOnScreenLockCheckBox->isChecked()); config()->set("GUI/Language", m_generalUi->languageComboBox->itemData(currentLangIndex).toString()); @@ -210,6 +209,7 @@ void SettingsWidget::saveSettings() config()->set("security/lockdatabaseidle", m_secUi->lockDatabaseIdleCheckBox->isChecked()); config()->set("security/lockdatabaseidlesec", m_secUi->lockDatabaseIdleSpinBox->value()); config()->set("security/lockdatabaseminimize", m_secUi->lockDatabaseMinimizeCheckBox->isChecked()); + config()->set("security/lockdatabasescreenlock", m_secUi->lockDatabaseOnScreenLockCheckBox->isChecked()); config()->set("security/passwordscleartext", m_secUi->passwordCleartextCheckBox->isChecked()); config()->set("security/passwordsrepeat", m_secUi->passwordRepeatCheckBox->isChecked()); diff --git a/src/gui/SettingsWidgetSecurity.ui b/src/gui/SettingsWidgetSecurity.ui index 08fa6f4ea..93e3e9114 100644 --- a/src/gui/SettingsWidgetSecurity.ui +++ b/src/gui/SettingsWidgetSecurity.ui @@ -142,6 +142,13 @@ + + + + Lock databases when session is locked or lid is closed + + +