Notes section no longer visible by default.

There is a simple checkbox that allows your notes to become visible
again.  This is always disabled by default, as the use case
referenced in issue #342 (and my own use case) has confidential data
in that field.

Passes all tests (YubiKey is N/A) on Ubuntu 16.04.2 with Qt 5.5.1.
This commit is contained in:
Joe Brown 2017-04-29 21:23:28 -05:00 committed by thez3ro
parent 5bc000cc31
commit 0c2d71c2ce
No known key found for this signature in database
GPG Key ID: F628F9E41DD7C073
2 changed files with 6 additions and 3 deletions

View File

@ -99,6 +99,7 @@ void EditEntryWidget::setupMain()
connect(m_mainUi->togglePasswordButton, SIGNAL(toggled(bool)), m_mainUi->passwordEdit, SLOT(setShowPassword(bool)));
connect(m_mainUi->togglePasswordGeneratorButton, SIGNAL(toggled(bool)), SLOT(togglePasswordGeneratorButton(bool)));
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
connect(m_mainUi->notesEnabled, SIGNAL(toggled(bool)), m_mainUi->notesEdit, SLOT(setVisible(bool)));
m_mainUi->passwordRepeatEdit->enableVerifyMode(m_mainUi->passwordEdit);
connect(m_mainUi->passwordGenerator, SIGNAL(appliedPassword(QString)), SLOT(setGeneratedPassword(QString)));
@ -308,7 +309,9 @@ 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(false);
m_mainUi->notesEdit->setReadOnly(m_history);
m_mainUi->notesEdit->setVisible(false);
m_mainUi->togglePasswordGeneratorButton->setChecked(false);
m_mainUi->togglePasswordGeneratorButton->setDisabled(m_history);
m_mainUi->passwordGenerator->reset();

View File

@ -79,10 +79,10 @@
</property>
</widget>
</item>
<item row="9" column="0" alignment="Qt::AlignRight|Qt::AlignTop">
<widget class="QLabel" name="notesLabel">
<item row="9" column="0" alignment="Qt::AlignLeft|Qt::AlignTop">
<widget class="QCheckBox" name="notesEnabled">
<property name="text">
<string>Notes:</string>
<string>Notes</string>
</property>
</widget>
</item>