forked from AuroraMiddleware/gtk
treeview, iconview: Don't return the drop target
Not a good idea to hand internal event controllers out to public API.
This commit is contained in:
parent
d9fa839097
commit
fdb39b095b
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include <gtk/gtkcellrenderer.h>
|
||||
#include <gtk/gtkcellarea.h>
|
||||
#include <gtk/gtktooltip.h>
|
||||
#include <gtk/gtkdragsource.h>
|
||||
#include <gtk/gtkdragdest.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -219,7 +217,7 @@ void gtk_icon_view_enable_model_drag_source (GtkIconView
|
||||
GdkContentFormats *formats,
|
||||
GdkDragAction actions);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkDropTarget * gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view,
|
||||
void gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view,
|
||||
GdkContentFormats *formats,
|
||||
GdkDragAction actions);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "gtk/gtkiconview.h"
|
||||
#include "gtk/gtkcssnodeprivate.h"
|
||||
#include "gtk/gtkdragdest.h"
|
||||
#include "gtk/gtkgestureclick.h"
|
||||
#include "gtk/gtkeventcontrollermotion.h"
|
||||
#include "gtk/gtkdragsource.h"
|
||||
|
@ -12855,10 +12855,8 @@ gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
|
||||
*
|
||||
* Turns @tree_view into a drop destination for automatic DND. Calling
|
||||
* this method sets #GtkTreeView:reorderable to %FALSE.
|
||||
*
|
||||
* Returns: (transfer none): the drop target that has been attached
|
||||
**/
|
||||
GtkDropTarget *
|
||||
void
|
||||
gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||
GdkContentFormats *formats,
|
||||
GdkDragAction actions)
|
||||
@ -12866,7 +12864,7 @@ gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||
TreeViewDragInfo *di;
|
||||
GtkCssNode *widget_node;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), NULL);
|
||||
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
|
||||
|
||||
di = ensure_info (tree_view);
|
||||
di->dest_set = TRUE;
|
||||
@ -12886,8 +12884,6 @@ gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||
g_object_unref (di->cssnode);
|
||||
|
||||
unset_reorderable (tree_view);
|
||||
|
||||
return di->dest;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include <gtk/gtktreemodel.h>
|
||||
#include <gtk/gtktreeviewcolumn.h>
|
||||
#include <gtk/gtkentry.h>
|
||||
#include <gtk/gtkdragsource.h>
|
||||
#include <gtk/gtkdragdest.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -320,7 +318,7 @@ void gtk_tree_view_enable_model_drag_source (GtkTreeView
|
||||
GdkContentFormats *formats,
|
||||
GdkDragAction actions);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkDropTarget * gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||
void gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
|
||||
GdkContentFormats *formats,
|
||||
GdkDragAction actions);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "gtkcellareabox.h"
|
||||
#include "gtkcellareacontext.h"
|
||||
#include "gtkcelllayout.h"
|
||||
#include "gtkdragsource.h"
|
||||
#include "gtkframe.h"
|
||||
#include "gtkimage.h"
|
||||
#include "gtkintl.h"
|
||||
|
Loading…
Reference in New Issue
Block a user