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
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ class TrayMenu(QSystemTrayIcon):
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: