aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-group-container.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-table-group-container.c')
-rw-r--r--widgets/table/e-table-group-container.c31
1 files changed, 17 insertions, 14 deletions
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 <gdk/gdkkeysyms.h>
#include <gtk/gtksignal.h>
#include <libgnome/libgnome.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
+#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
#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)