From 6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 9 May 2000 07:09:28 +0000 Subject: Rearranged order of things getting destroyed. 2000-05-09 Christopher James Lahey * gui/component/e-addressbook-model.c: Rearranged order of things getting destroyed. * gui/minicard/e-minicard-view.c: Rearranged order of things getting destroyed. Don't set attributes of non-null or destroyed items. Destroy parent object when destroyed. Maintain ref_count of items in list. * gui/minicard/e-minicard.c: Don't set attributes of non-null items. * gui/minicard/e-reflow-sorted.c: Maintain ref_count of items in list. * gui/minicard/e-reflow.c: Maintain ref_count of items in list. Destroy parent object when destroyed. svn path=/trunk/; revision=2935 --- widgets/misc/e-reflow.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'widgets/misc') diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index 6706357ede..bd0fc99084 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -190,8 +190,11 @@ e_reflow_destroy (GtkObject *object) { EReflow *reflow = E_REFLOW(object); + g_list_foreach(reflow->items, (GFunc) gtk_object_unref, NULL); g_list_free(reflow->items); reflow->items = NULL; + + GTK_OBJECT_CLASS(parent_class)->destroy (object); } static void @@ -448,6 +451,7 @@ static void e_reflow_real_add_item(EReflow *e_reflow, GnomeCanvasItem *item) { e_reflow->items = g_list_append(e_reflow->items, item); + gtk_object_ref(item); if ( GTK_OBJECT_FLAGS( e_reflow ) & GNOME_CANVAS_ITEM_REALIZED ) { gnome_canvas_item_set(item, "width", (double) e_reflow->column_width, -- cgit