summaryrefslogtreecommitdiff
path: root/gtk
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
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')
-rw-r--r--gtk/gtkdnd.c24
-rw-r--r--gtk/gtkdnd.h2
2 files changed, 26 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:
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,