]> Pileus Git - ~andy/gtk/commitdiff
tests: Don't access GdkDragContext fields directly
authorMatthias Clasen <mclasen@redhat.com>
Tue, 14 Dec 2010 00:09:11 +0000 (19:09 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 21 Dec 2010 17:06:55 +0000 (12:06 -0500)
tests/testdnd.c

index 9913564470413d1d3512d72915dcd1d223707558..375e5ab854815d29c63361a80be398d324e9b74d 100644 (file)
@@ -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;
     }