forked from AuroraMiddleware/gtk
Reset effective_attrs when necessary
This fixes both bug 607217 and bug 607269.
This commit is contained in:
parent
58956ad7e2
commit
b5061249e7
@ -1911,24 +1911,22 @@ gtk_label_recalculate (GtkLabel *label)
|
|||||||
guint keyval = label->mnemonic_keyval;
|
guint keyval = label->mnemonic_keyval;
|
||||||
|
|
||||||
if (label->use_markup)
|
if (label->use_markup)
|
||||||
{
|
gtk_label_set_markup_internal (label, label->label, label->use_underline);
|
||||||
gtk_label_set_markup_internal (label, label->label, label->use_underline);
|
|
||||||
gtk_label_compose_effective_attrs (label);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (label->use_underline)
|
if (label->use_underline)
|
||||||
{
|
gtk_label_set_uline_text_internal (label, label->label);
|
||||||
gtk_label_set_uline_text_internal (label, label->label);
|
|
||||||
gtk_label_compose_effective_attrs (label);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gtk_label_set_text_internal (label, g_strdup (label->label));
|
if (label->effective_attrs)
|
||||||
gtk_label_compose_effective_attrs (label);
|
pango_attr_list_unref (label->effective_attrs);
|
||||||
}
|
label->effective_attrs = NULL;
|
||||||
|
gtk_label_set_text_internal (label, g_strdup (label->label));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_label_compose_effective_attrs (label);
|
||||||
|
|
||||||
if (!label->use_underline)
|
if (!label->use_underline)
|
||||||
label->mnemonic_keyval = GDK_VoidSymbol;
|
label->mnemonic_keyval = GDK_VoidSymbol;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user