diff options
author | Owen Taylor <otaylor@redhat.com> | 1998-11-27 17:16:36 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-11-27 17:16:36 +0000 |
commit | f26c189e5b89bc21a24411358fa1fff4472ccca6 (patch) | |
tree | ed2edf81fc2e41a6f9bdffa325d088a00070e8d7 /tests | |
parent | 4ab10dc891a84331551f00bb7ba24f5319c4a8c6 (diff) | |
download | gdk-pixbuf-f26c189e5b89bc21a24411358fa1fff4472ccca6.tar.gz |
New function to get the source widget of a drag.
Fri Nov 27 12:17:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch] (gtk_drag_get_source_widget): New function to
get the source widget of a drag.
* gtk/gtkdnd.[ch]: Target flags GTK_TARGET_SAME_[WIDGET/APP]
to restrict certain targets to the same widget or to
the same application.
* gtk/testdnd.c: Test gtk_drag_get_source_widget().
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testdnd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/testdnd.c b/tests/testdnd.c index 26c38f3d2..2736bf393 100644 --- a/tests/testdnd.c +++ b/tests/testdnd.c @@ -302,12 +302,19 @@ target_drag_motion (GtkWidget *widget, gint y, guint time) { + GtkWidget *source_widget; + if (!have_drag) { have_drag = TRUE; gtk_pixmap_set (GTK_PIXMAP (widget), trashcan_open, trashcan_open_mask); } - g_print("motion\n"); + + source_widget = gtk_drag_get_source_widget (context); + g_print("motion, source %s\n", source_widget ? + gtk_type_name (GTK_OBJECT (source_widget)->klass->type) : + "unknown"); + gdk_drag_status (context, context->suggested_action, time); return TRUE; } |