mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-28 10:31:13 -05:00
Add UI to configure default auto-type delay
This commit is contained in:
parent
4ecd9e7e23
commit
1158294323
4 changed files with 41 additions and 6 deletions
|
|
@ -317,7 +317,7 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
|
||||||
{
|
{
|
||||||
QString tmpl;
|
QString tmpl;
|
||||||
bool inTmpl = false;
|
bool inTmpl = false;
|
||||||
m_autoTypeDelay = 25;
|
m_autoTypeDelay = config()->get("AutoTypeDelay").toInt();
|
||||||
|
|
||||||
|
|
||||||
for (const QChar& ch : sequence) {
|
for (const QChar& ch : sequence) {
|
||||||
|
|
|
||||||
|
|
@ -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("AutoTypeDelay", 25);
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ void SettingsWidget::loadSettings()
|
||||||
if (m_globalAutoTypeKey > 0 && m_globalAutoTypeModifiers > 0) {
|
if (m_globalAutoTypeKey > 0 && m_globalAutoTypeModifiers > 0) {
|
||||||
m_generalUi->autoTypeShortcutWidget->setShortcut(m_globalAutoTypeKey, m_globalAutoTypeModifiers);
|
m_generalUi->autoTypeShortcutWidget->setShortcut(m_globalAutoTypeKey, m_globalAutoTypeModifiers);
|
||||||
}
|
}
|
||||||
|
m_generalUi->autoTypeDelaySpinBox->setValue(config()->get("AutoTypeDelay").toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -205,6 +206,7 @@ void SettingsWidget::saveSettings()
|
||||||
config()->set("GlobalAutoTypeKey", m_generalUi->autoTypeShortcutWidget->key());
|
config()->set("GlobalAutoTypeKey", m_generalUi->autoTypeShortcutWidget->key());
|
||||||
config()->set("GlobalAutoTypeModifiers",
|
config()->set("GlobalAutoTypeModifiers",
|
||||||
static_cast<int>(m_generalUi->autoTypeShortcutWidget->modifiers()));
|
static_cast<int>(m_generalUi->autoTypeShortcutWidget->modifiers()));
|
||||||
|
config()->set("AutoTypeDelay", m_generalUi->autoTypeDelaySpinBox->value());
|
||||||
}
|
}
|
||||||
config()->set("security/clearclipboard", m_secUi->clearClipboardCheckBox->isChecked());
|
config()->set("security/clearclipboard", m_secUi->clearClipboardCheckBox->isChecked());
|
||||||
config()->set("security/clearclipboardtimeout", m_secUi->clearClipboardSpinBox->value());
|
config()->set("security/clearclipboardtimeout", m_secUi->clearClipboardSpinBox->value());
|
||||||
|
|
|
||||||
|
|
@ -318,11 +318,43 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="spacing">
|
<property name="horizontalSpacing">
|
||||||
<number>15</number>
|
<number>12</number>
|
||||||
</property>
|
</property>
|
||||||
<item alignment="Qt::AlignRight">
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="autoTypeDelayLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto-Type delay</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" alignment="Qt::AlignLeft">
|
||||||
|
<widget class="QSpinBox" name="autoTypeDelaySpinBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> ms</string>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>999</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>25</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" alignment="Qt::AlignRight">
|
||||||
<widget class="QLabel" name="autoTypeShortcutLabel">
|
<widget class="QLabel" name="autoTypeShortcutLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
|
@ -338,7 +370,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<widget class="ShortcutWidget" name="autoTypeShortcutWidget">
|
<widget class="ShortcutWidget" name="autoTypeShortcutWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue