aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-12-17 15:50:20 +0800
committerChris Lahey <clahey@src.gnome.org>2001-12-17 15:50:20 +0800
commit4ca3db91acb3434149a3634cdefc27327d1cc53c (patch)
tree10553124d7763811863efe8485ad6395ae4ecf89 /widgets/table
parent3c1dde46c314f0ba2fc02a779ac2c03f41f6b207 (diff)
downloadgsoc2013-evolution-4ca3db91acb3434149a3634cdefc27327d1cc53c.tar.gz
gsoc2013-evolution-4ca3db91acb3434149a3634cdefc27327d1cc53c.tar.zst
gsoc2013-evolution-4ca3db91acb3434149a3634cdefc27327d1cc53c.zip
Merging changes:
2001-12-11 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-canvas.c (e_canvas_unrealize): Turn off idle handling in the unrealize function instead of the destroy function. From gal/e-table/ChangeLog: 2001-12-11 Christopher James Lahey <clahey@ximian.com> * e-table-item.c: Turn off idle handling in the unrealize function instead of the destroy function. svn path=/trunk/; revision=15102
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-item.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index c324d3a90c..0d947a942f 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -610,19 +610,21 @@ height_cache_idle(ETableItem *eti)
static void
free_height_cache (ETableItem *eti)
{
- if (eti->height_cache)
- g_free (eti->height_cache);
- eti->height_cache = NULL;
- eti->height_cache_idle_count = 0;
- eti->uniform_row_height_cache = -1;
+ if (GNOME_CANVAS_ITEM_REALIZED & GTK_OBJECT_FLAGS (eti)) {
+ if (eti->height_cache)
+ g_free (eti->height_cache);
+ eti->height_cache = NULL;
+ eti->height_cache_idle_count = 0;
+ eti->uniform_row_height_cache = -1;
+
+ if (eti->uniform_row_height && eti->height_cache_idle_id != 0) {
+ g_source_remove(eti->height_cache_idle_id);
+ eti->height_cache_idle_id = 0;
+ }
- if (eti->uniform_row_height && eti->height_cache_idle_id != 0) {
- g_source_remove(eti->height_cache_idle_id);
- eti->height_cache_idle_id = 0;
+ if ((!eti->uniform_row_height) && eti->height_cache_idle_id == 0)
+ eti->height_cache_idle_id = g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc) height_cache_idle, eti, NULL);
}
-
- if ((!eti->uniform_row_height) && eti->height_cache_idle_id == 0)
- eti->height_cache_idle_id = g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc) height_cache_idle, eti, NULL);
}
static void
@@ -1639,6 +1641,16 @@ eti_unrealize (GnomeCanvasItem *item)
if (eti_editing (eti))
e_table_item_leave_edit_(eti);
+ if (eti->height_cache_idle_id) {
+ g_source_remove(eti->height_cache_idle_id);
+ eti->height_cache_idle_id = 0;
+ }
+
+ if (eti->height_cache)
+ g_free (eti->height_cache);
+ eti->height_cache = NULL;
+ eti->height_cache_idle_count = 0;
+
gdk_gc_unref (eti->fill_gc);
eti->fill_gc = NULL;
gdk_gc_unref (eti->grid_gc);