aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r--widgets/table/e-tree.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index acd841d085..9bb71f6c92 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -2211,6 +2211,28 @@ hover_off (ETree *et)
}
static void
+context_destroyed (gpointer data)
+{
+ ETree *et = data;
+ et->priv->last_drop_x = 0;
+ et->priv->last_drop_y = 0;
+ et->priv->last_drop_time = 0;
+ et->priv->last_drop_context = NULL;
+ scroll_off (et);
+ hover_off (et);
+ gtk_object_unref (GTK_OBJECT (et));
+}
+
+static void
+context_connect (ETree *et, GdkDragContext *context)
+{
+ if (g_dataset_get_data (context, "e-tree") == NULL) {
+ gtk_object_ref (GTK_OBJECT (et));
+ g_dataset_set_data_full (context, "e-tree", et, context_destroyed);
+ }
+}
+
+static void
et_drag_leave(GtkWidget *widget,
GdkDragContext *context,
guint time,
@@ -2244,6 +2266,7 @@ et_drag_motion(GtkWidget *widget,
et->priv->last_drop_y = y;
et->priv->last_drop_time = time;
et->priv->last_drop_context = context;
+ context_connect (et, context);
if (et->priv->hover_idle_id != 0) {
if (abs (et->priv->hover_x - x) > 3 ||