[gtk/dnd-gestures-2: 130/150] treeview: Don't highlight everything
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 130/150] treeview: Don't highlight everything
- Date: Tue, 7 Jan 2020 07:02:51 +0000 (UTC)
commit e0aaddf5bb50563d405b5201ad7e6ae79473d357
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 6 21:04:47 2020 -0500
treeview: Don't highlight everything
gtk/gtktreeview.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 50cf6540bb..fb3d7775b5 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -697,6 +697,9 @@ static gboolean gtk_tree_view_drag_drop (GtkDropTarget *dest,
int x,
int y,
GtkTreeView *tree_view);
+static void gtk_tree_view_armed (GtkDropTarget *dest,
+ GParamSpec *pspec,
+ GtkTreeView *tree_view);
static void gtk_tree_view_drag_data_received (GObject *source,
GAsyncResult *result,
gpointer data);
@@ -7355,6 +7358,14 @@ gtk_tree_view_drag_drop (GtkDropTarget *dest,
return FALSE;
}
+static void
+gtk_tree_view_armed (GtkDropTarget *dest,
+ GParamSpec *pspec,
+ GtkTreeView *tree_view)
+{
+ gtk_drag_unhighlight (GTK_WIDGET (tree_view));
+}
+
static GdkDragAction
gtk_tree_view_get_action (GtkWidget *widget,
GdkDrop *drop)
@@ -12909,6 +12920,7 @@ gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
g_signal_connect (di->dest, "drag-leave", G_CALLBACK (gtk_tree_view_drag_leave), tree_view);
g_signal_connect (di->dest, "drag-motion", G_CALLBACK (gtk_tree_view_drag_motion), tree_view);
g_signal_connect (di->dest, "drag-drop", G_CALLBACK (gtk_tree_view_drag_drop), tree_view);
+ g_signal_connect (di->dest, "notify::armed", G_CALLBACK (gtk_tree_view_armed), tree_view);
gtk_widget_add_controller (GTK_WIDGET (tree_view), GTK_EVENT_CONTROLLER (di->dest));
g_object_ref (di->dest);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]