From 613453b1095e325149b8d37e5731d415e1d5f9bd Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 31 Oct 2002 21:30:57 +0000 Subject: merging the gal-2 branch back to the trunk. merging the gal-2 branch back to the trunk. svn path=/trunk/; revision=18471 --- widgets/table/e-table-group-container.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'widgets/table/e-table-group-container.c') diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index c7185d9007..87e5e40a14 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-table-group-container.c * Copyright 2000, 2001, Ximian, Inc. * @@ -25,12 +25,11 @@ #include #include #include -#include +#include #include "e-table-group-container.h" #include "e-table-group-leaf.h" #include "e-table-item.h" #include "gal/util/e-util.h" -#include "gal/util/e-unicode-i18n.h" #include "gal/widgets/e-canvas.h" #include "gal/widgets/e-canvas-utils.h" #include "gal/widgets/e-unicode.h" @@ -100,6 +99,7 @@ e_table_group_container_list_free (ETableGroupContainer *etgc) } g_list_free (etgc->children); + etgc->children = NULL; } static void @@ -109,19 +109,23 @@ etgc_destroy (GtkObject *object) if (etgc->font) gdk_font_unref (etgc->font); - etgc->font = NULL; + etgc->font = NULL; if (etgc->ecol) gtk_object_unref (GTK_OBJECT(etgc->ecol)); + etgc->ecol = NULL; if (etgc->sort_info) gtk_object_unref (GTK_OBJECT(etgc->sort_info)); + etgc->sort_info = NULL; if (etgc->selection_model) gtk_object_unref (GTK_OBJECT(etgc->selection_model)); + etgc->selection_model = NULL; if (etgc->rect) gtk_object_destroy (GTK_OBJECT(etgc->rect)); + etgc->rect = NULL; e_table_group_container_list_free (etgc); @@ -161,8 +165,8 @@ e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContaine etgc->n = n; etgc->ascending = column.ascending; - etgc->font = GTK_WIDGET (GNOME_CANVAS_ITEM (etgc)->canvas)->style->font; - + etgc->font = gtk_style_get_font (GTK_WIDGET (GNOME_CANVAS_ITEM (etgc)->canvas)->style); + gdk_font_ref (etgc->font); etgc->open = TRUE; @@ -347,14 +351,14 @@ compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_n if (etgc->ecol->text) { text = g_strdup_printf ((child_node->count == 1) - ? U_("%s : %s (%d item)") - : U_("%s : %s (%d items)"), + ? _("%s : %s (%d item)") + : _("%s : %s (%d items)"), etgc->ecol->text, child_node->string, (gint) child_node->count); } else { text = g_strdup_printf ((child_node->count == 1) - ? U_("%s (%d item)") - : U_("%s (%d items)"), + ? _("%s (%d item)") + : _("%s (%d items)"), child_node->string, (gint) child_node->count); } @@ -1046,7 +1050,7 @@ e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, void *clos (*fn) (E_TABLE_GROUP_LEAF (etg)->item, closure); } else { g_error ("Unknown ETableGroup found: %s", - gtk_type_name (GTK_OBJECT (etg)->klass->type)); + g_type_name (G_TYPE_FROM_INSTANCE (etg))); } } @@ -1102,8 +1106,7 @@ e_table_group_container_print_page (EPrintable *ep, GList *child; EPrintable *child_printable; gchar *string; - - GnomeFont *font = gnome_font_new ("Helvetica", TEXT_HEIGHT); + GnomeFont *font = gnome_font_find ("Helvetica", TEXT_HEIGHT); child_printable = groupcontext->child_printable; child = groupcontext->child; @@ -1399,7 +1402,7 @@ e_table_group_container_will_fit (EPrintable *ep, static void e_table_group_container_printable_destroy (GtkObject *object, - ETGCPrintContext *groupcontext) + ETGCPrintContext *groupcontext) { gtk_object_unref(GTK_OBJECT(groupcontext->etgc)); if (groupcontext->child_printable) -- cgit v1.2.3