aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-item.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-03-19 04:29:49 +0800
committerChris Toshok <toshok@src.gnome.org>2003-03-19 04:29:49 +0800
commitb57393ab7c5807bf6f13a46a08fd4ceeb6a04f79 (patch)
treefebd77e7c8ae5b2f11c5a1e525a187725cee2e38 /widgets/table/e-table-item.c
parent15ba3005bcce759bd8b86eb3e4c1ba49a1bcb5f8 (diff)
downloadgsoc2013-evolution-b57393ab7c5807bf6f13a46a08fd4ceeb6a04f79.tar.gz
gsoc2013-evolution-b57393ab7c5807bf6f13a46a08fd4ceeb6a04f79.tar.zst
gsoc2013-evolution-b57393ab7c5807bf6f13a46a08fd4ceeb6a04f79.zip
add cursor_idle_id.
2003-03-18 Chris Toshok <toshok@ximian.com> * e-table-item.h (ETableItem): add cursor_idle_id. * e-table-item.c (eti_idle_maybe_show_cursor): save off the cursor_idle_id. (eti_idle_show_cursor_cb): reset the cursor_idle_id to 0. (eti_dispose): remove the cursor_idle_id. Fixes a crash in the evolution select-names dialog. svn path=/trunk/; revision=20344
Diffstat (limited to 'widgets/table/e-table-item.c')
-rw-r--r--widgets/table/e-table-item.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 8b64d06d2d..4c03513ee1 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1003,6 +1003,7 @@ eti_idle_show_cursor_cb (gpointer data)
eti_check_cursor_bounds (eti);
}
+ eti->cursor_idle_id = 0;
g_object_unref (eti);
return FALSE;
}
@@ -1013,7 +1014,8 @@ eti_idle_maybe_show_cursor(ETableItem *eti)
d(g_print ("%s: cursor on screen: %s\n", __FUNCTION__, eti->cursor_on_screen ? "TRUE" : "FALSE"));
if (eti->cursor_on_screen) {
g_object_ref (eti);
- g_idle_add (eti_idle_show_cursor_cb, eti);
+ if (!eti->cursor_idle_id)
+ eti->cursor_idle_id = g_idle_add (eti_idle_show_cursor_cb, eti);
}
}
@@ -1401,6 +1403,11 @@ eti_dispose (GObject *object)
}
eti->height_cache_idle_count = 0;
+ if (eti->cursor_idle_id) {
+ g_source_remove(eti->cursor_idle_id);
+ eti->cursor_idle_id = 0;
+ }
+
if (eti->height_cache)
g_free (eti->height_cache);
eti->height_cache = NULL;