mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
New setting: enablin/disabling the automatic reload on changes
This commit is contained in:
parent
95fdefdcc7
commit
06e08557ac
@ -91,6 +91,7 @@ void Config::init(const QString& fileName)
|
|||||||
m_defaults.insert("OpenPreviousDatabasesOnStartup", true);
|
m_defaults.insert("OpenPreviousDatabasesOnStartup", true);
|
||||||
m_defaults.insert("ModifiedOnExpandedStateChanges", true);
|
m_defaults.insert("ModifiedOnExpandedStateChanges", true);
|
||||||
m_defaults.insert("AutoSaveAfterEveryChange", false);
|
m_defaults.insert("AutoSaveAfterEveryChange", false);
|
||||||
|
m_defaults.insert("AutoReloadOnChange", true);
|
||||||
m_defaults.insert("AutoSaveOnExit", false);
|
m_defaults.insert("AutoSaveOnExit", false);
|
||||||
m_defaults.insert("ShowToolbar", true);
|
m_defaults.insert("ShowToolbar", true);
|
||||||
m_defaults.insert("MinimizeOnCopy", false);
|
m_defaults.insert("MinimizeOnCopy", false);
|
||||||
|
@ -621,7 +621,8 @@ void DatabaseWidget::openDatabase(bool accepted)
|
|||||||
m_databaseOpenWidget = Q_NULLPTR;
|
m_databaseOpenWidget = Q_NULLPTR;
|
||||||
delete m_keepass1OpenWidget;
|
delete m_keepass1OpenWidget;
|
||||||
m_keepass1OpenWidget = Q_NULLPTR;
|
m_keepass1OpenWidget = Q_NULLPTR;
|
||||||
m_file_watcher.watchFile( m_filename );
|
if (config()->get("AutoReloadOnChange").toBool() )
|
||||||
|
m_file_watcher.watchFile( m_filename );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_file_watcher.stopWatching();
|
m_file_watcher.stopWatching();
|
||||||
@ -878,6 +879,9 @@ void DatabaseWidget::databaseModifedExternally()
|
|||||||
if ( database() == Q_NULLPTR )
|
if ( database() == Q_NULLPTR )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ( ! config()->get("AutoReloadOnChange").toBool() )
|
||||||
|
return;
|
||||||
|
|
||||||
KeePass2Reader reader;
|
KeePass2Reader reader;
|
||||||
QFile file(m_filename);
|
QFile file(m_filename);
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
|
@ -66,6 +66,7 @@ void SettingsWidget::loadSettings()
|
|||||||
m_generalUi->modifiedExpandedChangedCheckBox->setChecked(config()->get("ModifiedOnExpandedStateChanges").toBool());
|
m_generalUi->modifiedExpandedChangedCheckBox->setChecked(config()->get("ModifiedOnExpandedStateChanges").toBool());
|
||||||
m_generalUi->autoSaveAfterEveryChangeCheckBox->setChecked(config()->get("AutoSaveAfterEveryChange").toBool());
|
m_generalUi->autoSaveAfterEveryChangeCheckBox->setChecked(config()->get("AutoSaveAfterEveryChange").toBool());
|
||||||
m_generalUi->autoSaveOnExitCheckBox->setChecked(config()->get("AutoSaveOnExit").toBool());
|
m_generalUi->autoSaveOnExitCheckBox->setChecked(config()->get("AutoSaveOnExit").toBool());
|
||||||
|
m_generalUi->autoReloadOnChangeCheckBox->setChecked(config()->get("AutoReloadOnChange").toBool());
|
||||||
m_generalUi->minimizeOnCopyCheckBox->setChecked(config()->get("MinimizeOnCopy").toBool());
|
m_generalUi->minimizeOnCopyCheckBox->setChecked(config()->get("MinimizeOnCopy").toBool());
|
||||||
m_generalUi->useGroupIconOnEntryCreationCheckBox->setChecked(config()->get("UseGroupIconOnEntryCreation").toBool());
|
m_generalUi->useGroupIconOnEntryCreationCheckBox->setChecked(config()->get("UseGroupIconOnEntryCreation").toBool());
|
||||||
m_generalUi->autoTypeEntryTitleMatchCheckBox->setChecked(config()->get("AutoTypeEntryTitleMatch").toBool());
|
m_generalUi->autoTypeEntryTitleMatchCheckBox->setChecked(config()->get("AutoTypeEntryTitleMatch").toBool());
|
||||||
@ -110,6 +111,7 @@ void SettingsWidget::saveSettings()
|
|||||||
config()->set("AutoSaveAfterEveryChange",
|
config()->set("AutoSaveAfterEveryChange",
|
||||||
m_generalUi->autoSaveAfterEveryChangeCheckBox->isChecked());
|
m_generalUi->autoSaveAfterEveryChangeCheckBox->isChecked());
|
||||||
config()->set("AutoSaveOnExit", m_generalUi->autoSaveOnExitCheckBox->isChecked());
|
config()->set("AutoSaveOnExit", m_generalUi->autoSaveOnExitCheckBox->isChecked());
|
||||||
|
config()->set("AutoReloadOnChange", m_generalUi->autoReloadOnChangeCheckBox->isChecked());
|
||||||
config()->set("MinimizeOnCopy", m_generalUi->minimizeOnCopyCheckBox->isChecked());
|
config()->set("MinimizeOnCopy", m_generalUi->minimizeOnCopyCheckBox->isChecked());
|
||||||
config()->set("UseGroupIconOnEntryCreation",
|
config()->set("UseGroupIconOnEntryCreation",
|
||||||
m_generalUi->useGroupIconOnEntryCreationCheckBox->isChecked());
|
m_generalUi->useGroupIconOnEntryCreationCheckBox->isChecked());
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>456</width>
|
<width>541</width>
|
||||||
<height>288</height>
|
<height>311</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
@ -55,47 +55,54 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QCheckBox" name="minimizeOnCopyCheckBox">
|
<widget class="QCheckBox" name="minimizeOnCopyCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Minimize when copying to clipboard</string>
|
<string>Minimize when copying to clipboard</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QCheckBox" name="useGroupIconOnEntryCreationCheckBox">
|
<widget class="QCheckBox" name="useGroupIconOnEntryCreationCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use group icon on entry creation</string>
|
<string>Use group icon on entry creation</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="8" column="0">
|
||||||
<widget class="QLabel" name="autoTypeShortcutLabel">
|
<widget class="QLabel" name="autoTypeShortcutLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Global Auto-Type shortcut</string>
|
<string>Global Auto-Type shortcut</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="8" column="1">
|
||||||
<widget class="ShortcutWidget" name="autoTypeShortcutWidget"/>
|
<widget class="ShortcutWidget" name="autoTypeShortcutWidget"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="9" column="0">
|
||||||
<widget class="QCheckBox" name="autoTypeEntryTitleMatchCheckBox">
|
<widget class="QCheckBox" name="autoTypeEntryTitleMatchCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use entry title to match windows for global auto-type</string>
|
<string>Use entry title to match windows for global auto-type</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="10" column="0">
|
||||||
<widget class="QLabel" name="languageLabel">
|
<widget class="QLabel" name="languageLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Language</string>
|
<string>Language</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="1">
|
<item row="10" column="1">
|
||||||
<widget class="QComboBox" name="languageComboBox"/>
|
<widget class="QComboBox" name="languageComboBox"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QCheckBox" name="autoReloadOnChangeCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Automatically reload when the database is expernally modified</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Loading…
Reference in New Issue
Block a user