From ec0f19ad3079a2b85fcfdc10073e20d54df52a4c Mon Sep 17 00:00:00 2001 From: Manu <3916435+m3nu@users.noreply.github.com> Date: Tue, 2 Jun 2020 07:58:09 +0800 Subject: [PATCH] Notify of errors after system tray backup run. Fixes #105 (#483) --- src/vorta/application.py | 3 +++ src/vorta/assets/UI/sourcetab.ui | 4 ++-- src/vorta/scheduler.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vorta/application.py b/src/vorta/application.py index fedd92f3..008fa7ce 100644 --- a/src/vorta/application.py +++ b/src/vorta/application.py @@ -14,6 +14,7 @@ from vorta.scheduler import VortaScheduler from vorta.tray_menu import TrayMenu from vorta.utils import borg_compat, parse_args from vorta.views.main_window import MainWindow +from vorta.notifications import VortaNotifications APP_ID = os.path.join(STATE_DIR, "socket") @@ -80,6 +81,8 @@ class VortaApp(QtSingleApplication): thread = BorgCreateThread(msg['cmd'], msg, parent=self) thread.start() else: + notifier = VortaNotifications.pick() + notifier.deliver(self.tr('Vorta Backup'), translate('messages', msg['message']), level='error') self.backup_log_event.emit(translate('messages', msg['message'])) def open_main_window_action(self): diff --git a/src/vorta/assets/UI/sourcetab.ui b/src/vorta/assets/UI/sourcetab.ui index a5bc6b91..1480f58c 100644 --- a/src/vorta/assets/UI/sourcetab.ui +++ b/src/vorta/assets/UI/sourcetab.ui @@ -100,7 +100,7 @@ - E.g. **/.DS_Store + E.g. **/.cache @@ -113,7 +113,7 @@ - E.g. CACHE or .nobackup + E.g. .nobackup diff --git a/src/vorta/scheduler.py b/src/vorta/scheduler.py index 3900e22d..90914518 100644 --- a/src/vorta/scheduler.py +++ b/src/vorta/scheduler.py @@ -9,8 +9,8 @@ from vorta.borg.list_repo import BorgListRepoThread from vorta.borg.prune import BorgPruneThread from vorta.i18n import translate -from .models import BackupProfileModel, EventLogModel -from .notifications import VortaNotifications +from vorta.models import BackupProfileModel, EventLogModel +from vorta.notifications import VortaNotifications logger = logging.getLogger(__name__)