mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-31 18:26:20 -05:00
Merge pull request #704 from hifi/split-autotype-options
Split auto-type title and URL matching into separate options (fixes #638)
This commit is contained in:
commit
13c678344e
@ -576,8 +576,13 @@ QString AutoType::autoTypeSequence(const Entry* entry, const QString& windowTitl
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!match && config()->get("AutoTypeEntryTitleMatch").toBool()
|
if (!match && config()->get("AutoTypeEntryTitleMatch").toBool()
|
||||||
&& (windowMatchesTitle(windowTitle, entry->resolvePlaceholder(entry->title()))
|
&& windowMatchesTitle(windowTitle, entry->resolvePlaceholder(entry->title()))) {
|
||||||
|| windowMatchesUrl(windowTitle, entry->resolvePlaceholder(entry->url())))) {
|
sequence = entry->defaultAutoTypeSequence();
|
||||||
|
match = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!match && config()->get("AutoTypeEntryURLMatch").toBool()
|
||||||
|
&& windowMatchesUrl(windowTitle, entry->resolvePlaceholder(entry->url()))) {
|
||||||
sequence = entry->defaultAutoTypeSequence();
|
sequence = entry->defaultAutoTypeSequence();
|
||||||
match = true;
|
match = true;
|
||||||
}
|
}
|
||||||
|
@ -118,6 +118,7 @@ void Config::init(const QString& fileName)
|
|||||||
m_defaults.insert("MinimizeOnCopy", false);
|
m_defaults.insert("MinimizeOnCopy", false);
|
||||||
m_defaults.insert("UseGroupIconOnEntryCreation", false);
|
m_defaults.insert("UseGroupIconOnEntryCreation", false);
|
||||||
m_defaults.insert("AutoTypeEntryTitleMatch", true);
|
m_defaults.insert("AutoTypeEntryTitleMatch", true);
|
||||||
|
m_defaults.insert("AutoTypeEntryURLMatch", true);
|
||||||
m_defaults.insert("UseGroupIconOnEntryCreation", true);
|
m_defaults.insert("UseGroupIconOnEntryCreation", true);
|
||||||
m_defaults.insert("IgnoreGroupExpansion", false);
|
m_defaults.insert("IgnoreGroupExpansion", false);
|
||||||
m_defaults.insert("security/clearclipboard", true);
|
m_defaults.insert("security/clearclipboard", true);
|
||||||
|
@ -117,6 +117,7 @@ void SettingsWidget::loadSettings()
|
|||||||
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());
|
||||||
|
m_generalUi->autoTypeEntryURLMatchCheckBox->setChecked(config()->get("AutoTypeEntryURLMatch").toBool());
|
||||||
m_generalUi->ignoreGroupExpansionCheckBox->setChecked(config()->get("IgnoreGroupExpansion").toBool());
|
m_generalUi->ignoreGroupExpansionCheckBox->setChecked(config()->get("IgnoreGroupExpansion").toBool());
|
||||||
|
|
||||||
m_generalUi->languageComboBox->clear();
|
m_generalUi->languageComboBox->clear();
|
||||||
@ -190,6 +191,8 @@ void SettingsWidget::saveSettings()
|
|||||||
m_generalUi->ignoreGroupExpansionCheckBox->isChecked());
|
m_generalUi->ignoreGroupExpansionCheckBox->isChecked());
|
||||||
config()->set("AutoTypeEntryTitleMatch",
|
config()->set("AutoTypeEntryTitleMatch",
|
||||||
m_generalUi->autoTypeEntryTitleMatchCheckBox->isChecked());
|
m_generalUi->autoTypeEntryTitleMatchCheckBox->isChecked());
|
||||||
|
config()->set("AutoTypeEntryURLMatch",
|
||||||
|
m_generalUi->autoTypeEntryURLMatchCheckBox->isChecked());
|
||||||
int currentLangIndex = m_generalUi->languageComboBox->currentIndex();
|
int currentLangIndex = m_generalUi->languageComboBox->currentIndex();
|
||||||
|
|
||||||
config()->set("GUI/Language", m_generalUi->languageComboBox->itemData(currentLangIndex).toString());
|
config()->set("GUI/Language", m_generalUi->languageComboBox->itemData(currentLangIndex).toString());
|
||||||
|
@ -303,7 +303,14 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="autoTypeEntryTitleMatchCheckBox">
|
<widget class="QCheckBox" name="autoTypeEntryTitleMatchCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use entry title and URL to match windows for global Auto-Type</string>
|
<string>Use entry title to match windows for global Auto-Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="autoTypeEntryURLMatchCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use entry URL to match windows for global Auto-Type</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user