summaryrefslogtreecommitdiff
path: root/tests/testiconview.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testiconview.c')
-rw-r--r--tests/testiconview.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/testiconview.c b/tests/testiconview.c
index ef7e85f8e6..ba93785d84 100644
--- a/tests/testiconview.c
+++ b/tests/testiconview.c
@@ -425,6 +425,7 @@ main (gint argc, gchar **argv)
GtkTreeModel *model;
GtkCellRenderer *cell;
GtkTreeViewColumn *tvc;
+ GtkTargetList *targets;
#ifdef GTK_SRCDIR
g_chdir (GTK_SRCDIR);
@@ -527,26 +528,23 @@ main (gint argc, gchar **argv)
#endif
/* Allow DND between the icon view and the tree view */
+ targets = gtk_target_list_new (item_targets, G_N_ELEMENTS (item_targets));
gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (icon_list),
GDK_BUTTON1_MASK,
- item_targets,
- G_N_ELEMENTS (item_targets),
+ targets,
GDK_ACTION_MOVE);
gtk_icon_view_enable_model_drag_dest (GTK_ICON_VIEW (icon_list),
- item_targets,
- G_N_ELEMENTS (item_targets),
+ targets,
GDK_ACTION_MOVE);
gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (tv),
GDK_BUTTON1_MASK,
- item_targets,
- G_N_ELEMENTS (item_targets),
+ targets,
GDK_ACTION_MOVE);
gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (tv),
- item_targets,
- G_N_ELEMENTS (item_targets),
+ targets,
GDK_ACTION_MOVE);
-
+ gtk_target_list_unref (targets);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_container_add (GTK_CONTAINER (scrolled_window), icon_list);