clear the extra_attrs list if we set "text" after "markup". (Fixes

Thu Dec 18 17:52:56 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_set_property):
	clear the extra_attrs list if we set "text" after "markup".
	(Fixes #121933, Federico Mena Quintero).
This commit is contained in:
Kristian Rietveld 2003-12-18 16:55:58 +00:00 committed by Kristian Rietveld
parent 0fe8b2d6d5
commit 10b2c91b23
6 changed files with 41 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Thu Dec 18 17:52:56 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_set_property):
clear the extra_attrs list if we set "text" after "markup".
(Fixes #121933, Federico Mena Quintero).
2003-12-18 Alexander Larsson <alexl@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_info_get_embedded_rect):

View File

@ -1,3 +1,9 @@
Thu Dec 18 17:52:56 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_set_property):
clear the extra_attrs list if we set "text" after "markup".
(Fixes #121933, Federico Mena Quintero).
2003-12-18 Alexander Larsson <alexl@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_info_get_embedded_rect):

View File

@ -1,3 +1,9 @@
Thu Dec 18 17:52:56 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_set_property):
clear the extra_attrs list if we set "text" after "markup".
(Fixes #121933, Federico Mena Quintero).
2003-12-18 Alexander Larsson <alexl@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_info_get_embedded_rect):

View File

@ -1,3 +1,9 @@
Thu Dec 18 17:52:56 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_set_property):
clear the extra_attrs list if we set "text" after "markup".
(Fixes #121933, Federico Mena Quintero).
2003-12-18 Alexander Larsson <alexl@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_info_get_embedded_rect):

View File

@ -1,3 +1,9 @@
Thu Dec 18 17:52:56 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_set_property):
clear the extra_attrs list if we set "text" after "markup".
(Fixes #121933, Federico Mena Quintero).
2003-12-18 Alexander Larsson <alexl@redhat.com>
* gtk/gtkicontheme.c (gtk_icon_info_get_embedded_rect):

View File

@ -123,6 +123,7 @@ struct _GtkCellRendererTextPrivate
{
guint single_paragraph : 1;
guint language_set : 1;
guint markup_set : 1;
gulong focus_out_id;
PangoLanguage *language;
@ -870,6 +871,15 @@ gtk_cell_renderer_text_set_property (GObject *object,
case PROP_TEXT:
if (celltext->text)
g_free (celltext->text);
if (priv->markup_set)
{
if (celltext->extra_attrs)
pango_attr_list_unref (celltext->extra_attrs);
celltext->extra_attrs = NULL;
priv->markup_set = FALSE;
}
celltext->text = g_strdup (g_value_get_string (value));
g_object_notify (object, "text");
break;
@ -912,6 +922,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
celltext->text = text;
celltext->extra_attrs = attrs;
priv->markup_set = TRUE;
}
break;