aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/e-table')
-rw-r--r--widgets/e-table/ChangeLog8
-rw-r--r--widgets/e-table/e-table-group-container.c19
-rw-r--r--widgets/e-table/e-table-item.c2
3 files changed, 23 insertions, 6 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 19a60a1299..0c9ee610db 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,11 @@
+2000-02-25 Christopher James Lahey <clahey@helixcode.com>
+
+ * e-table-item.c: Made the E table item redraw properly.
+
+ * e-table-group-container.c: Added handling to distinguish between
+ n items and 1 item. Got rid of a crash due to an abandoned timeout
+ callback.
+
2000-02-24 Christopher James Lahey <clahey@helixcode.com>
* e-cell-text.c: Made carriage return stop editting instead of
diff --git a/widgets/e-table/e-table-group-container.c b/widgets/e-table/e-table-group-container.c
index 4b30f6af29..1ae73b6c3b 100644
--- a/widgets/e-table/e-table-group-container.c
+++ b/widgets/e-table/e-table-group-container.c
@@ -75,6 +75,8 @@ e_table_group_container_list_free(ETableGroupContainer *etgc)
{
ETableGroupContainerChildNode *child_node;
GList *list;
+ if ( etgc->idle )
+ g_source_remove( etgc->idle );
for ( list = etgc->children; list; list = g_list_next(list) ) {
child_node = (ETableGroupContainerChildNode *) list->data;
e_table_group_container_child_node_free(etgc, child_node);
@@ -87,9 +89,16 @@ etgc_destroy (GtkObject *object)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (object);
- gdk_font_unref(etgc->font);
- gtk_object_unref(GTK_OBJECT(etgc->ecol));
- gtk_object_destroy(GTK_OBJECT(etgc->rect));
+ if ( etgc->font ) {
+ gdk_font_unref(etgc->font);
+ etgc->font = NULL;
+ }
+ if ( etgc->ecol ) {
+ gtk_object_unref(GTK_OBJECT(etgc->ecol));
+ }
+ if ( etgc->rect ) {
+ gtk_object_destroy(GTK_OBJECT(etgc->rect));
+ }
e_table_group_container_list_free(etgc);
GTK_OBJECT_CLASS (etgc_parent_class)->destroy (object);
@@ -502,8 +511,6 @@ etgc_unrealize (GnomeCanvasItem *item)
etgc = E_TABLE_GROUP_CONTAINER (item);
- etgc->font = NULL;
-
if (GNOME_CANVAS_ITEM_CLASS(etgc_parent_class)->unrealize)
(* GNOME_CANVAS_ITEM_CLASS(etgc_parent_class)->unrealize) (item);
}
@@ -512,7 +519,7 @@ static void
compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_node)
{
/* FIXME : What a hack, eh? */
- gchar *text = g_strdup_printf("%s : %s (%d items)", etgc->ecol->text, (gchar *)child_node->key, (gint) child_node->count);
+ gchar *text = g_strdup_printf("%s : %s (%d item%s)", etgc->ecol->text, (gchar *)child_node->key, (gint) child_node->count, child_node->count == 1 ? "" : "s" );
gnome_canvas_item_set(child_node->text,
"text", text,
NULL);
diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c
index a7d5573fad..222d4592cf 100644
--- a/widgets/e-table/e-table-item.c
+++ b/widgets/e-table/e-table-item.c
@@ -316,6 +316,8 @@ eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
eti_compute_height (eti);
eti_update (GNOME_CANVAS_ITEM (eti), NULL, NULL, 0);
+
+ eti_item_region_redraw (eti, 0, 0, eti->width, eti->height);
}
static void