summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1998-12-11 02:48:40 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-12-11 02:48:40 +0000
commit939c818395954177ecd9c79fa89f86bed9349bef (patch)
treeda5a62066ddc866980dd407781cc662247097c90 /gtk/gtkdnd.c
parentba17081caaadc9ad16aefb4c8332d883efc5ba54 (diff)
downloadgtk+-939c818395954177ecd9c79fa89f86bed9349bef.tar.gz
Added gtk_drag_source_unset()
Thu Dec 10 21:48:34 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkdnd.[ch]: Added gtk_drag_source_unset()
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r--gtk/gtkdnd.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 2794f94e5c..fd3b551e8b 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -1617,6 +1617,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.
* arguments: