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/testtreecolumns.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/testtreecolumns.c')
-rw-r--r-- | tests/testtreecolumns.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c index 7112643ba6..5fb8267000 100644 --- a/tests/testtreecolumns.c +++ b/tests/testtreecolumns.c @@ -718,6 +718,7 @@ main (int argc, char *argv[]) GtkCellRenderer *cell; GtkWidget *swindow; GtkTreeModel *sample_model; + GtkTargetList *targets; gint i; gtk_init (); @@ -863,36 +864,31 @@ main (int argc, char *argv[]) /* Drag and Drop */ + targets = gtk_target_list_new (row_targets, G_N_ELEMENTS (row_targets)); gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (left_tree_view), GDK_BUTTON1_MASK, - row_targets, - G_N_ELEMENTS (row_targets), + targets, GDK_ACTION_MOVE); gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (left_tree_view), - row_targets, - G_N_ELEMENTS (row_targets), + targets, GDK_ACTION_MOVE); gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (top_right_tree_view), GDK_BUTTON1_MASK, - row_targets, - G_N_ELEMENTS (row_targets), + targets, GDK_ACTION_MOVE); gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (top_right_tree_view), - row_targets, - G_N_ELEMENTS (row_targets), + targets, GDK_ACTION_MOVE); gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (bottom_right_tree_view), GDK_BUTTON1_MASK, - row_targets, - G_N_ELEMENTS (row_targets), + targets, GDK_ACTION_MOVE); gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (bottom_right_tree_view), - row_targets, - G_N_ELEMENTS (row_targets), + targets, GDK_ACTION_MOVE); - + gtk_target_list_unref (targets); gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)); |