diff --git a/share/translations/keepassxc_en.ts b/share/translations/keepassxc_en.ts
index daaa67606e..0ee054f6ef 100644
--- a/share/translations/keepassxc_en.ts
+++ b/share/translations/keepassxc_en.ts
@@ -541,6 +541,10 @@
+
+
+
+
ApplicationSettingsWidgetSecurity
diff --git a/src/core/Config.cpp b/src/core/Config.cpp
index a38b307be7..108bbe88c0 100644
--- a/src/core/Config.cpp
+++ b/src/core/Config.cpp
@@ -66,6 +66,7 @@ static const QHash configStrings = {
{Config::UseDirectWriteSaves,{QS("UseDirectWriteSaves"), Local, false}},
{Config::SearchLimitGroup,{QS("SearchLimitGroup"), Roaming, false}},
{Config::MinimizeOnOpenUrl,{QS("MinimizeOnOpenUrl"), Roaming, false}},
+ {Config::OpenURLOnDoubleClick, {QS("OpenURLOnDoubleClick"), Roaming, true}},
{Config::HideWindowOnCopy,{QS("HideWindowOnCopy"), Roaming, false}},
{Config::MinimizeOnCopy,{QS("MinimizeOnCopy"), Roaming, true}},
{Config::MinimizeAfterUnlock,{QS("MinimizeAfterUnlock"), Roaming, false}},
diff --git a/src/core/Config.h b/src/core/Config.h
index 0f39beafb8..5179b49d7b 100644
--- a/src/core/Config.h
+++ b/src/core/Config.h
@@ -49,6 +49,7 @@ class Config : public QObject
UseDirectWriteSaves,
SearchLimitGroup,
MinimizeOnOpenUrl,
+ OpenURLOnDoubleClick,
HideWindowOnCopy,
MinimizeOnCopy,
MinimizeAfterUnlock,
diff --git a/src/gui/ApplicationSettingsWidget.cpp b/src/gui/ApplicationSettingsWidget.cpp
index 27f27eb6d3..ca7c5fd665 100644
--- a/src/gui/ApplicationSettingsWidget.cpp
+++ b/src/gui/ApplicationSettingsWidget.cpp
@@ -225,6 +225,7 @@ void ApplicationSettingsWidget::loadSettings()
m_generalUi->autoReloadOnChangeCheckBox->setChecked(config()->get(Config::AutoReloadOnChange).toBool());
m_generalUi->minimizeAfterUnlockCheckBox->setChecked(config()->get(Config::MinimizeAfterUnlock).toBool());
m_generalUi->minimizeOnOpenUrlCheckBox->setChecked(config()->get(Config::MinimizeOnOpenUrl).toBool());
+ m_generalUi->openUrlOnDoubleClick->setChecked(config()->get(Config::OpenURLOnDoubleClick).toBool());
m_generalUi->hideWindowOnCopyCheckBox->setChecked(config()->get(Config::HideWindowOnCopy).toBool());
hideWindowOnCopyCheckBoxToggled(m_generalUi->hideWindowOnCopyCheckBox->isChecked());
m_generalUi->minimizeOnCopyRadioButton->setChecked(config()->get(Config::MinimizeOnCopy).toBool());
@@ -382,6 +383,7 @@ void ApplicationSettingsWidget::saveSettings()
config()->set(Config::AutoReloadOnChange, m_generalUi->autoReloadOnChangeCheckBox->isChecked());
config()->set(Config::MinimizeAfterUnlock, m_generalUi->minimizeAfterUnlockCheckBox->isChecked());
config()->set(Config::MinimizeOnOpenUrl, m_generalUi->minimizeOnOpenUrlCheckBox->isChecked());
+ config()->set(Config::OpenURLOnDoubleClick, m_generalUi->openUrlOnDoubleClick->isChecked());
config()->set(Config::HideWindowOnCopy, m_generalUi->hideWindowOnCopyCheckBox->isChecked());
config()->set(Config::MinimizeOnCopy, m_generalUi->minimizeOnCopyRadioButton->isChecked());
config()->set(Config::DropToBackgroundOnCopy, m_generalUi->dropToBackgroundOnCopyRadioButton->isChecked());
diff --git a/src/gui/ApplicationSettingsWidgetGeneral.ui b/src/gui/ApplicationSettingsWidgetGeneral.ui
index 6e74205ff3..25a993b237 100644
--- a/src/gui/ApplicationSettingsWidgetGeneral.ui
+++ b/src/gui/ApplicationSettingsWidgetGeneral.ui
@@ -57,9 +57,9 @@
0
- 0
- 568
- 1153
+ -419
+ 573
+ 1397
@@ -543,6 +543,16 @@
+ -
+
+
+ Open browser on double clicking URL field in entry view
+
+
+ true
+
+
+
-
@@ -1351,6 +1361,7 @@
alternativeSaveComboBox
ConfirmMoveEntryToRecycleBinCheckBox
EnableCopyOnDoubleClickCheckBox
+ openUrlOnDoubleClick
useGroupIconOnEntryCreationCheckBox
minimizeOnOpenUrlCheckBox
hideWindowOnCopyCheckBox
diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp
index 8ec29b9513..c106362897 100644
--- a/src/gui/DatabaseWidget.cpp
+++ b/src/gui/DatabaseWidget.cpp
@@ -1495,11 +1495,6 @@ void DatabaseWidget::entryActivationSignalReceived(Entry* entry, EntryModel::Mod
switchToEntryEdit(entry);
}
break;
- case EntryModel::Url:
- if (!entry->url().isEmpty()) {
- openUrlForEntry(entry);
- }
- break;
case EntryModel::Totp:
if (entry->hasTotp()) {
setClipboardTextAndMinimize(entry->totp());
@@ -1520,6 +1515,13 @@ void DatabaseWidget::entryActivationSignalReceived(Entry* entry, EntryModel::Mod
// TODO: switch to 'Attachments' tab in details view/pane
// case EntryModel::Attachments:
// break;
+ case EntryModel::Url:
+ if (!entry->url().isEmpty() && config()->get(Config::OpenURLOnDoubleClick).toBool()) {
+ openUrlForEntry(entry);
+ break;
+ }
+ // Note, order matters here. We want to fall into the default case.
+ [[fallthrough]];
default:
switchToEntryEdit(entry);
}