diff options
author | Benjamin Otte <otte@redhat.com> | 2020-02-28 04:19:36 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-03-02 03:18:55 +0100 |
commit | fdb39b095b5e3fb2c66f0e81d172310c21c46ece (patch) | |
tree | 55809b4bccb768e0222a8081e1d1dedfea000b4e /gtk/gtkiconview.c | |
parent | d9fa839097ddcda181fc3f3c3b56b91aa659121c (diff) | |
download | gtk+-fdb39b095b5e3fb2c66f0e81d172310c21c46ece.tar.gz |
treeview, iconview: Don't return the drop target
Not a good idea to hand internal event controllers out to public API.
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r-- | gtk/gtkiconview.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 076ca4dfbb..9400fdd24b 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -6397,17 +6397,16 @@ gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view, * * Turns @icon_view into a drop destination for automatic DND. Calling this * method sets #GtkIconView:reorderable to %FALSE. - * - * Returns: (transfer none): the drop target that was attached **/ -GtkDropTarget * +void gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view, GdkContentFormats *formats, GdkDragAction actions) { - g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL); GtkCssNode *widget_node; + g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); + icon_view->priv->dest = gtk_drop_target_new (gdk_content_formats_ref (formats), actions); g_signal_connect (icon_view->priv->dest, "drag-leave", G_CALLBACK (gtk_icon_view_drag_leave), icon_view); g_signal_connect (icon_view->priv->dest, "drag-motion", G_CALLBACK (gtk_icon_view_drag_motion), icon_view); @@ -6426,8 +6425,6 @@ gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view, gtk_css_node_set_parent (icon_view->priv->dndnode, widget_node); gtk_css_node_set_state (icon_view->priv->dndnode, gtk_css_node_get_state (widget_node)); g_object_unref (icon_view->priv->dndnode); - - return icon_view->priv->dest; } /** |