[Xfce4-commits] <midori:master> Be sure to disconnect item notification when the proxy is destroyed

Christian Dywan noreply at xfce.org
Mon Nov 30 19:56:01 CET 2009


Updating branch refs/heads/master
         to 2f186056564bf2f0f1ba04d08e46589aa722cfeb (commit)
       from dd196dc942dbdfbf304dd4f83ff9ddb108c00cba (commit)

commit 2f186056564bf2f0f1ba04d08e46589aa722cfeb
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Nov 30 19:47:41 2009 +0100

    Be sure to disconnect item notification when the proxy is destroyed

 katze/katze-arrayaction.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/katze/katze-arrayaction.c b/katze/katze-arrayaction.c
index c64def8..d9cf7d2 100644
--- a/katze/katze-arrayaction.c
+++ b/katze/katze-arrayaction.c
@@ -541,6 +541,14 @@ katze_array_action_proxy_create_menu_proxy_cb (GtkWidget* proxy,
     return TRUE;
 }
 
+static void
+katze_array_action_toolitem_destroy_cb (GtkToolItem* toolitem,
+                                        KatzeItem*   item)
+{
+    g_signal_handlers_disconnect_by_func (item,
+        G_CALLBACK (katze_array_action_item_notify_cb), toolitem);
+}
+
 /**
  * katze_array_action_create_tool_item_for:
  * @array_action: a #KatzeArrayAction
@@ -615,6 +623,8 @@ katze_array_action_create_tool_item_for (KatzeArrayAction* array_action,
     g_object_set_data (G_OBJECT (toolitem), "KatzeArrayAction", array_action);
     g_signal_connect (item, "notify",
         G_CALLBACK (katze_array_action_item_notify_cb), toolitem);
+    g_signal_connect (toolitem, "destroy",
+        G_CALLBACK (katze_array_action_toolitem_destroy_cb), item);
     return toolitem;
 }
 



More information about the Xfce4-commits mailing list