{
font_button->priv->use_font = use_font;
- if (use_font)
- gtk_font_button_label_use_font (font_button);
- else
- gtk_widget_set_style (font_button->priv->font_label, NULL);
+ gtk_font_button_label_use_font (font_button);
- g_object_notify (G_OBJECT (font_button), "use-font");
+ g_object_notify (G_OBJECT (font_button), "use-font");
}
}
{
font_button->priv->use_size = use_size;
- if (font_button->priv->use_font)
- gtk_font_button_label_use_font (font_button);
+ gtk_font_button_label_use_font (font_button);
g_object_notify (G_OBJECT (font_button), "use-size");
}
{
PangoFontDescription *desc;
- if (!font_button->priv->use_font)
- return;
-
- desc = pango_font_description_copy (font_button->priv->font_desc);
+ if (font_button->priv->use_font)
+ {
+ desc = pango_font_description_copy (font_button->priv->font_desc);
- if (!font_button->priv->use_size)
- pango_font_description_unset_fields (desc, PANGO_FONT_MASK_SIZE);
+ if (!font_button->priv->use_size)
+ pango_font_description_unset_fields (desc, PANGO_FONT_MASK_SIZE);
+ }
+ else
+ desc = NULL;
- gtk_widget_modify_font (font_button->priv->font_label, desc);
+ gtk_widget_override_font (font_button->priv->font_label, desc);
- pango_font_description_free (desc);
+ if (desc)
+ pango_font_description_free (desc);
}
static void