Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2022-07-04 22:59:41 +0300
committerJonathan White <support@dmapps.us>2022-07-11 13:55:03 +0300
commitdab6d9408e7e37ec86cf679efd86116994ffd201 (patch)
treecba44fdf03fd0738e0a9cd68aa347bb9c16cd0c0
parent6b05b848952108fdc073ff7d1abd47b99ea983db (diff)
Add setting for number of recent files
* Expose setting to limit the number of recent files. Default is still 5, can be set from 1 to 25. * Also fix tab order on settings page
-rw-r--r--share/translations/keepassxc_en.ts4
-rw-r--r--src/gui/ApplicationSettingsWidget.cpp3
-rw-r--r--src/gui/ApplicationSettingsWidgetGeneral.ui59
3 files changed, 57 insertions, 9 deletions
diff --git a/share/translations/keepassxc_en.ts b/share/translations/keepassxc_en.ts
index 90b8de4d8..f4b63fd3f 100644
--- a/share/translations/keepassxc_en.ts
+++ b/share/translations/keepassxc_en.ts
@@ -495,6 +495,10 @@
<source>Remember last typed entry for:</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source> recent files</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ApplicationSettingsWidgetSecurity</name>
diff --git a/src/gui/ApplicationSettingsWidget.cpp b/src/gui/ApplicationSettingsWidget.cpp
index 9dd9e3df8..12578d8f9 100644
--- a/src/gui/ApplicationSettingsWidget.cpp
+++ b/src/gui/ApplicationSettingsWidget.cpp
@@ -191,6 +191,7 @@ void ApplicationSettingsWidget::loadSettings()
m_generalUi->singleInstanceCheckBox->setChecked(config()->get(Config::SingleInstance).toBool());
m_generalUi->launchAtStartup->setChecked(osUtils->isLaunchAtStartupEnabled());
m_generalUi->rememberLastDatabasesCheckBox->setChecked(config()->get(Config::RememberLastDatabases).toBool());
+ m_generalUi->rememberLastDatabasesSpinbox->setValue(config()->get(Config::NumberOfRememberedLastDatabases).toInt());
m_generalUi->rememberLastKeyFilesCheckBox->setChecked(config()->get(Config::RememberLastKeyFiles).toBool());
m_generalUi->openPreviousDatabasesOnStartupCheckBox->setChecked(
config()->get(Config::OpenPreviousDatabasesOnStartup).toBool());
@@ -336,6 +337,7 @@ void ApplicationSettingsWidget::saveSettings()
config()->set(Config::SingleInstance, m_generalUi->singleInstanceCheckBox->isChecked());
config()->set(Config::RememberLastDatabases, m_generalUi->rememberLastDatabasesCheckBox->isChecked());
+ config()->set(Config::NumberOfRememberedLastDatabases, m_generalUi->rememberLastDatabasesSpinbox->value());
config()->set(Config::RememberLastKeyFiles, m_generalUi->rememberLastKeyFilesCheckBox->isChecked());
config()->set(Config::OpenPreviousDatabasesOnStartup,
m_generalUi->openPreviousDatabasesOnStartupCheckBox->isChecked());
@@ -520,6 +522,7 @@ void ApplicationSettingsWidget::rememberDatabasesToggled(bool checked)
m_generalUi->openPreviousDatabasesOnStartupCheckBox->setChecked(false);
}
+ m_generalUi->rememberLastDatabasesSpinbox->setEnabled(checked);
m_generalUi->rememberLastKeyFilesCheckBox->setEnabled(checked);
m_generalUi->openPreviousDatabasesOnStartupCheckBox->setEnabled(checked);
}
diff --git a/src/gui/ApplicationSettingsWidgetGeneral.ui b/src/gui/ApplicationSettingsWidgetGeneral.ui
index 2260efb20..0a67c57b7 100644
--- a/src/gui/ApplicationSettingsWidgetGeneral.ui
+++ b/src/gui/ApplicationSettingsWidgetGeneral.ui
@@ -113,14 +113,47 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="rememberLastDatabasesCheckBox">
- <property name="text">
- <string>Remember previously used databases</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <widget class="QCheckBox" name="rememberLastDatabasesCheckBox">
+ <property name="text">
+ <string>Remember previously used databases</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="rememberLastDatabasesSpinbox">
+ <property name="suffix">
+ <string> recent files</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>25</number>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_9">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
</item>
<item>
<layout class="QHBoxLayout" name="rememberDbSubLayout_2">
@@ -1231,6 +1264,7 @@
<tabstop>systrayMinimizeOnStartup</tabstop>
<tabstop>minimizeAfterUnlockCheckBox</tabstop>
<tabstop>rememberLastDatabasesCheckBox</tabstop>
+ <tabstop>rememberLastDatabasesSpinbox</tabstop>
<tabstop>openPreviousDatabasesOnStartupCheckBox</tabstop>
<tabstop>rememberLastKeyFilesCheckBox</tabstop>
<tabstop>checkForUpdatesOnStartupCheckBox</tabstop>
@@ -1240,8 +1274,12 @@
<tabstop>autoSaveAfterEveryChangeCheckBox</tabstop>
<tabstop>autoSaveOnExitCheckBox</tabstop>
<tabstop>autoSaveNonDataChangesCheckBox</tabstop>
+ <tabstop>autoReloadOnChangeCheckBox</tabstop>
<tabstop>backupBeforeSaveCheckBox</tabstop>
+ <tabstop>backupFilePath</tabstop>
+ <tabstop>backupFilePathPicker</tabstop>
<tabstop>useAlternativeSaveCheckBox</tabstop>
+ <tabstop>alternativeSaveComboBox</tabstop>
<tabstop>useGroupIconOnEntryCreationCheckBox</tabstop>
<tabstop>minimizeOnOpenUrlCheckBox</tabstop>
<tabstop>hideWindowOnCopyCheckBox</tabstop>
@@ -1250,8 +1288,8 @@
<tabstop>faviconTimeoutSpinBox</tabstop>
<tabstop>languageComboBox</tabstop>
<tabstop>toolButtonStyleComboBox</tabstop>
- <tabstop>monospaceNotesCheckBox</tabstop>
<tabstop>toolbarMovableCheckBox</tabstop>
+ <tabstop>monospaceNotesCheckBox</tabstop>
<tabstop>minimizeOnCloseCheckBox</tabstop>
<tabstop>systrayShowCheckBox</tabstop>
<tabstop>trayIconAppearance</tabstop>
@@ -1260,7 +1298,10 @@
<tabstop>autoTypeEntryTitleMatchCheckBox</tabstop>
<tabstop>autoTypeEntryURLMatchCheckBox</tabstop>
<tabstop>autoTypeAskCheckBox</tabstop>
+ <tabstop>autoTypeHideExpiredEntryCheckBox</tabstop>
+ <tabstop>autoTypeRelockDatabaseCheckBox</tabstop>
<tabstop>autoTypeShortcutWidget</tabstop>
+ <tabstop>autoTypeRetypeTimeSpinBox</tabstop>
<tabstop>autoTypeStartDelaySpinBox</tabstop>
<tabstop>autoTypeDelaySpinBox</tabstop>
</tabstops>