Moved "Lock databases on screen lock" setting to security settings

widget.
Changed wording and preference variable name for conformity with
existing settings.
This commit is contained in:
Claudio Bantaloukas 2017-01-01 14:08:14 +01:00 committed by thez3ro
parent 44085df592
commit d1acd75068
No known key found for this signature in database
GPG Key ID: F628F9E41DD7C073
3 changed files with 10 additions and 3 deletions

View File

@ -965,7 +965,7 @@ void MainWindow::hideYubiKeyPopup()
void MainWindow::handleScreenLock()
{
if (config()->get("AutoCloseOnScreenLock").toBool()){
if (config()->get("security/lockdatabasescreenlock").toBool()){
lockDatabasesAfterInactivity();
}
}

View File

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

View File

@ -142,6 +142,13 @@
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="lockDatabaseOnScreenLockCheckBox">
<property name="text">
<string>Lock databases when session is locked or lid is closed</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>