diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-01-02 23:52:24 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-01-03 12:18:18 -0500 |
commit | 894a0c0ff4560d9fb400b872d3170491786197f3 (patch) | |
tree | 66f10ec18b9f0368153b5ea2eb43a250c96706e5 /gtk/gtkfontchooserwidget.c | |
parent | ade33c6e1450aecea17fbeabf11dd2ff1c9e0760 (diff) | |
download | gtk+-894a0c0ff4560d9fb400b872d3170491786197f3.tar.gz |
font chooser: Add properties for features and language
These can't be returned as part of the font description,
so we need new api for them. For now, this is just readonly
properties. Maybe these should be writable too, eventually.
Diffstat (limited to 'gtk/gtkfontchooserwidget.c')
-rw-r--r-- | gtk/gtkfontchooserwidget.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index ad1cbe7037..eb37bf84b3 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -330,6 +330,12 @@ gtk_font_chooser_widget_get_property (GObject *object, case GTK_FONT_CHOOSER_PROP_LEVEL: g_value_set_enum (value, gtk_font_chooser_widget_get_level (fontchooser)); break; + case GTK_FONT_CHOOSER_PROP_FONT_FEATURES: + g_value_set_string (value, fontchooser->priv->font_features); + break; + case GTK_FONT_CHOOSER_PROP_LANGUAGE: + g_value_set_string (value, pango_language_to_string (fontchooser->priv->font_language)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1863,6 +1869,7 @@ update_font_features (GtkFontChooserWidget *fontchooser) { g_free (priv->font_features); priv->font_features = g_string_free (s, FALSE); + g_object_notify (G_OBJECT (fontchooser), "font-features"); } else g_string_free (s, TRUE); @@ -1890,6 +1897,7 @@ update_language (GtkFontChooserWidget *fontchooser) if (priv->font_language != lang) { priv->font_language = lang; + g_object_notify (G_OBJECT (fontchooser), "language"); } } |