libgimp: make GimpFontSelectButton interpret NULL as the current font

like all other select buttons do.
This commit is contained in:
Michael Natterer 2019-08-04 17:14:18 +02:00
parent ae7fa2a1de
commit 89feeecc96
2 changed files with 15 additions and 4 deletions

View File

@ -298,8 +298,6 @@ gimp_brush_select_button_init (GimpBrushSelectButton *button)
priv->inside = gimp_brush_select_button_create_inside (button);
gtk_container_add (GTK_CONTAINER (button), priv->inside);
priv->popup = NULL;
}
/**

View File

@ -252,9 +252,22 @@ gimp_font_select_button_set_font (GimpFontSelectButton *button,
select_button = GIMP_SELECT_BUTTON (button);
if (select_button->temp_callback)
gimp_fonts_set_popup (select_button->temp_callback, font_name);
{
gimp_fonts_set_popup (select_button->temp_callback, font_name);
}
else
gimp_font_select_button_callback (font_name, FALSE, button);
{
gchar *name;
if (font_name && *font_name)
name = g_strdup (font_name);
else
name = gimp_context_get_font ();
gimp_font_select_button_callback (name, FALSE, button);
g_free (name);
}
}