[gtk+/gdk-backend: 16/91] tests: Don't access GdkDragContext fields directly
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend: 16/91] tests: Don't access GdkDragContext fields directly
- Date: Sat, 18 Dec 2010 01:07:10 +0000 (UTC)
commit 7f8247cd27cf5b19ccb80e6937b6ee60d0ca144c
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 13 19:09:11 2010 -0500
tests: Don't access GdkDragContext fields directly
tests/testdnd.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/tests/testdnd.c b/tests/testdnd.c
index 9913564..375e5ab 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]