mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 07:19:42 -05:00
Add option to disable opening a browser window when double-clicking the "URL" column (#11332)
This commit is contained in:
parent
dbf9587775
commit
740994ed48
@ -541,6 +541,10 @@
|
|||||||
<source>Export settings…</source>
|
<source>Export settings…</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open browser on double clicking URL field in entry view</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ApplicationSettingsWidgetSecurity</name>
|
<name>ApplicationSettingsWidgetSecurity</name>
|
||||||
|
@ -66,6 +66,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
|||||||
{Config::UseDirectWriteSaves,{QS("UseDirectWriteSaves"), Local, false}},
|
{Config::UseDirectWriteSaves,{QS("UseDirectWriteSaves"), Local, false}},
|
||||||
{Config::SearchLimitGroup,{QS("SearchLimitGroup"), Roaming, false}},
|
{Config::SearchLimitGroup,{QS("SearchLimitGroup"), Roaming, false}},
|
||||||
{Config::MinimizeOnOpenUrl,{QS("MinimizeOnOpenUrl"), Roaming, false}},
|
{Config::MinimizeOnOpenUrl,{QS("MinimizeOnOpenUrl"), Roaming, false}},
|
||||||
|
{Config::OpenURLOnDoubleClick, {QS("OpenURLOnDoubleClick"), Roaming, true}},
|
||||||
{Config::HideWindowOnCopy,{QS("HideWindowOnCopy"), Roaming, false}},
|
{Config::HideWindowOnCopy,{QS("HideWindowOnCopy"), Roaming, false}},
|
||||||
{Config::MinimizeOnCopy,{QS("MinimizeOnCopy"), Roaming, true}},
|
{Config::MinimizeOnCopy,{QS("MinimizeOnCopy"), Roaming, true}},
|
||||||
{Config::MinimizeAfterUnlock,{QS("MinimizeAfterUnlock"), Roaming, false}},
|
{Config::MinimizeAfterUnlock,{QS("MinimizeAfterUnlock"), Roaming, false}},
|
||||||
|
@ -49,6 +49,7 @@ public:
|
|||||||
UseDirectWriteSaves,
|
UseDirectWriteSaves,
|
||||||
SearchLimitGroup,
|
SearchLimitGroup,
|
||||||
MinimizeOnOpenUrl,
|
MinimizeOnOpenUrl,
|
||||||
|
OpenURLOnDoubleClick,
|
||||||
HideWindowOnCopy,
|
HideWindowOnCopy,
|
||||||
MinimizeOnCopy,
|
MinimizeOnCopy,
|
||||||
MinimizeAfterUnlock,
|
MinimizeAfterUnlock,
|
||||||
|
@ -225,6 +225,7 @@ void ApplicationSettingsWidget::loadSettings()
|
|||||||
m_generalUi->autoReloadOnChangeCheckBox->setChecked(config()->get(Config::AutoReloadOnChange).toBool());
|
m_generalUi->autoReloadOnChangeCheckBox->setChecked(config()->get(Config::AutoReloadOnChange).toBool());
|
||||||
m_generalUi->minimizeAfterUnlockCheckBox->setChecked(config()->get(Config::MinimizeAfterUnlock).toBool());
|
m_generalUi->minimizeAfterUnlockCheckBox->setChecked(config()->get(Config::MinimizeAfterUnlock).toBool());
|
||||||
m_generalUi->minimizeOnOpenUrlCheckBox->setChecked(config()->get(Config::MinimizeOnOpenUrl).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());
|
m_generalUi->hideWindowOnCopyCheckBox->setChecked(config()->get(Config::HideWindowOnCopy).toBool());
|
||||||
hideWindowOnCopyCheckBoxToggled(m_generalUi->hideWindowOnCopyCheckBox->isChecked());
|
hideWindowOnCopyCheckBoxToggled(m_generalUi->hideWindowOnCopyCheckBox->isChecked());
|
||||||
m_generalUi->minimizeOnCopyRadioButton->setChecked(config()->get(Config::MinimizeOnCopy).toBool());
|
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::AutoReloadOnChange, m_generalUi->autoReloadOnChangeCheckBox->isChecked());
|
||||||
config()->set(Config::MinimizeAfterUnlock, m_generalUi->minimizeAfterUnlockCheckBox->isChecked());
|
config()->set(Config::MinimizeAfterUnlock, m_generalUi->minimizeAfterUnlockCheckBox->isChecked());
|
||||||
config()->set(Config::MinimizeOnOpenUrl, m_generalUi->minimizeOnOpenUrlCheckBox->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::HideWindowOnCopy, m_generalUi->hideWindowOnCopyCheckBox->isChecked());
|
||||||
config()->set(Config::MinimizeOnCopy, m_generalUi->minimizeOnCopyRadioButton->isChecked());
|
config()->set(Config::MinimizeOnCopy, m_generalUi->minimizeOnCopyRadioButton->isChecked());
|
||||||
config()->set(Config::DropToBackgroundOnCopy, m_generalUi->dropToBackgroundOnCopyRadioButton->isChecked());
|
config()->set(Config::DropToBackgroundOnCopy, m_generalUi->dropToBackgroundOnCopyRadioButton->isChecked());
|
||||||
|
@ -57,9 +57,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-419</y>
|
||||||
<width>568</width>
|
<width>573</width>
|
||||||
<height>1153</height>
|
<height>1397</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
@ -543,6 +543,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="openUrlOnDoubleClick">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open browser on double clicking URL field in entry view</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="useGroupIconOnEntryCreationCheckBox">
|
<widget class="QCheckBox" name="useGroupIconOnEntryCreationCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -1351,6 +1361,7 @@
|
|||||||
<tabstop>alternativeSaveComboBox</tabstop>
|
<tabstop>alternativeSaveComboBox</tabstop>
|
||||||
<tabstop>ConfirmMoveEntryToRecycleBinCheckBox</tabstop>
|
<tabstop>ConfirmMoveEntryToRecycleBinCheckBox</tabstop>
|
||||||
<tabstop>EnableCopyOnDoubleClickCheckBox</tabstop>
|
<tabstop>EnableCopyOnDoubleClickCheckBox</tabstop>
|
||||||
|
<tabstop>openUrlOnDoubleClick</tabstop>
|
||||||
<tabstop>useGroupIconOnEntryCreationCheckBox</tabstop>
|
<tabstop>useGroupIconOnEntryCreationCheckBox</tabstop>
|
||||||
<tabstop>minimizeOnOpenUrlCheckBox</tabstop>
|
<tabstop>minimizeOnOpenUrlCheckBox</tabstop>
|
||||||
<tabstop>hideWindowOnCopyCheckBox</tabstop>
|
<tabstop>hideWindowOnCopyCheckBox</tabstop>
|
||||||
|
@ -1495,11 +1495,6 @@ void DatabaseWidget::entryActivationSignalReceived(Entry* entry, EntryModel::Mod
|
|||||||
switchToEntryEdit(entry);
|
switchToEntryEdit(entry);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EntryModel::Url:
|
|
||||||
if (!entry->url().isEmpty()) {
|
|
||||||
openUrlForEntry(entry);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case EntryModel::Totp:
|
case EntryModel::Totp:
|
||||||
if (entry->hasTotp()) {
|
if (entry->hasTotp()) {
|
||||||
setClipboardTextAndMinimize(entry->totp());
|
setClipboardTextAndMinimize(entry->totp());
|
||||||
@ -1520,6 +1515,13 @@ void DatabaseWidget::entryActivationSignalReceived(Entry* entry, EntryModel::Mod
|
|||||||
// TODO: switch to 'Attachments' tab in details view/pane
|
// TODO: switch to 'Attachments' tab in details view/pane
|
||||||
// case EntryModel::Attachments:
|
// case EntryModel::Attachments:
|
||||||
// break;
|
// 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:
|
default:
|
||||||
switchToEntryEdit(entry);
|
switchToEntryEdit(entry);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user