-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open previously opened databases in correct order #774
Conversation
I don't really find anything wrong with current behaviour, it seems natural
to me. But that may be just me.
…On Sun 16 Jul, 2017, 04:04 Michael Lass, ***@***.***> wrote:
Description
In LastOpenedDatabases, the most recently opened file is listed first and
the
least recently opened one is listed last. If the databases are re-opened
in this
order, LastOpenedDatabases is reversed afterwards. To avoid this, load the
files
in reverse order, so LastOpenedDatabases is not modified.
Motivation and context
Currently, with each start of KeePassXC, the order of the tabs which
represent previously opened databases gets reversed. This can be easily
reproduced:
1. Open at least two databases
2. Close and open KeePassXC repeatedly, observe order of tabs
How has this been tested?
The change is rather minimal and easy to review. Testing was done in two
ways:
- make test was run and 100% tests passed
- fix of the behavior described above was tested manually by
repeatedly opening the application and looking at values stored in
keepassxc.ini.
Types of changes
- ✅ Bug fix (non-breaking change which fixes an issue)
Checklist:
- ✅ I have read the *CONTRIBUTING* document. *[REQUIRED]*
- ✅ My code follows the code style of this project. *[REQUIRED]*
- ✅ All new and existing tests passed. *[REQUIRED]*
- ✅ I have compiled and verified my code with -DWITH_ASAN=ON.
*[REQUIRED]*
------------------------------
You can view, comment on, or merge this pull request online at:
#774
Commit Summary
- Open previously opened databases in correct order
File Changes
- *M* src/main.cpp
<https://github.com/keepassxreboot/keepassxc/pull/774/files#diff-0>
(3)
Patch Links:
- https://github.com/keepassxreboot/keepassxc/pull/774.patch
- https://github.com/keepassxreboot/keepassxc/pull/774.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#774>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABnL8Glm9F13AenNifQaZNJmT_vDJNt5ks5sOT5lgaJpZM4OZJLw>
.
|
I guess an optimal solution would behave like nearly every other application that uses tabs: After closing and reopening the application, all tabs are restored in the same order and the same tab is active as before (regardless of its position). This would require an additional property in keepassxc.ini for the tabs, which is distinct from the list of last opened databases. If wanted, I will try reworking this PR into this direction. Otherwise I still think this PR solves a real issue. The fact that tabs change order with each program start—even if the user doesn't actually unlock and use any of the databases—seems far from being expected behavior to me. In my personal use-case it is introduces additional klicks, as after starting KeePassXC I have to switch back to my regularly used database, since my seldomly used database is rightmost in the list of tabs and active. |
I agree with your approach you outlined above. |
Can you rebase on latest |
In LastOpenedDatabases, the most recently opened file is listed first and the least recently opened one is listed last. If the databases are re-opened in this order, LastOpenedDatabases is reversed afterwards. To avoid this, load the files in reverse order, so LastOpenedDatabases is not modified.
c41e02c
to
4c76c97
Compare
Should be rebased now (I think I confused Travis by first merging instead of rebasing...) |
@michaellass thanks for the contribution 👍 |
- Add support for KDBX 4.0, Argon2 and ChaCha20 [#148, #1179, #1230, #1494] - Add SSH Agent feature [#1098, #1450, #1463] - Add preview panel with details of the selected entry [#879, #1338] - Add more and configurable columns to entry table and allow copying of values by double click [#1305] - Add KeePassXC-Browser API as a replacement for KeePassHTTP [#608] - Deprecate KeePassHTTP [#1392] - Add support for Steam one-time passwords [#1206] - Add support for multiple Auto-Type sequences for a single entry [#1390] - Adjust YubiKey HMAC-SHA1 challenge-response key generation for KDBX 4.0 [#1060] - Replace qHttp with cURL for website icon downloads [#1460] - Remove lock file [#1231] - Add option to create backup file before saving [#1385] - Ask to save a generated password before closing the entry password generator [#1499] - Resolve placeholders recursively [#1078] - Add Auto-Type button to the toolbar [#1056] - Improve window focus handling for Auto-Type dialogs [#1204, #1490] - Auto-Type dialog and password generator can now be exited with ESC [#1252, #1412] - Add optional dark tray icon [#1154] - Add new "Unsafe saving" option to work around saving problems with file sync services [#1385] - Add IBus support to AppImage and additional image formats to Windows builds [#1534, #1537] - Add diceware password generator to CLI [#1406] - Add --key-file option to CLI [#816, #824] - Add DBus interface for opening and closing KeePassXC databases [#283] - Add KDBX compression options to database settings [#1419] - Discourage use of old fixed-length key files in favor of arbitrary files [#1326, #1327] - Correct reference resolution in entry fields [#1486] - Fix window state and recent databases not being remembered on exit [#1453] - Correct history item generation when configuring TOTP for an entry [#1446] - Correct multiple TOTP bugs [#1414] - Automatic saving after every change is now a default [#279] - Allow creation of new entries during search [#1398] - Correct menu issues on macOS [#1335] - Allow compilation on OpenBSD [#1328] - Improve entry attachments view [#1139, #1298] - Fix auto lock for Gnome and Xfce [#910, #1249] - Don't remember key files in file dialogs when the setting is disabled [#1188] - Improve database merging and conflict resolution [#807, #1165] - Fix macOS pasteboard issues [#1202] - Improve startup times on some platforms [#1205] - Hide the notes field by default [#1124] - Toggle main window by clicking tray icon with the middle mouse button [#992] - Fix custom icons not copied over when databases are merged [#1008] - Allow use of DEL key to delete entries [#914] - Correct intermittent crash due to stale history items [#1527] - Sanitize newline characters in title, username and URL fields [#1502] - Reopen previously opened databases in correct order [#774] - Use system's zxcvbn library if available [#701] - Implement various i18n improvements [#690, #875, #1436]
Description
In LastOpenedDatabases, the most recently opened file is listed first and the
least recently opened one is listed last. If the databases are re-opened in this
order, LastOpenedDatabases is reversed afterwards. To avoid this, load the files
in reverse order, so LastOpenedDatabases is not modified.
Motivation and context
Currently, with each start of KeePassXC, the order of the tabs which represent previously opened databases gets reversed. This can be easily reproduced:
How has this been tested?
The change is rather minimal and easy to review. Testing was done in two ways:
make test
was run and 100% tests passedTypes of changes
Checklist:
-DWITH_ASAN=ON
. [REQUIRED]