summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2017-11-14 22:32:23 +0100
committerBenjamin Otte <otte@redhat.com>2017-11-15 19:07:17 +0100
commit5a1a11bcde0acacb455fc3df10d6bd8f67f62850 (patch)
tree859a7f528af6d5407eed89fd127914ac3103f7c9 /gtk/gtknotebook.c
parent7efc5a1558449194caedaae5f27e4c9c48d88ab7 (diff)
downloadgtk+-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 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 65be844ca1..419b48cb95 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1050,6 +1050,7 @@ static void
gtk_notebook_init (GtkNotebook *notebook)
{
GtkNotebookPrivate *priv;
+ GtkTargetList *targets;
gtk_widget_set_can_focus (GTK_WIDGET (notebook), TRUE);
gtk_widget_set_has_window (GTK_WIDGET (notebook), FALSE);
@@ -1087,9 +1088,11 @@ gtk_notebook_init (GtkNotebook *notebook)
else
priv->tabs_reversed = FALSE;
+ targets = gtk_target_list_new (dst_notebook_targets, G_N_ELEMENTS (dst_notebook_targets));
gtk_drag_dest_set (GTK_WIDGET (notebook), 0,
- dst_notebook_targets, G_N_ELEMENTS (dst_notebook_targets),
+ targets,
GDK_ACTION_MOVE);
+ gtk_target_list_unref (targets);
gtk_drag_dest_set_track_motion (GTK_WIDGET (notebook), TRUE);