Commit ae2c3a90 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

tests: Don't access GdkDragContext fields directly

parent a843a9d6
...@@ -335,7 +335,7 @@ target_drag_motion (GtkWidget *widget, ...@@ -335,7 +335,7 @@ target_drag_motion (GtkWidget *widget,
G_OBJECT_TYPE_NAME (source_widget) : G_OBJECT_TYPE_NAME (source_widget) :
"NULL"); "NULL");
tmp_list = context->targets; tmp_list = gdk_drag_context_list_targets (context);
while (tmp_list) while (tmp_list)
{ {
char *name = gdk_atom_name (GDK_POINTER_TO_ATOM (tmp_list->data)); char *name = gdk_atom_name (GDK_POINTER_TO_ATOM (tmp_list->data));
...@@ -345,7 +345,8 @@ target_drag_motion (GtkWidget *widget, ...@@ -345,7 +345,8 @@ target_drag_motion (GtkWidget *widget,
tmp_list = tmp_list->next; 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; return TRUE;
} }
...@@ -361,10 +362,10 @@ target_drag_drop (GtkWidget *widget, ...@@ -361,10 +362,10 @@ target_drag_drop (GtkWidget *widget,
gtk_image_set_from_pixbuf (GTK_IMAGE (widget), trashcan_closed); 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, gtk_drag_get_data (widget, context,
GDK_POINTER_TO_ATOM (context->targets->data), GDK_POINTER_TO_ATOM (gdk_drag_context_list_targets (context)->data),
time); time);
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment