aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-02-25 13:53:54 +0800
committerChris Lahey <clahey@src.gnome.org>2000-02-25 13:53:54 +0800
commit323b824b844a937593833c1704b6f2cd5335d6a5 (patch)
tree2b819c8f4d95520645a68d3a4551fa6a4073681a /widgets/e-table
parent7f601b6db6eed262aeda3276ee4c4987d2818843 (diff)
downloadgsoc2013-evolution-323b824b844a937593833c1704b6f2cd5335d6a5.tar
gsoc2013-evolution-323b824b844a937593833c1704b6f2cd5335d6a5.tar.gz
gsoc2013-evolution-323b824b844a937593833c1704b6f2cd5335d6a5.tar.bz2
gsoc2013-evolution-323b824b844a937593833c1704b6f2cd5335d6a5.tar.lz
gsoc2013-evolution-323b824b844a937593833c1704b6f2cd5335d6a5.tar.xz
gsoc2013-evolution-323b824b844a937593833c1704b6f2cd5335d6a5.tar.zst
gsoc2013-evolution-323b824b844a937593833c1704b6f2cd5335d6a5.zip
Made the E table item redraw properly.
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. svn path=/trunk/; revision=1933
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