Skip to content

Commit

Permalink
Sort profiles in the Backup Now tray menu (borgbase#1899)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Parnassius authored and shivansh02 committed Jun 7, 2024
1 parent f3b656d commit b2bf5ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vorta/tray_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b2bf5ad

Please sign in to comment.