[gnome-flashback] notifications: disconnect signal handler
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] notifications: disconnect signal handler
- Date: Mon, 25 Apr 2016 19:03:06 +0000 (UTC)
commit 26592ac89d4b1fd05adac417040110473da6bade
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Apr 25 21:57:40 2016 +0300
notifications: disconnect signal handler
Regression from 302df76438ad7f7cba75c2fe949daffb9d701155.
https://bugzilla.gnome.org/show_bug.cgi?id=765128
gnome-flashback/libnotifications/gf-bubble.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gnome-flashback/libnotifications/gf-bubble.c b/gnome-flashback/libnotifications/gf-bubble.c
index ce74fd1..a97ba15 100644
--- a/gnome-flashback/libnotifications/gf-bubble.c
+++ b/gnome-flashback/libnotifications/gf-bubble.c
@@ -47,6 +47,7 @@ typedef struct
gboolean url_clicked_lock;
guint timeout_id;
+ gulong changed_id;
} GfBubblePrivate;
G_DEFINE_TYPE_WITH_PRIVATE (GfBubble, gf_bubble, GF_TYPE_POPUP_WINDOW)
@@ -413,6 +414,12 @@ gf_bubble_dispose (GObject *object)
priv->timeout_id = 0;
}
+ if (priv->changed_id != 0)
+ {
+ g_signal_handler_disconnect (priv->notification, priv->changed_id);
+ priv->changed_id = 0;
+ }
+
G_OBJECT_CLASS (gf_bubble_parent_class)->dispose (object);
}
@@ -665,9 +672,9 @@ gf_bubble_new_for_notification (NdNotification *notification)
priv = gf_bubble_get_instance_private (bubble);
priv->notification = g_object_ref (notification);
-
- g_signal_connect (notification, "changed",
- G_CALLBACK (notification_changed_cb), bubble);
+ priv->changed_id = g_signal_connect (notification, "changed",
+ G_CALLBACK (notification_changed_cb),
+ bubble);
update_bubble (bubble);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]