mirror of https://github.com/borgbase/vorta
Update profile names on menu open. Fixes #18
This commit is contained in:
parent
efeac8fad1
commit
99d8fa2d1e
|
@ -36,10 +36,10 @@ class VortaScheduler(QtScheduler):
|
|||
changed = True
|
||||
elif self.get_job(job_id) is not None and trigger is None:
|
||||
self.remove_job(job_id)
|
||||
changed = True
|
||||
|
||||
notifier = VortaNotifications.pick()()
|
||||
notifier.deliver('Vorta Scheduler', 'New schedule was successfully applied.')
|
||||
if changed:
|
||||
notifier = VortaNotifications.pick()()
|
||||
notifier.deliver('Vorta Scheduler', 'New schedule was successfully applied.')
|
||||
|
||||
@property
|
||||
def next_job(self):
|
||||
|
|
|
@ -50,3 +50,9 @@ class TrayMenu(QSystemTrayIcon):
|
|||
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))
|
||||
|
|
Loading…
Reference in New Issue