mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Add settings option if visual changes mark databases as modified.
This commit is contained in:
parent
8aefb1ed82
commit
5003499700
@ -68,6 +68,7 @@ Config::Config()
|
||||
m_settings.reset(new QSettings(userPath, QSettings::IniFormat));
|
||||
|
||||
m_defaults.insert("RememberLastDatabases", true);
|
||||
m_defaults.insert("ModifiedOnVisualChanges", true);
|
||||
m_defaults.insert("security/clearclipboard", true);
|
||||
m_defaults.insert("security/clearclipboardtimeout", 10);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "Group.h"
|
||||
|
||||
#include "core/Config.h"
|
||||
#include "core/DatabaseIcons.h"
|
||||
#include "core/Metadata.h"
|
||||
#include "core/Tools.h"
|
||||
@ -225,7 +226,13 @@ void Group::setTimeInfo(const TimeInfo& timeInfo)
|
||||
|
||||
void Group::setExpanded(bool expanded)
|
||||
{
|
||||
set(m_isExpanded, expanded);
|
||||
if (m_isExpanded != expanded) {
|
||||
m_isExpanded = expanded;
|
||||
updateTimeinfo();
|
||||
if (config()->get("ModifiedOnVisualChanges").toBool()) {
|
||||
Q_EMIT modified();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Group::setDefaultAutoTypeSequence(const QString& sequence)
|
||||
|
@ -49,6 +49,7 @@ SettingsWidget::~SettingsWidget()
|
||||
void SettingsWidget::loadSettings()
|
||||
{
|
||||
m_generalUi->rememberLastDatabasesCheckBox->setChecked(config()->get("RememberLastDatabases").toBool());
|
||||
m_generalUi->modifiedOnVisualChangesCheckBox->setChecked(config()->get("ModifiedOnVisualChanges").toBool());
|
||||
m_secUi->clearClipboardCheckBox->setChecked(config()->get("security/clearclipboard").toBool());
|
||||
m_secUi->clearClipboardSpinBox->setValue(config()->get("security/clearclipboardtimeout").toInt());
|
||||
|
||||
@ -58,6 +59,7 @@ void SettingsWidget::loadSettings()
|
||||
void SettingsWidget::saveSettings()
|
||||
{
|
||||
config()->set("RememberLastDatabases", m_generalUi->rememberLastDatabasesCheckBox->isChecked());
|
||||
config()->set("ModifiedOnVisualChanges", m_generalUi->modifiedOnVisualChangesCheckBox->isChecked());
|
||||
config()->set("security/clearclipboard", m_secUi->clearClipboardCheckBox->isChecked());
|
||||
config()->set("security/clearclipboardtimeout", m_secUi->clearClipboardSpinBox->value());
|
||||
|
||||
|
@ -13,6 +13,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="modifiedOnVisualChangesCheckBox">
|
||||
<property name="text">
|
||||
<string>Mark as modified on minor visual changes</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
Loading…
Reference in New Issue
Block a user