summaryrefslogtreecommitdiff
path: root/tests/testdnd.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-12-13 19:09:11 -0500
committerMatthias Clasen <mclasen@redhat.com>2010-12-21 12:06:55 -0500
commitae2c3a909c7ac111c7a4f64d4461ba32934c23b3 (patch)
tree158a810374412afaf25382744a7969ccc22f1411 /tests/testdnd.c
parenta843a9d6141ec4e5dd418b195256e9dc547d0697 (diff)
downloadgtk+-ae2c3a909c7ac111c7a4f64d4461ba32934c23b3.tar.gz
tests: Don't access GdkDragContext fields directly
Diffstat (limited to 'tests/testdnd.c')
-rw-r--r--tests/testdnd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/testdnd.c b/tests/testdnd.c
index 9913564470..375e5ab854 100644
--- a/tests/testdnd.c
+++ b/tests/testdnd.c
@@ -335,7 +335,7 @@ target_drag_motion (GtkWidget *widget,
G_OBJECT_TYPE_NAME (source_widget) :
"NULL");
- tmp_list = context->targets;
+ tmp_list = gdk_drag_context_list_targets (context);
while (tmp_list)
{
char *name = gdk_atom_name (GDK_POINTER_TO_ATOM (tmp_list->data));
@@ -345,7 +345,8 @@ target_drag_motion (GtkWidget *widget,
tmp_list = tmp_list->next;
}
- gdk_drag_status (context, context->suggested_action, time);
+ gdk_drag_status (context, gdk_drag_context_get_suggested_action (context), time);
+
return TRUE;
}
@@ -361,10 +362,10 @@ target_drag_drop (GtkWidget *widget,
gtk_image_set_from_pixbuf (GTK_IMAGE (widget), trashcan_closed);
- if (context->targets)
+ if (gdk_drag_context_list_targets (context))
{
- gtk_drag_get_data (widget, context,
- GDK_POINTER_TO_ATOM (context->targets->data),
+ gtk_drag_get_data (widget, context,
+ GDK_POINTER_TO_ATOM (gdk_drag_context_list_targets (context)->data),
time);
return TRUE;
}