mirror of
https://github.com/borgbase/vorta
synced 2025-01-31 11:51:34 +00:00
Improve display of scheduler times after wakeup from hibernation. Fixes #8
This commit is contained in:
parent
2d9e73bc3e
commit
7bb320f281
5 changed files with 8 additions and 2 deletions
|
@ -59,3 +59,5 @@ def backup_started_event_response(self):
|
|||
def backup_finished_event_response(self):
|
||||
icon = QIcon(get_asset('icons/hdd-o.png'))
|
||||
self.tray.setIcon(icon)
|
||||
self.main_window.scheduleTab._draw_next_scheduled_backup()
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ def reload(self):
|
|||
|
||||
@property
|
||||
def next_job(self):
|
||||
self.wakeup()
|
||||
self._process_jobs()
|
||||
jobs = []
|
||||
for job in self.get_jobs():
|
||||
jobs.append((job.next_run_time, job.id))
|
||||
|
@ -55,6 +57,7 @@ def next_job(self):
|
|||
return 'None scheduled'
|
||||
|
||||
def next_job_for_profile(self, profile_id):
|
||||
self.wakeup()
|
||||
job = self.get_job(str(profile_id))
|
||||
if job is None:
|
||||
return 'None scheduled'
|
||||
|
|
|
@ -66,7 +66,7 @@ def choose_folder_dialog(parent, title):
|
|||
options = QFileDialog.Options()
|
||||
options |= QFileDialog.ShowDirsOnly
|
||||
# options |= QFileDialog.DontUseNativeDialog
|
||||
dialog = QFileDialog(parent, title, "", options=options)
|
||||
dialog = QFileDialog(parent, title, os.path.expanduser('~'), options=options)
|
||||
# dialog.setWindowModality(QtCore.Qt.WindowModal)
|
||||
dialog.setParent(parent, QtCore.Qt.Sheet)
|
||||
# dialog.setResult(0)
|
||||
|
|
|
@ -33,6 +33,7 @@ def __init__(self, parent=None):
|
|||
|
||||
self.repoTab.repo_changed.connect(self.snapshotTab.populate_from_profile)
|
||||
self.repoTab.repo_added.connect(self.snapshotTab.list_action)
|
||||
self.tabWidget.currentChanged.connect(self.scheduleTab._draw_next_scheduled_backup)
|
||||
|
||||
self.createStartBtn.clicked.connect(self.app.create_backup_action)
|
||||
self.cancelButton.clicked.connect(self.app.backup_cancelled_event.emit)
|
||||
|
|
|
@ -55,7 +55,7 @@ def _toggle_all_buttons(self, enabled=True):
|
|||
|
||||
def populate_from_profile(self):
|
||||
profile = self.profile()
|
||||
if profile.repo:
|
||||
if profile.repo is not None:
|
||||
self.currentRepoLabel.setText(profile.repo.url)
|
||||
snapshots = [s for s in profile.repo.snapshots.select()]
|
||||
|
||||
|
|
Loading…
Reference in a new issue