--- gtkbuilder.c.orig	2007-06-07 22:01:21.000000000 +0300
+++ gtkbuilder.c	2007-06-07 22:58:48.000000000 +0300
@@ -930,6 +930,7 @@
 
   for (l = priv->signals; l; l = l->next)
     {
+      guint signal_id;
       SignalInfo *signal = (SignalInfo*)l->data;
       GConnectFlags flags = 0;
 
@@ -957,6 +958,26 @@
       if (signal->object)
         flags |= G_CONNECT_SWAPPED;
 
+      signal_id = g_signal_lookup(signal->name, G_TYPE_FROM_INSTANCE(object));
+      
+      if (signal_id > 0)
+        {
+          GSignalMatchType match_mask;
+          gulong handler_id;
+          
+          match_mask = G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC;
+          handler_id = g_signal_handler_find(object, match_mask, signal_id,
+                                             NULL, NULL, func, NULL);
+
+          if (handler_id > 0)
+            {
+              g_warning ("Not re-connecting signal handler '%s' to signal '%s' "
+                         "for object '%s'",
+                         signal->handler, signal->name, signal->object_name);
+              continue;
+            }
+        }
+
       g_signal_connect_data (object, signal->name, func, other, NULL, flags);
     }
 }
