[gtk/dnd-gestures-2: 136/173] text: Use GDK content formats API



commit 379166e1ff89634896e96094901d43e6d41d4095
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 7 00:46:20 2020 -0500

    text: Use GDK content formats API

 gtk/gtktext.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 9d2c690d76..2c6d77055b 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -1727,8 +1727,7 @@ gtk_text_init (GtkText *self)
   priv->selection_content = g_object_new (GTK_TYPE_TEXT_CONTENT, NULL);
   GTK_TEXT_CONTENT (priv->selection_content)->self = self;
 
-  formats = gdk_content_formats_new (NULL, 0);
-  formats = gtk_content_formats_add_text_targets (formats);
+  formats = gdk_content_formats_new_for_gtype (G_TYPE_STRING);
   dest = gtk_drop_target_new (formats, GDK_ACTION_COPY | GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_text_drag_motion), self);
   g_signal_connect (dest, "drag-leave", G_CALLBACK (gtk_text_drag_leave), self);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]