aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-05-19 20:49:14 +0800
committerChris Lahey <clahey@src.gnome.org>2001-05-19 20:49:14 +0800
commit0b11ddccb9aa109b28f69fefb790453b558a096c (patch)
tree64acfa69cb7526ae2c149e2025960d0be6878604 /widgets/misc
parent4c9df70d2b792590cd17f26e5706a60c3e4b7ffc (diff)
downloadgsoc2013-evolution-0b11ddccb9aa109b28f69fefb790453b558a096c.tar
gsoc2013-evolution-0b11ddccb9aa109b28f69fefb790453b558a096c.tar.gz
gsoc2013-evolution-0b11ddccb9aa109b28f69fefb790453b558a096c.tar.bz2
gsoc2013-evolution-0b11ddccb9aa109b28f69fefb790453b558a096c.tar.lz
gsoc2013-evolution-0b11ddccb9aa109b28f69fefb790453b558a096c.tar.xz
gsoc2013-evolution-0b11ddccb9aa109b28f69fefb790453b558a096c.tar.zst
gsoc2013-evolution-0b11ddccb9aa109b28f69fefb790453b558a096c.zip
Killed a warning here. (model_changed, items_inserted): Check if we're
2001-05-19 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-reflow.c (model_changed): Killed a warning here. (model_changed, items_inserted): Check if we're empty. svn path=/trunk/; revision=9891
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-reflow.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index 65fb2f91a6..a2842f7f6f 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -300,9 +300,8 @@ items_inserted (EReflowModel *model, int position, int count, EReflow *reflow)
else
e_sorter_array_set_count (reflow->sorter, reflow->count);
reflow->need_reflow_columns = TRUE;
+ set_empty (reflow);
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM (reflow));
-
- g_print ("New count = %d\n", reflow->count);
}
static void
@@ -316,7 +315,8 @@ model_changed (EReflowModel *model, EReflow *reflow)
oldcount = count;
for (i = 0; i < count; i++) {
- gtk_object_destroy (GTK_OBJECT (reflow->items[i]));
+ if (reflow->items[i])
+ gtk_object_destroy (GTK_OBJECT (reflow->items[i]));
}
g_free (reflow->items);
g_free (reflow->heights);
@@ -337,6 +337,7 @@ model_changed (EReflowModel *model, EReflow *reflow)
reflow->need_reflow_columns = TRUE;
if (oldcount > reflow->count)
reflow_columns (reflow);
+ set_empty (reflow);
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM (reflow));
}
@@ -359,7 +360,7 @@ set_empty(EReflow *reflow)
}
} else {
if (reflow->empty_message)
- reflow->empty_text =
+ reflow->empty_text =
gnome_canvas_item_new(GNOME_CANVAS_GROUP(reflow),
e_text_get_type(),
"anchor", GTK_ANCHOR_N,
@@ -576,9 +577,6 @@ static void
e_reflow_destroy (GtkObject *object)
{
EReflow *reflow = E_REFLOW(object);
- int count;
-
- count = reflow->count;
g_free (reflow->items);
g_free (reflow->heights);