diff options
author | Benjamin Otte <otte@redhat.com> | 2017-11-14 22:32:23 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-11-15 19:07:17 +0100 |
commit | 5a1a11bcde0acacb455fc3df10d6bd8f67f62850 (patch) | |
tree | 859a7f528af6d5407eed89fd127914ac3103f7c9 /tests/testkineticscrolling.c | |
parent | 7efc5a1558449194caedaae5f27e4c9c48d88ab7 (diff) | |
download | gtk+-5a1a11bcde0acacb455fc3df10d6bd8f67f62850.tar.gz |
dnd: Make GtkDragDest and GtkDragSource use GtkTargetList
This gets rid of GtkTargetEntry in the API and consistently uses
GtkTargetList.
Diffstat (limited to 'tests/testkineticscrolling.c')
-rw-r--r-- | tests/testkineticscrolling.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/testkineticscrolling.c b/tests/testkineticscrolling.c index fe412d0fa7..6f9fe2993c 100644 --- a/tests/testkineticscrolling.c +++ b/tests/testkineticscrolling.c @@ -26,6 +26,7 @@ kinetic_scrolling (void) GtkCellRenderer *renderer; GtkListStore *store; GtkWidget *textview; + GtkTargetList *targets; gint i; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -75,15 +76,15 @@ kinetic_scrolling (void) gtk_widget_show (swindow); treeview = gtk_tree_view_new (); + targets = gtk_target_list_new (row_targets, G_N_ELEMENTS (row_targets)); gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (treeview), GDK_BUTTON1_MASK, - row_targets, - G_N_ELEMENTS (row_targets), + targets, GDK_ACTION_MOVE | GDK_ACTION_COPY); gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (treeview), - row_targets, - G_N_ELEMENTS (row_targets), + targets, GDK_ACTION_MOVE | GDK_ACTION_COPY); + gtk_target_list_unref (targets); renderer = gtk_cell_renderer_text_new (); g_object_set (renderer, "editable", TRUE, NULL); |