From b57393ab7c5807bf6f13a46a08fd4ceeb6a04f79 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 18 Mar 2003 20:29:49 +0000 Subject: add cursor_idle_id. 2003-03-18 Chris Toshok * 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 --- widgets/table/e-table-item.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'widgets/table') 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; -- cgit v1.2.3