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/e-reflow/e-reflow-sorted.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'widgets/e-reflow/e-reflow-sorted.c') diff --git a/widgets/e-reflow/e-reflow-sorted.c b/widgets/e-reflow/e-reflow-sorted.c index 688cf87c98..a55d1987a2 100644 --- a/widgets/e-reflow/e-reflow-sorted.c +++ b/widgets/e-reflow/e-reflow-sorted.c @@ -167,6 +167,7 @@ e_reflow_sorted_remove_item(EReflowSorted *e_reflow_sorted, const gchar *id) EReflow *reflow = E_REFLOW(e_reflow_sorted); reflow->items = g_list_remove_link(reflow->items, list); g_list_free_1(list); + gtk_object_unref(GTK_OBJECT(item)); gtk_object_destroy(GTK_OBJECT(item)); if ( GTK_OBJECT_FLAGS( e_reflow_sorted ) & GNOME_CANVAS_ITEM_REALIZED ) { e_canvas_item_request_reflow(item); @@ -207,6 +208,7 @@ e_reflow_sorted_reorder_item(EReflowSorted *e_reflow_sorted, const gchar *id) if (item) { EReflow *reflow = E_REFLOW(e_reflow_sorted); reflow->items = g_list_remove_link(reflow->items, list); + gtk_object_unref(GTK_OBJECT(item)); g_list_free_1(list); e_reflow_sorted_add_item(reflow, item); } @@ -218,6 +220,7 @@ e_reflow_sorted_add_item(EReflow *reflow, GnomeCanvasItem *item) EReflowSorted *e_reflow_sorted = E_REFLOW_SORTED(reflow); if ( e_reflow_sorted->compare_func ) { reflow->items = g_list_insert_sorted(reflow->items, item, e_reflow_sorted->compare_func); + gtk_object_ref(GTK_OBJECT(item)); if ( GTK_OBJECT_FLAGS( e_reflow_sorted ) & GNOME_CANVAS_ITEM_REALIZED ) { gnome_canvas_item_set(item, -- cgit v1.2.3