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:
parent
efeac8fad1
commit
99d8fa2d1e
2 changed files with 9 additions and 3 deletions
|
@ -36,8 +36,8 @@ def reload(self):
|
||||||
changed = True
|
changed = True
|
||||||
elif self.get_job(job_id) is not None and trigger is None:
|
elif self.get_job(job_id) is not None and trigger is None:
|
||||||
self.remove_job(job_id)
|
self.remove_job(job_id)
|
||||||
changed = True
|
|
||||||
|
|
||||||
|
if changed:
|
||||||
notifier = VortaNotifications.pick()()
|
notifier = VortaNotifications.pick()()
|
||||||
notifier.deliver('Vorta Scheduler', 'New schedule was successfully applied.')
|
notifier.deliver('Vorta Scheduler', 'New schedule was successfully applied.')
|
||||||
|
|
||||||
|
|
|
@ -50,3 +50,9 @@ def on_user_click(self):
|
||||||
self.status.setText(f'Next Task: {self.app.scheduler.next_job}')
|
self.status.setText(f'Next Task: {self.app.scheduler.next_job}')
|
||||||
self.profile_menu.setEnabled(True)
|
self.profile_menu.setEnabled(True)
|
||||||
self.cancel_action.setVisible(False)
|
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))
|
||||||
|
|
Loading…
Reference in a new issue