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

Update profile names on menu open. Fixes #18

This commit is contained in:
Manu 2018-11-20 09:04:11 +08:00
parent efeac8fad1
commit 99d8fa2d1e
2 changed files with 9 additions and 3 deletions

View file

@ -36,8 +36,8 @@ def reload(self):
changed = True
elif self.get_job(job_id) is not None and trigger is None:
self.remove_job(job_id)
changed = True
if changed:
notifier = VortaNotifications.pick()()
notifier.deliver('Vorta Scheduler', 'New schedule was successfully applied.')

View file

@ -50,3 +50,9 @@ def on_user_click(self):
self.status.setText(f'Next Task: {self.app.scheduler.next_job}')
self.profile_menu.setEnabled(True)
self.cancel_action.setVisible(False)
self.profile_menu.clear()
for profile in BackupProfileModel.select():
new_item = self.profile_menu.addAction(profile.name)
new_item.setData(profile.id)
new_item.triggered.connect(lambda profile_id=profile.id: self.app.create_backup_action(profile_id))