aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-09 15:09:28 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-09 15:09:28 +0800
commit6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c (patch)
tree24987a939bc1a06b840662e42a0cf4caecf095ad /widgets
parent3f6ddb02e81fcd90987bc19b5e495686443617f9 (diff)
downloadgsoc2013-evolution-6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c.tar
gsoc2013-evolution-6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c.tar.gz
gsoc2013-evolution-6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c.tar.bz2
gsoc2013-evolution-6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c.tar.lz
gsoc2013-evolution-6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c.tar.xz
gsoc2013-evolution-6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c.tar.zst
gsoc2013-evolution-6692c3b3d49dbf23caeb6f4f8adecc8508a6d23c.zip
Rearranged order of things getting destroyed.
2000-05-09 Christopher James Lahey <clahey@helixcode.com> * 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
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-reflow/e-reflow-sorted.c3
-rw-r--r--widgets/e-reflow/e-reflow.c4
-rw-r--r--widgets/misc/e-reflow.c4
3 files changed, 11 insertions, 0 deletions
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,
diff --git a/widgets/e-reflow/e-reflow.c b/widgets/e-reflow/e-reflow.c
index 6706357ede..bd0fc99084 100644
--- a/widgets/e-reflow/e-reflow.c
+++ b/widgets/e-reflow/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,
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,