mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Add UI to configure default auto-type delay
This commit is contained in:
parent
4ecd9e7e23
commit
1158294323
@ -317,7 +317,7 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
|
||||
{
|
||||
QString tmpl;
|
||||
bool inTmpl = false;
|
||||
m_autoTypeDelay = 25;
|
||||
m_autoTypeDelay = config()->get("AutoTypeDelay").toInt();
|
||||
|
||||
|
||||
for (const QChar& ch : sequence) {
|
||||
|
@ -118,6 +118,7 @@ void Config::init(const QString& fileName)
|
||||
m_defaults.insert("MinimizeOnCopy", false);
|
||||
m_defaults.insert("UseGroupIconOnEntryCreation", false);
|
||||
m_defaults.insert("AutoTypeEntryTitleMatch", true);
|
||||
m_defaults.insert("AutoTypeDelay", 25);
|
||||
m_defaults.insert("UseGroupIconOnEntryCreation", true);
|
||||
m_defaults.insert("IgnoreGroupExpansion", false);
|
||||
m_defaults.insert("security/clearclipboard", true);
|
||||
|
@ -141,6 +141,7 @@ void SettingsWidget::loadSettings()
|
||||
if (m_globalAutoTypeKey > 0 && m_globalAutoTypeModifiers > 0) {
|
||||
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("GlobalAutoTypeModifiers",
|
||||
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/clearclipboardtimeout", m_secUi->clearClipboardSpinBox->value());
|
||||
|
@ -318,11 +318,43 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>12</number>
|
||||
</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">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
@ -338,7 +370,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ShortcutWidget" name="autoTypeShortcutWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
|
Loading…
Reference in New Issue
Block a user