[notification-daemon] Only connect signal handlers once per notification



commit 24c91cb7137bcabbd84e7299716b6ddadbb63b67
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri Oct 29 17:01:52 2010 +1000

    Only connect signal handlers once per notification
    
    https://bugzilla.gnome.org/show_bug.cgi?id=633435

 src/daemon.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/daemon.c b/src/daemon.c
index 8cb396a..85e924e 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -252,6 +252,8 @@ handle_notify (NotifyDaemon          *daemon,
 
         if (id == 0) {
                 notification = nd_notification_new (sender);
+                g_signal_connect (notification, "closed", G_CALLBACK (on_notification_close), daemon);
+                g_signal_connect (notification, "action-invoked", G_CALLBACK (on_notification_action_invoked), daemon);
         }
 
         nd_notification_update (notification,
@@ -262,8 +264,6 @@ handle_notify (NotifyDaemon          *daemon,
                                 actions,
                                 hints_iter,
                                 timeout);
-        g_signal_connect (notification, "closed", G_CALLBACK (on_notification_close), daemon);
-        g_signal_connect (notification, "action-invoked", G_CALLBACK (on_notification_action_invoked), daemon);
 
         if (id == 0) {
                 nd_queue_add (daemon->priv->queue, notification);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]