aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-06 23:47:29 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-06 23:47:29 +0800
commitc259b85c5d13726ca1c0e204e751e310943d2048 (patch)
tree070ca3d6213cfd25167f607293cf87acac7534be /widgets/table/e-tree.c
parentbed3e436a85520544851f337a71177783e7e401c (diff)
downloadgsoc2013-evolution-c259b85c5d13726ca1c0e204e751e310943d2048.tar
gsoc2013-evolution-c259b85c5d13726ca1c0e204e751e310943d2048.tar.gz
gsoc2013-evolution-c259b85c5d13726ca1c0e204e751e310943d2048.tar.bz2
gsoc2013-evolution-c259b85c5d13726ca1c0e204e751e310943d2048.tar.lz
gsoc2013-evolution-c259b85c5d13726ca1c0e204e751e310943d2048.tar.xz
gsoc2013-evolution-c259b85c5d13726ca1c0e204e751e310943d2048.tar.zst
gsoc2013-evolution-c259b85c5d13726ca1c0e204e751e310943d2048.zip
Use g_dataset_set_data_full to find out when the context is destroyed.
2001-10-06 Christopher James Lahey <clahey@ximian.com> * e-tree.c (context_destroyed), e-table.c (context_destroyed): Use g_dataset_set_data_full to find out when the context is destroyed. Fixes Ximian bug #8502 and Ximian bug #11691. svn path=/trunk/; revision=13482
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 ||