1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-21 23:33:13 +00:00

Sort profiles in the Backup Now tray menu (#1899)

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
This commit is contained in:
Parnassius 2024-04-01 21:00:53 +02:00 committed by GitHub
parent bde55188e4
commit 9b8dbcecfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,7 +59,7 @@ def build_menu(self):
cancel_action.triggered.connect(self.app.backup_cancelled_event.emit)
else:
status.setText(self.tr('Next Task: %s') % next_task_time)
profiles = BackupProfileModel.select()
profiles = BackupProfileModel.select().order_by(BackupProfileModel.name)
if profiles.count() > 1:
profile_menu = menu.addMenu(self.tr('Backup Now'))
for profile in profiles: