|
|
@ -812,12 +812,14 @@ void GUI::showNotificationBaloon(QString title, QString msg) const { |
|
|
|
if (notify_init ("summary-body")) { |
|
|
|
if (notify_init ("summary-body")) { |
|
|
|
NotifyNotification* notification; |
|
|
|
NotifyNotification* notification; |
|
|
|
notification = notify_notification_new (title.toLocal8Bit().data(), msg.toLocal8Bit().data(), "qbittorrent", 0); |
|
|
|
notification = notify_notification_new (title.toLocal8Bit().data(), msg.toLocal8Bit().data(), "qbittorrent", 0); |
|
|
|
GError* error = 0; |
|
|
|
gboolean success = notify_notification_show (notification, NULL); |
|
|
|
gboolean success = notify_notification_show (notification, &error); |
|
|
|
if(success) { |
|
|
|
|
|
|
|
g_object_unref(G_OBJECT(notification)); |
|
|
|
notify_uninit (); |
|
|
|
notify_uninit (); |
|
|
|
if(success) |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
notify_uninit (); |
|
|
|
|
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
if(systrayIcon) |
|
|
|
if(systrayIcon) |
|
|
|
systrayIcon->showMessage(title, msg, QSystemTrayIcon::Information, TIME_TRAY_BALLOON); |
|
|
|
systrayIcon->showMessage(title, msg, QSystemTrayIcon::Information, TIME_TRAY_BALLOON); |
|
|
|