Remove existing signal connections in gtk_drag_dest_unset().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=608370
This commit is contained in:
Cody Russell 2010-01-29 11:09:13 -06:00 committed by Tristan Van Berkom
parent 21ef8f9ad9
commit 1ae55844f7

View File

@ -1341,8 +1341,22 @@ gtk_drag_dest_set_proxy (GtkWidget *widget,
void void
gtk_drag_dest_unset (GtkWidget *widget) gtk_drag_dest_unset (GtkWidget *widget)
{ {
GtkDragDestSite *old_site;
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
old_site = g_object_get_data (G_OBJECT (widget),
"gtk-drag-dest");
if (old_site)
{
g_signal_handlers_disconnect_by_func (widget,
gtk_drag_dest_realized,
old_site);
g_signal_handlers_disconnect_by_func (widget,
gtk_drag_dest_hierarchy_changed,
old_site);
}
g_object_set_data (G_OBJECT (widget), I_("gtk-drag-dest"), NULL); g_object_set_data (G_OBJECT (widget), I_("gtk-drag-dest"), NULL);
} }