[rhythmbox] notification: use a single notification for non-playback stuff
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] notification: use a single notification for non-playback stuff
- Date: Tue, 27 Aug 2013 23:26:08 +0000 (UTC)
commit cd7194ff5549ab6914990aa309b85889ec2920fc
Author: Jonathan Matthew <jonathan d14n org>
Date: Wed Aug 28 09:10:10 2013 +1000
notification: use a single notification for non-playback stuff
This stops podcast download notifications from piling up.
plugins/notification/rb-notification-plugin.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/plugins/notification/rb-notification-plugin.c b/plugins/notification/rb-notification-plugin.c
index 59ec0b6..8f531de 100644
--- a/plugins/notification/rb-notification-plugin.c
+++ b/plugins/notification/rb-notification-plugin.c
@@ -63,6 +63,7 @@ typedef struct
gchar *notify_art_path;
NotifyNotification *notification;
+ NotifyNotification *misc_notification;
gboolean notify_supports_actions;
gboolean notify_supports_icon_buttons;
gboolean notify_supports_persistence;
@@ -172,7 +173,7 @@ do_notify (RBNotificationPlugin *plugin,
if (playback) {
notification = plugin->notification;
} else {
- notification = NULL;
+ notification = plugin->misc_notification;
}
if (notification == NULL) {
@@ -184,6 +185,8 @@ do_notify (RBNotificationPlugin *plugin,
plugin, 0);
if (playback) {
plugin->notification = notification;
+ } else {
+ plugin->misc_notification = notification;
}
} else {
notify_notification_clear_hints (notification);
@@ -282,6 +285,13 @@ cleanup_notification (RBNotificationPlugin *plugin)
notify_notification_close (plugin->notification, NULL);
plugin->notification = NULL;
}
+ if (plugin->misc_notification != NULL) {
+ g_signal_handlers_disconnect_by_func (plugin->misc_notification,
+ G_CALLBACK (notification_closed_cb),
+ plugin);
+ notify_notification_close (plugin->misc_notification, NULL);
+ plugin->misc_notification = NULL;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]