From d78e5b7b40a44fdc3cfab3bf1d6f7f1dde7f6769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 5 May 2014 02:15:37 +0200 Subject: [PATCH] Workaround KDE notification, which ignores '\n' (#844) --- qubesmanager/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index d4ff589..0536b54 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -746,7 +746,10 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): def update_block_devices(self): res, msg = self.blk_manager.check_for_updates() if msg != None and len(msg) > 0: - str = "\n".join(msg) + if trayIcon.tray_notifier_type == "KDE": + str = "
\n".join(msg) + else: + str = "\n".join(msg) trayIcon.showMessage (str, msecs=5000) return res @@ -1561,6 +1564,8 @@ class QubesTrayIcon(QSystemTrayIcon): self.tray_notifier = QDBusInterface("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", session_bus) + srv_info = self.tray_notifier.call("GetServerInformation") + self.tray_notifier_type = srv_info.arguments()[1] def update_blk_menu(self): global manager_window @@ -1882,7 +1887,7 @@ def main(): show_manager() app.exec_() - + lock.remove_pidfile() trayIcon = None