Merge branch 'release/2.2.1' into develop

This commit is contained in:
Janek Bevendorff 2017-07-01 10:09:06 +02:00
commit 6e44eed9fe
No known key found for this signature in database
GPG Key ID: CFEC2F6850BFFA53
10 changed files with 209 additions and 193 deletions

View File

@ -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 = 0; m_autoTypeDelay = config()->get("AutoTypeDelay").toInt();
for (const QChar& ch : sequence) { for (const QChar& ch : sequence) {

View File

@ -499,14 +499,12 @@ void AutoTypeExecutorMac::execChar(AutoTypeChar* action)
{ {
m_platform->sendChar(action->character, true); m_platform->sendChar(action->character, true);
m_platform->sendChar(action->character, false); m_platform->sendChar(action->character, false);
usleep(25 * 1000);
} }
void AutoTypeExecutorMac::execKey(AutoTypeKey* action) void AutoTypeExecutorMac::execKey(AutoTypeKey* action)
{ {
m_platform->sendKey(action->key, true); m_platform->sendKey(action->key, true);
m_platform->sendKey(action->key, false); m_platform->sendKey(action->key, false);
usleep(25 * 1000);
} }
void AutoTypeExecutorMac::execClearField(AutoTypeClearField* action = nullptr) void AutoTypeExecutorMac::execClearField(AutoTypeClearField* action = nullptr)

View File

@ -522,14 +522,12 @@ void AutoTypeExecutorWin::execChar(AutoTypeChar* action)
{ {
m_platform->sendChar(action->character, true); m_platform->sendChar(action->character, true);
m_platform->sendChar(action->character, false); m_platform->sendChar(action->character, false);
::Sleep(25);
} }
void AutoTypeExecutorWin::execKey(AutoTypeKey* action) void AutoTypeExecutorWin::execKey(AutoTypeKey* action)
{ {
m_platform->sendKey(action->key, true); m_platform->sendKey(action->key, true);
m_platform->sendKey(action->key, false); m_platform->sendKey(action->key, false);
::Sleep(25);
} }
void AutoTypeExecutorWin::execClearField(AutoTypeClearField* action = nullptr) void AutoTypeExecutorWin::execClearField(AutoTypeClearField* action = nullptr)

View File

@ -641,21 +641,13 @@ int AutoTypePlatformX11::AddKeysym(KeySym keysym)
* If input focus is specified explicitly, select the window * If input focus is specified explicitly, select the window
* before send event to the window. * before send event to the window.
*/ */
void AutoTypePlatformX11::SendEvent(XKeyEvent* event, int event_type) void AutoTypePlatformX11::SendKeyEvent(unsigned keycode, bool press)
{ {
XSync(event->display, False); XSync(m_dpy, False);
int (*oldHandler) (Display*, XErrorEvent*) = XSetErrorHandler(MyErrorHandler); int (*oldHandler) (Display*, XErrorEvent*) = XSetErrorHandler(MyErrorHandler);
event->type = event_type; XTestFakeKeyEvent(m_dpy, keycode, press, 0);
Bool press; XFlush(m_dpy);
if (event->type == KeyPress) {
press = True;
}
else {
press = False;
}
XTestFakeKeyEvent(event->display, event->keycode, press, 0);
XFlush(event->display);
XSetErrorHandler(oldHandler); XSetErrorHandler(oldHandler);
} }
@ -664,17 +656,12 @@ void AutoTypePlatformX11::SendEvent(XKeyEvent* event, int event_type)
* Send a modifier press/release event for all modifiers * Send a modifier press/release event for all modifiers
* which are set in the mask variable. * which are set in the mask variable.
*/ */
void AutoTypePlatformX11::SendModifier(XKeyEvent *event, unsigned int mask, int event_type) void AutoTypePlatformX11::SendModifiers(unsigned int mask, bool press)
{ {
int mod_index; int mod_index;
for (mod_index = ShiftMapIndex; mod_index <= Mod5MapIndex; mod_index ++) { for (mod_index = ShiftMapIndex; mod_index <= Mod5MapIndex; mod_index ++) {
if (mask & (1 << mod_index)) { if (mask & (1 << mod_index)) {
event->keycode = m_modifier_keycode[mod_index]; SendKeyEvent(m_modifier_keycode[mod_index], press);
SendEvent(event, event_type);
if (event_type == KeyPress)
event->state |= (1 << mod_index);
else
event->state &= (1 << mod_index);
} }
} }
} }
@ -729,43 +716,15 @@ bool AutoTypePlatformX11::keysymModifiers(KeySym keysym, int keycode, unsigned i
* window to simulate keyboard. If modifiers (shift, control, etc) * window to simulate keyboard. If modifiers (shift, control, etc)
* are set ON, many events will be sent. * are set ON, many events will be sent.
*/ */
void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym) void AutoTypePlatformX11::SendKey(KeySym keysym, unsigned int modifiers)
{ {
SendKey(keysym,true);
SendKey(keysym,false);
}
void AutoTypePlatformX11::SendKey(KeySym keysym, bool isKeyDown)
{
Window cur_focus;
int revert_to;
XKeyEvent event;
int keycode;
if (keysym == NoSymbol) { if (keysym == NoSymbol) {
qWarning("No such key: keysym=0x%lX", keysym); qWarning("No such key: keysym=0x%lX", keysym);
return; return;
} }
XGetInputFocus(m_dpy, &cur_focus, &revert_to); int keycode;
unsigned int wanted_mask;
event.display = m_dpy;
event.window = cur_focus;
event.root = m_rootWindow;
event.subwindow = None;
event.time = CurrentTime;
event.x = 1;
event.y = 1;
event.x_root = 1;
event.y_root = 1;
event.same_screen = True;
Window root, child;
int root_x, root_y, x, y;
unsigned int wanted_mask = 0;
unsigned int original_mask;
XQueryPointer(m_dpy, event.root, &root, &child, &root_x, &root_y, &x, &y, &original_mask);
/* determine keycode and mask for the given keysym */ /* determine keycode and mask for the given keysym */
keycode = GetKeycode(keysym, &wanted_mask); keycode = GetKeycode(keysym, &wanted_mask);
@ -773,8 +732,14 @@ void AutoTypePlatformX11::SendKey(KeySym keysym, bool isKeyDown)
qWarning("Unable to get valid keycode for key: keysym=0x%lX", keysym); qWarning("Unable to get valid keycode for key: keysym=0x%lX", keysym);
return; return;
} }
wanted_mask |= modifiers;
event.state = original_mask; Window root, child;
int root_x, root_y, x, y;
unsigned int original_mask;
XSync(m_dpy, False);
XQueryPointer(m_dpy, m_rootWindow, &root, &child, &root_x, &root_y, &x, &y, &original_mask);
// modifiers that need to be pressed but aren't // modifiers that need to be pressed but aren't
unsigned int press_mask = wanted_mask & ~original_mask; unsigned int press_mask = wanted_mask & ~original_mask;
@ -785,6 +750,7 @@ void AutoTypePlatformX11::SendKey(KeySym keysym, bool isKeyDown)
// modifiers we need to release before sending the keycode // modifiers we need to release before sending the keycode
unsigned int release_mask = 0; unsigned int release_mask = 0;
if (!modifiers) {
// check every release_check_mask individually if it affects the keysym we would generate // check every release_check_mask individually if it affects the keysym we would generate
// if it doesn't we probably don't need to release it // if it doesn't we probably don't need to release it
for (int mod_index = ShiftMapIndex; mod_index <= Mod5MapIndex; mod_index ++) { for (int mod_index = ShiftMapIndex; mod_index <= Mod5MapIndex; mod_index ++) {
@ -807,25 +773,29 @@ void AutoTypePlatformX11::SendKey(KeySym keysym, bool isKeyDown)
// oh well, release all the modifiers we don't want // oh well, release all the modifiers we don't want
release_mask = release_check_mask; release_mask = release_check_mask;
} }
/* release all modifiers */
SendModifier(&event, release_mask, KeyRelease);
SendModifier(&event, press_mask, KeyPress);
/* press and release key */
event.keycode = keycode;
if (isKeyDown) {
SendEvent(&event, KeyPress);
} else { } else {
SendEvent(&event, KeyRelease); release_mask = release_check_mask;
} }
/* release the modifiers */ /* set modifiers mask */
SendModifier(&event, press_mask, KeyRelease); if ((release_mask | press_mask) & LockMask) {
SendModifiers(LockMask, true);
SendModifiers(LockMask, false);
}
SendModifiers(release_mask & ~LockMask, false);
SendModifiers(press_mask & ~LockMask, true);
/* restore the old keyboard mask */ /* press and release release key */
SendModifier(&event, release_mask, KeyPress); SendKeyEvent(keycode, true);
SendKeyEvent(keycode, false);
/* restore previous modifiers mask */
SendModifiers(press_mask & ~LockMask, false);
SendModifiers(release_mask & ~LockMask, true);
if ((release_mask | press_mask) & LockMask) {
SendModifiers(LockMask, true);
SendModifiers(LockMask, false);
}
} }
int AutoTypePlatformX11::MyErrorHandler(Display* my_dpy, XErrorEvent* event) int AutoTypePlatformX11::MyErrorHandler(Display* my_dpy, XErrorEvent* event)
@ -848,14 +818,12 @@ AutoTypeExecutorX11::AutoTypeExecutorX11(AutoTypePlatformX11* platform)
void AutoTypeExecutorX11::execChar(AutoTypeChar* action) void AutoTypeExecutorX11::execChar(AutoTypeChar* action)
{ {
m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character)); m_platform->SendKey(m_platform->charToKeySym(action->character));
Tools::wait(25);
} }
void AutoTypeExecutorX11::execKey(AutoTypeKey* action) void AutoTypeExecutorX11::execKey(AutoTypeKey* action)
{ {
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key)); m_platform->SendKey(m_platform->keyToKeySym(action->key));
Tools::wait(25);
} }
void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr) void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr)
@ -866,19 +834,13 @@ void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr)
ts.tv_sec = 0; ts.tv_sec = 0;
ts.tv_nsec = 25 * 1000 * 1000; ts.tv_nsec = 25 * 1000 * 1000;
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), true); m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Home), static_cast<unsigned int>(ControlMask));
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_Home));
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), false);
nanosleep(&ts, nullptr); nanosleep(&ts, nullptr);
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), true); m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_End), static_cast<unsigned int>(ControlMask | ShiftMask));
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Shift), true);
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_End));
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Shift), false);
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), false);
nanosleep(&ts, nullptr); nanosleep(&ts, nullptr);
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_Backspace)); m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Backspace));
nanosleep(&ts, nullptr); nanosleep(&ts, nullptr);
} }

View File

@ -58,8 +58,7 @@ public:
KeySym charToKeySym(const QChar& ch); KeySym charToKeySym(const QChar& ch);
KeySym keyToKeySym(Qt::Key key); KeySym keyToKeySym(Qt::Key key);
void SendKeyPressedEvent(KeySym keysym); void SendKey(KeySym keysym, unsigned int modifiers = 0);
void SendKey(KeySym keysym, bool isKeyDown);
signals: signals:
void globalShortcutTriggered(); void globalShortcutTriggered();
@ -80,8 +79,8 @@ private:
bool isRemapKeycodeValid(); bool isRemapKeycodeValid();
int AddKeysym(KeySym keysym); int AddKeysym(KeySym keysym);
void AddModifier(KeySym keysym); void AddModifier(KeySym keysym);
void SendEvent(XKeyEvent* event, int event_type); void SendKeyEvent(unsigned keycode, bool press);
void SendModifier(XKeyEvent *event, unsigned int mask, int event_type); void SendModifiers(unsigned int mask, bool press);
int GetKeycode(KeySym keysym, unsigned int *mask); int GetKeycode(KeySym keysym, unsigned int *mask);
bool keysymModifiers(KeySym keysym, int keycode, unsigned int *mask); bool keysymModifiers(KeySym keysym, int keycode, unsigned int *mask);

View File

@ -119,6 +119,7 @@ void Config::init(const QString& fileName)
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("AutoTypeEntryURLMatch", 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);

View File

@ -2,30 +2,10 @@
<ui version="4.0"> <ui version="4.0">
<class>AboutDialog</class> <class>AboutDialog</class>
<widget class="QDialog" name="AboutDialog"> <widget class="QDialog" name="AboutDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
<height>450</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>450</width>
<height>450</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>About KeePassXC</string> <string>About KeePassXC</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1,0">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin"> <property name="topMargin">
@ -71,7 +51,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">&lt;span style=&quot;font-size: 24pt&quot;&gt; KeePassXC v${VERSION}&lt;/span&gt;</string> <string notr="true">&lt;span style=&quot;font-size: 20pt&quot;&gt; KeePassXC ${VERSION}&lt;/span&gt;</string>
</property> </property>
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
@ -102,7 +82,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Website: &lt;a href=&quot;https://keepassxc.org/&quot;&gt;&lt;span style=&quot;text-decoration: underline; color:#0000ff;&quot;&gt;https://keepassxc.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string notr="true">Website: &lt;a href=&quot;https://keepassxc.org/&quot; style=&quot;text-decoration: underline&quot;&gt;https://keepassxc.org&lt;/a&gt;</string>
</property> </property>
<property name="openExternalLinks"> <property name="openExternalLinks">
<bool>true</bool> <bool>true</bool>
@ -112,7 +92,7 @@
<item> <item>
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Report bugs at: &lt;a href=&quot;https://github.com/keepassxreboot/keepassxc/issues&quot;&gt;&lt;span style=&quot;text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>Report bugs at: &lt;a href=&quot;https://github.com/keepassxreboot/keepassxc/issues&quot; style=&quot;text-decoration: underline;&quot;&gt;https://github.com&lt;/a&gt;</string>
</property> </property>
<property name="openExternalLinks"> <property name="openExternalLinks">
<bool>true</bool> <bool>true</bool>
@ -138,13 +118,13 @@
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;KeePassXC is distributed under the terms of the GNU General Public License (GPL) version 2 or (at your option) version 3.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>KeePassXC is distributed under the terms of the GNU General Public License (GPL) version 2 or (at your option) version 3.</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
@ -167,6 +147,13 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Project Maintainers:</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="sizePolicy"> <property name="sizePolicy">
@ -176,7 +163,14 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head&gt;&lt;style&gt;li {font-size: 10pt}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Project Maintainers:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;droidmonkey&lt;/li&gt;&lt;li&gt;phoerious&lt;/li&gt;&lt;li&gt;TheZ3ro&lt;/li&gt;&lt;li&gt;louib&lt;/li&gt;&lt;li&gt;Weslly&lt;/li&gt;&lt;li&gt;debfx (KeePassX)&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string> <string notr="true">&lt;ul&gt;
&lt;li&gt;droidmonkey&lt;/li&gt;
&lt;li&gt;phoerious&lt;/li&gt;
&lt;li&gt;TheZ3ro&lt;/li&gt;
&lt;li&gt;louib&lt;/li&gt;
&lt;li&gt;Weslly&lt;/li&gt;
&lt;li&gt;debfx (KeePassX)&lt;/li&gt;
&lt;/ul&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -201,45 +195,81 @@
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QTextEdit" name="contributors"> <widget class="QScrollArea" name="scrollArea">
<property name="html"> <property name="widgetResizable">
<string>&lt;html&gt;&lt;body&gt; <bool>true</bool>
&lt;p style=&quot;font-size:x-large; font-weight:600;&quot;&gt;Code:&lt;/p&gt;
&lt;ul&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;debfx (KeePassX)&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;BlueIce (KeePassX)&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;droidmonkey&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;phoerious&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;TheZ3ro&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;louib&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;weslly&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;keithbennett (KeePassHTTP)&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;Typz (KeePassHTTP)&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;denk-mal (KeePassHTTP)&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;kylemanna (YubiKey)&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;seatedscribe (CSV Importer)&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;pgalves (Inline Messages)&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;font-size:x-large; font-weight:600;&quot;&gt;Translations:&lt;/p&gt;
&lt;ul&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Chinese:&lt;/span&gt; Biggulu, ligyxy, BestSteve&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Czech:&lt;/span&gt; pavelb, JosefVitu&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Dutch:&lt;/span&gt; Vistaus, KnooL, apie&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Finnish:&lt;/span&gt; MawKKe&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;French:&lt;/span&gt; Scrat15, frgnca, gilbsgilbs, gtalbot, iannick, kyodev, logut&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;German:&lt;/span&gt; Calyrx, DavidHamburg, antsas, codejunky, jensrutschmann, montilo, omnisome4, origin_de, pcrcoding, phoerious, rgloor, vlenzer&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Greek:&lt;/span&gt; nplatis&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Italian:&lt;/span&gt; TheZ3ro, FranzMari, Mte90, tosky&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Kazakh:&lt;/span&gt; sotrud_nik&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Lithuanian:&lt;/span&gt; Moo&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Polish:&lt;/span&gt; konradmb, mrerexx&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Portuguese: &lt;/span&gt;vitor895, weslly, American_Jesus, mihai.ile&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Russian:&lt;/span&gt; vsvyatski, KekcuHa, wkill95&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Spanish:&lt;/span&gt; EdwardNavarro, antifaz, piegope, pquin, vsvyatski&lt;/li&gt;
&lt;li style=&quot;font-size:10pt&quot;&gt;&lt;span style=&quot;font-weight:600;&quot;&gt;Swedish:&lt;/span&gt; henziger&lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>418</width>
<height>848</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="contributors">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string notr="true">&lt;h2&gt;Code:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;debfx (KeePassX) &lt;/li&gt;
&lt;li&gt;BlueIce (KeePassX) &lt;/li&gt;
&lt;li&gt;droidmonkey &lt;/li&gt;
&lt;li&gt;phoerious &lt;/li&gt;
&lt;li&gt;TheZ3ro &lt;/li&gt;
&lt;li&gt;louib &lt;/li&gt;
&lt;li &gt;weslly &lt;/li&gt;
&lt;li&gt;keithbennett (KeePassHTTP) &lt;/li&gt;
&lt;li&gt;Typz (KeePassHTTP) &lt;/li&gt;
&lt;li&gt;denk-mal (KeePassHTTP) &lt;/li&gt;
&lt;li&gt;kylemanna (YubiKey) &lt;/li&gt;
&lt;li&gt;seatedscribe (CSV Importer) &lt;/li&gt;
&lt;li&gt;pgalves (Inline Messages) &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Translations:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Chinese:&lt;/b&gt; Biggulu, ligyxy, BestSteve &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Czech:&lt;/b&gt; pavelb, JosefVitu &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Dutch:&lt;/b&gt; Vistaus, KnooL, apie &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Finnish:&lt;/b&gt; MawKKe &lt;/li&gt;
&lt;li&gt;&lt;b&gt;French:&lt;/b&gt; Scrat15, frgnca, gilbsgilbs, gtalbot, iannick, kyodev, logut &lt;/li&gt;
&lt;li&gt;&lt;b&gt;German:&lt;/b&gt; Calyrx, DavidHamburg, antsas, codejunky, jensrutschmann, montilo, omnisome4, origin_de, pcrcoding, phoerious, rgloor, vlenzer &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Greek:&lt;/b&gt; nplatis &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Italian:&lt;/b&gt; TheZ3ro, FranzMari, Mte90, tosky &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Kazakh:&lt;/b&gt; sotrud_nik &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Lithuanian:&lt;/b&gt; Moo &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Polish:&lt;/b&gt; konradmb, mrerexx &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Portuguese: &lt;/b&gt;vitor895, weslly, American_Jesus, mihai.ile &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Russian:&lt;/b&gt; vsvyatski, KekcuHa, wkill95 &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Spanish:&lt;/b&gt; EdwardNavarro, antifaz, piegope, pquin, vsvyatski &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Swedish:&lt;/b&gt; henziger &lt;/li&gt;
&lt;/ul&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item> <item>
@ -268,21 +298,21 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Include the following information whenever you report a bug:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>Include the following information whenever you report a bug:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPlainTextEdit" name="debugInfo"> <widget class="QPlainTextEdit" name="debugInfo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="plainText">
<string notr="true"/>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>

View File

@ -552,8 +552,14 @@ void MainWindow::updateWindowTitle()
QString customWindowTitlePart; QString customWindowTitlePart;
int stackedWidgetIndex = m_ui->stackedWidget->currentIndex(); int stackedWidgetIndex = m_ui->stackedWidget->currentIndex();
int tabWidgetIndex = m_ui->tabWidget->currentIndex(); int tabWidgetIndex = m_ui->tabWidget->currentIndex();
bool isModified = m_ui->tabWidget->isModified(tabWidgetIndex);
if (stackedWidgetIndex == DatabaseTabScreen && tabWidgetIndex != -1) { if (stackedWidgetIndex == DatabaseTabScreen && tabWidgetIndex != -1) {
customWindowTitlePart = m_ui->tabWidget->tabText(tabWidgetIndex); customWindowTitlePart = m_ui->tabWidget->tabText(tabWidgetIndex);
if (isModified) {
// remove asterisk '*' from title
customWindowTitlePart.remove(customWindowTitlePart.size() - 1, 1);
}
if (m_ui->tabWidget->readOnly(tabWidgetIndex)) { if (m_ui->tabWidget->readOnly(tabWidgetIndex)) {
customWindowTitlePart.append(QString(" [%1]").arg(tr("read-only"))); customWindowTitlePart.append(QString(" [%1]").arg(tr("read-only")));
} }
@ -565,7 +571,7 @@ void MainWindow::updateWindowTitle()
if (customWindowTitlePart.isEmpty()) { if (customWindowTitlePart.isEmpty()) {
windowTitle = BaseWindowTitle; windowTitle = BaseWindowTitle;
} else { } else {
windowTitle = QString("%1 - %2").arg(customWindowTitlePart, BaseWindowTitle); windowTitle = QString("%1[*] - %2").arg(customWindowTitlePart, BaseWindowTitle);
} }
if (customWindowTitlePart.isEmpty() || stackedWidgetIndex == 1) { if (customWindowTitlePart.isEmpty() || stackedWidgetIndex == 1) {
@ -574,7 +580,7 @@ void MainWindow::updateWindowTitle()
setWindowFilePath(m_ui->tabWidget->databasePath(tabWidgetIndex)); setWindowFilePath(m_ui->tabWidget->databasePath(tabWidgetIndex));
} }
setWindowModified(m_ui->tabWidget->isModified(tabWidgetIndex)); setWindowModified(isModified);
setWindowTitle(windowTitle); setWindowTitle(windowTitle);
} }

View File

@ -142,6 +142,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());
} }
@ -208,6 +209,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());

View File

@ -325,27 +325,18 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QFormLayout" name="formLayout_2">
<property name="spacing"> <property name="topMargin">
<number>15</number> <number>10</number>
</property>
<item alignment="Qt::AlignRight">
<widget class="QLabel" name="autoTypeShortcutLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<item row="1" column="0">
<widget class="QLabel" name="autoTypeShortcutLabel_2">
<property name="text"> <property name="text">
<string>Global Auto-Type shortcut</string> <string>Global Auto-Type shortcut</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignLeading</set>
</property>
</widget> </widget>
</item> </item>
<item> <item row="1" 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">
@ -355,6 +346,35 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="autoTypeDelayLabel_2">
<property name="text">
<string>Auto-Type delay</string>
</property>
</widget>
</item>
<item row="2" column="1">
<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>
</layout> </layout>
</item> </item>
<item> <item>