-
Notifications
You must be signed in to change notification settings - Fork 131
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
Sort profiles in the Backup Now tray menu #1899
Sort profiles in the Backup Now tray menu #1899
Conversation
Thank you for the work! Why should the profiles be sorted differently from the profile list within Vorta? |
They indeed shouldn't, the list in the main window is already sorted alphabetically, see here: vorta/src/vorta/views/main_window.py Lines 163 to 168 in bde5518
This PR applies the same ordering logic to the list in the tray menu as well |
Thanks, I wasn't aware of that. When testing it wasn't sorted, now I noticed that it actually is, but only after a restart. Additionally the default profile always appears on top. |
Yeah, I should have specified that in the original message, sorry about the confusion.
It seems that newly created profiles are indeed always added at the bottom of the list, I could try to tackle that in another PR in the next few days.
It does that for you? I'm unable to test this branch right now, but for me on the latest release (0.9.1) it is sorted like any other profile. Note that the sorting is case-sensitive, could it be that your other profiles start with lower case letters? |
I see, that is indeed the reason. Despite coding for many years I wasn't aware that |
The profile list in the main window is already sorted by name (alphabetically, case-sensitive). However the profile list in the *Backup Now* action found in the tray menu wasn't. This commit constructs the sql query to return the profiles in order. * src/vorta/tray_menu.py
Description
This sorts the profile names alphabetically in the
Backup Now
item of the tray menu.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.