* clutter/clutter-label.c: (clutter_label_ensure_layout): avoid

calling pango_layout_set_text|markup before we've got any text.
This commit is contained in:
Øyvind Kolås 2007-09-28 10:54:42 +00:00
parent 7d7d235729
commit f7a426587c
2 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2007-09-28 Øyvind Kolås <pippin@openedhand.com>
* clutter/clutter-label.c: (clutter_label_ensure_layout): avoid
calling pango_layout_set_text|markup before we've got any text.
2007-09-27 Matthew Allum <mallum@openedhand.com> 2007-09-27 Matthew Allum <mallum@openedhand.com>
* tests/test-scale.c: * tests/test-scale.c:

View File

@ -225,10 +225,13 @@ clutter_label_ensure_layout (ClutterLabel *label,
pango_layout_set_font_description (priv->layout, priv->desc); pango_layout_set_font_description (priv->layout, priv->desc);
if (priv->text)
{
if (!priv->use_markup) if (!priv->use_markup)
pango_layout_set_text (priv->layout, priv->text, -1); pango_layout_set_text (priv->layout, priv->text, -1);
else else
pango_layout_set_markup (priv->layout, priv->text, -1); pango_layout_set_markup (priv->layout, priv->text, -1);
}
if (priv->wrap) if (priv->wrap)
pango_layout_set_wrap (priv->layout, priv->wrap_mode); pango_layout_set_wrap (priv->layout, priv->wrap_mode);