diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-06-12 23:55:30 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-06-13 00:00:51 -0400 |
commit | 6f955a7df67222b6ee4b2502eb5e1428f9c91d20 (patch) | |
tree | c7ede1be96862e105dde7a169f1b0e03c00a0cd0 /gtk/gtkfontchooserutils.c | |
parent | 8c6130e68a6e62980251cb19a0fbcd50505700f1 (diff) | |
download | gtk+-6f955a7df67222b6ee4b2502eb5e1428f9c91d20.tar.gz |
Redo font map support in GtkFontChooser
We can't add properties to the interface, since it breaks
3rd party implementations of the GtkFontChooser interface.
These exist, for example in gnumeric.
So, instead of a new property, add getter/setter vfuncs.
Diffstat (limited to 'gtk/gtkfontchooserutils.c')
-rw-r--r-- | gtk/gtkfontchooserutils.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gtk/gtkfontchooserutils.c b/gtk/gtkfontchooserutils.c index ff8ca68110..36ebd8bcd0 100644 --- a/gtk/gtkfontchooserutils.c +++ b/gtk/gtkfontchooserutils.c @@ -64,6 +64,19 @@ delegate_set_filter_func (GtkFontChooser *chooser, } static void +delegate_set_font_map (GtkFontChooser *chooser, + PangoFontMap *map) +{ + gtk_font_chooser_set_font_map (get_delegate (chooser), map); +} + +static PangoFontMap * +delegate_get_font_map (GtkFontChooser *chooser) +{ + return gtk_font_chooser_get_font_map (get_delegate (chooser)); +} + +static void delegate_notify (GObject *object, GParamSpec *pspec, gpointer user_data) @@ -121,9 +134,6 @@ _gtk_font_chooser_install_properties (GObjectClass *klass) g_object_class_override_property (klass, GTK_FONT_CHOOSER_PROP_SHOW_PREVIEW_ENTRY, "show-preview-entry"); - g_object_class_override_property (klass, - GTK_FONT_CHOOSER_PROP_FONT_MAP, - "font-map"); } /** @@ -144,6 +154,8 @@ _gtk_font_chooser_delegate_iface_init (GtkFontChooserIface *iface) iface->get_font_face = delegate_get_font_face; iface->get_font_size = delegate_get_font_size; iface->set_filter_func = delegate_set_filter_func; + iface->set_font_map = delegate_set_font_map; + iface->get_font_map = delegate_get_font_map; } /** |