hide note option

This commit is contained in:
thez3ro 2017-10-25 16:40:14 +02:00
parent ff01a7da1e
commit 9840470df8
No known key found for this signature in database
GPG Key ID: F628F9E41DD7C073
3 changed files with 12 additions and 2 deletions

View File

@ -163,6 +163,7 @@ void SettingsWidget::loadSettings()
m_secUi->passwordCleartextCheckBox->setChecked(config()->get("security/passwordscleartext").toBool());
m_secUi->passwordDetailsCleartextCheckBox->setChecked(config()->get("security/hidepassworddetails").toBool());
m_secUi->passwordRepeatCheckBox->setChecked(config()->get("security/passwordsrepeat").toBool());
m_secUi->hideNotesCheckBox->setChecked(config()->get("security/hidenotes").toBool());
for (const ExtraPage& page: asConst(m_extraPages)) {
@ -231,6 +232,7 @@ void SettingsWidget::saveSettings()
config()->set("security/passwordscleartext", m_secUi->passwordCleartextCheckBox->isChecked());
config()->set("security/hidepassworddetails", m_secUi->passwordDetailsCleartextCheckBox->isChecked());
config()->set("security/passwordsrepeat", m_secUi->passwordRepeatCheckBox->isChecked());
config()->set("security/hidenotes", m_secUi->hideNotesCheckBox->isChecked());
// Security: clear storage if related settings are disabled
if (!config()->get("RememberLastDatabases").toBool()) {

View File

@ -143,6 +143,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="hideNotesCheckBox">
<property name="text">
<string>Hide entry notes by default</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -315,9 +315,10 @@ void EditEntryWidget::setForms(const Entry* entry, bool restore)
m_mainUi->passwordRepeatEdit->setReadOnly(m_history);
m_mainUi->expireCheck->setEnabled(!m_history);
m_mainUi->expireDatePicker->setReadOnly(m_history);
m_mainUi->notesEnabled->setChecked(true);
m_mainUi->notesEnabled->setChecked(!config()->get("security/hidenotes").toBool());
m_mainUi->notesEdit->setReadOnly(m_history);
m_mainUi->notesEdit->setVisible(true);
m_mainUi->notesEdit->setVisible(!config()->get("security/hidenotes").toBool());
m_mainUi->notesHint->setVisible(config()->get("security/hidenotes").toBool());
m_mainUi->togglePasswordGeneratorButton->setChecked(false);
m_mainUi->togglePasswordGeneratorButton->setDisabled(m_history);
m_mainUi->passwordGenerator->reset();