mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
fontbutton: Shorten clear_font_data a bit
This commit is contained in:
parent
86cc7f6925
commit
6320bd5849
@ -190,23 +190,11 @@ clear_font_data (GtkFontButton *font_button)
|
|||||||
{
|
{
|
||||||
GtkFontButtonPrivate *priv = gtk_font_button_get_instance_private (font_button);
|
GtkFontButtonPrivate *priv = gtk_font_button_get_instance_private (font_button);
|
||||||
|
|
||||||
if (priv->font_family)
|
g_clear_object (&priv->font_family);
|
||||||
g_object_unref (priv->font_family);
|
g_clear_object (&priv->font_face);
|
||||||
priv->font_family = NULL;
|
g_clear_pointer (&priv->font_desc, pango_font_description_free);
|
||||||
|
g_clear_pointer (&priv->fontname, g_free);
|
||||||
if (priv->font_face)
|
g_clear_pointer (&priv->font_features, g_free);
|
||||||
g_object_unref (priv->font_face);
|
|
||||||
priv->font_face = NULL;
|
|
||||||
|
|
||||||
if (priv->font_desc)
|
|
||||||
pango_font_description_free (priv->font_desc);
|
|
||||||
priv->font_desc = NULL;
|
|
||||||
|
|
||||||
g_free (priv->fontname);
|
|
||||||
priv->fontname = NULL;
|
|
||||||
|
|
||||||
g_free (priv->font_features);
|
|
||||||
priv->font_features = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user