From 507b9b149e0e32c60ae50bfcc2293ce9f88f3c57 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 25 Nov 2009 21:36:51 +0000 Subject: [PATCH] - No need for systray integration to be enabled to use libnotify --- src/GUI.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index 831750240..d045a5aa0 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -803,7 +803,7 @@ void GUI::updateGUI() { void GUI::showNotificationBaloon(QString title, QString msg) const { QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - if(systrayIcon && settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool()) { + if(settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool()) { #ifdef WITH_LIBNOTIFY if (notify_init ("summary-body")) { NotifyNotification* notification; @@ -815,7 +815,8 @@ void GUI::showNotificationBaloon(QString title, QString msg) const { return; } #else - systrayIcon->showMessage(title, msg, QSystemTrayIcon::Information, TIME_TRAY_BALLOON); + if(systrayIcon) + systrayIcon->showMessage(title, msg, QSystemTrayIcon::Information, TIME_TRAY_BALLOON); #endif } }