mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
libgimp: make GimpFontSelectButton interpret NULL as the current font
like all other select buttons do.
This commit is contained in:
parent
ae7fa2a1de
commit
89feeecc96
2 changed files with 15 additions and 4 deletions
|
@ -298,8 +298,6 @@ gimp_brush_select_button_init (GimpBrushSelectButton *button)
|
||||||
|
|
||||||
priv->inside = gimp_brush_select_button_create_inside (button);
|
priv->inside = gimp_brush_select_button_create_inside (button);
|
||||||
gtk_container_add (GTK_CONTAINER (button), priv->inside);
|
gtk_container_add (GTK_CONTAINER (button), priv->inside);
|
||||||
|
|
||||||
priv->popup = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -252,9 +252,22 @@ gimp_font_select_button_set_font (GimpFontSelectButton *button,
|
||||||
select_button = GIMP_SELECT_BUTTON (button);
|
select_button = GIMP_SELECT_BUTTON (button);
|
||||||
|
|
||||||
if (select_button->temp_callback)
|
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
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue