From 9b8dbcecfbab7e7492e05f5e0ae22a2631335718 Mon Sep 17 00:00:00 2001 From: Parnassius Date: Mon, 1 Apr 2024 21:00:53 +0200 Subject: [PATCH] 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 --- src/vorta/tray_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vorta/tray_menu.py b/src/vorta/tray_menu.py index e5a154d6..b9d5ac74 100644 --- a/src/vorta/tray_menu.py +++ b/src/vorta/tray_menu.py @@ -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: