[gtk/dnd-gestures-2: 231/242] text: Use GDK content formats API
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 231/242] text: Use GDK content formats API
- Date: Tue, 7 Jan 2020 20:02:48 +0000 (UTC)
commit b95018bb01e687621b552809be2c9782d7dd566c
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]