diff --git a/ChangeLog b/ChangeLog index 8720fbb2d1..41d6787e08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Dec 10 21:48:34 1998 Owen Taylor + + * gtk/gtkdnd.[ch]: Added gtk_drag_source_unset() + Thu Dec 10 20:42:22 1998 Owen Taylor * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Use diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 8720fbb2d1..41d6787e08 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,7 @@ +Thu Dec 10 21:48:34 1998 Owen Taylor + + * gtk/gtkdnd.[ch]: Added gtk_drag_source_unset() + Thu Dec 10 20:42:22 1998 Owen Taylor * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Use diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8720fbb2d1..41d6787e08 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +Thu Dec 10 21:48:34 1998 Owen Taylor + + * gtk/gtkdnd.[ch]: Added gtk_drag_source_unset() + Thu Dec 10 20:42:22 1998 Owen Taylor * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Use diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 8720fbb2d1..41d6787e08 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +Thu Dec 10 21:48:34 1998 Owen Taylor + + * gtk/gtkdnd.[ch]: Added gtk_drag_source_unset() + Thu Dec 10 20:42:22 1998 Owen Taylor * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Use diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 8720fbb2d1..41d6787e08 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +Thu Dec 10 21:48:34 1998 Owen Taylor + + * gtk/gtkdnd.[ch]: Added gtk_drag_source_unset() + Thu Dec 10 20:42:22 1998 Owen Taylor * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Use diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 8720fbb2d1..41d6787e08 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +Thu Dec 10 21:48:34 1998 Owen Taylor + + * gtk/gtkdnd.[ch]: Added gtk_drag_source_unset() + Thu Dec 10 20:42:22 1998 Owen Taylor * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Use diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8720fbb2d1..41d6787e08 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +Thu Dec 10 21:48:34 1998 Owen Taylor + + * gtk/gtkdnd.[ch]: Added gtk_drag_source_unset() + Thu Dec 10 20:42:22 1998 Owen Taylor * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Use diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 2794f94e5c..fd3b551e8b 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -1616,6 +1616,30 @@ gtk_drag_source_set (GtkWidget *widget, } +/************************************************************* + * gtk_drag_source_unset + * Unregister this widget as a drag source. + * arguments: + * widget: + * results: + *************************************************************/ + +void +gtk_drag_source_unset (GtkWidget *widget) +{ + GtkDragSourceSite *site; + + g_return_if_fail (widget != NULL); + + site = gtk_object_get_data (GTK_OBJECT (widget), "gtk-site-data"); + + if (site) + { + gtk_signal_disconnect_by_data (GTK_OBJECT (widget), site); + gtk_object_set_data (GTK_OBJECT (widget), "gtk-site-data", NULL); + } +} + /************************************************************* * gtk_drag_source_set_icon: * Set an icon for drags from this source. diff --git a/gtk/gtkdnd.h b/gtk/gtkdnd.h index e464e1dd96..c665a17365 100644 --- a/gtk/gtkdnd.h +++ b/gtk/gtkdnd.h @@ -83,6 +83,8 @@ void gtk_drag_source_set (GtkWidget *widget, gint n_targets, GdkDragAction actions); +void gtk_drag_source_unset (GtkWidget *widget); + void gtk_drag_source_set_icon (GtkWidget *widget, GdkColormap *colormap, GdkPixmap *pixmap,