summaryrefslogtreecommitdiff
path: root/tests/testtoolbar.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-12-31 21:10:15 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-08 18:48:19 -0500
commitb4c689ecd623c38b22fc7f3f6a83860d5d1e02f6 (patch)
tree19f84a64e99c472bac0683ad722b4356eefdfc08 /tests/testtoolbar.c
parent78a0913f0fec875a70850b7b2787c6307c19402b (diff)
downloadgtk+-b4c689ecd623c38b22fc7f3f6a83860d5d1e02f6.tar.gz
tests: Convert to GtkDragSource
Some tests, such as testimage did not have anything particularly worth keeping, so were removed instead of fixed.
Diffstat (limited to 'tests/testtoolbar.c')
-rw-r--r--tests/testtoolbar.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c
index a26f8a842b..3a2f7cbdb9 100644
--- a/tests/testtoolbar.c
+++ b/tests/testtoolbar.c
@@ -389,6 +389,8 @@ main (gint argc, gchar **argv)
GtkWidget *hbox, *hbox1, *hbox2, *checkbox, *option_menu, *menu;
gint i;
GdkContentFormats *targets;
+ GdkContentProvider *content;
+ GtkDragSource *source;
static const gchar *toolbar_styles[] = { "icons", "text", "both (vertical)",
"both (horizontal)" };
GtkToolItem *item;
@@ -616,9 +618,10 @@ main (gint argc, gchar **argv)
gtk_container_add (GTK_CONTAINER (hbox), checkbox);
targets = gdk_content_formats_new (target_table, G_N_ELEMENTS (target_table));
- gtk_drag_source_set (button, GDK_BUTTON1_MASK,
- targets,
- GDK_ACTION_MOVE);
+ content = gdk_content_provider_new_for_bytes (target_table[0], g_bytes_new ("", 1));
+ source = gtk_drag_source_new (content, GDK_ACTION_MOVE);
+ g_object_unref (content);
+ gtk_drag_source_attach (source, button, GDK_BUTTON1_MASK);
gtk_drag_dest_set (toolbar, GTK_DEST_DEFAULT_DROP,
targets,
GDK_ACTION_MOVE);