From 109c8d5aa6bece62bf80c281111975bf70784f02 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Wed, 25 Jul 2001 07:27:04 +0000 Subject: Properly ref the font we pass in as an ARG_FONT_E. (_do_tooltip): Removed 2001-07-25 Jon Trowbridge * gal/e-text/e-text.c (e_text_set_arg): Properly ref the font we pass in as an ARG_FONT_E. (_do_tooltip): Removed some crack. We no longer have to manually ref the font. The ref-counting now happens inside the set_arg function, as it should. (e_text_destroy): Set text->font to NULL after unrefing it. 2001-07-25 Jon Trowbridge * e-cell-text.c (ect_unrealize): Set text_view->font to NULL after we unref it. svn path=/trunk/; revision=11393 --- widgets/text/e-text.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'widgets/text/e-text.c') diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index f56e9fea55..b0dd3261e7 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -476,6 +476,7 @@ e_text_destroy (GtkObject *object) if (text->font) e_font_unref (text->font); + text->font = NULL; #if 0 if (text->suckfont) @@ -1265,6 +1266,7 @@ e_text_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) e_font_unref (text->font); text->font = GTK_VALUE_POINTER (*arg); + e_font_ref (text->font); calc_ellipsis (text); if (text->line_wrap) @@ -2797,9 +2799,6 @@ _do_tooltip (gpointer data) "fill_color", "light gray", NULL); - /* Ref the font so that it is not destroyed - when the tooltip text is destroyed */ - e_font_ref (text->font); tooltip_text = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (canvas)), e_text_get_type (), "anchor", GTK_ANCHOR_NW, -- cgit v1.2.3