summaryrefslogtreecommitdiff
path: root/font-viewer/sushi-font-widget.h
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-03-08 13:41:05 +0100
committerraveit65 <[email protected]>2017-03-08 16:08:00 +0100
commit35f3012334a832a83878bfee21ec4324d2662def (patch)
treedc35d08e329fb7bccf71e17ad9cfa40638a8d840 /font-viewer/sushi-font-widget.h
parent440e7588459f39a56043bc85658aec5a9262a2e3 (diff)
downloadmate-control-center-35f3012334a832a83878bfee21ec4324d2662def.tar.bz2
mate-control-center-35f3012334a832a83878bfee21ec4324d2662def.tar.xz
font-viewer: sushi-font-widget: Add face_index argument
sushi_font_widget_new() now takes face index as the second argument. All callers changed. The face index of the widget can be accessed through the "face-index" property. Setting the "uri" property with g_object_set() no longer starts font loading, while it does when it is set through the constructor. This is to prevent the same font from being loaded twice, when both "uri" and "face-index" are set with g_object_set(). To start loading, you can explicitly call sushi_font_widget_load() after setting the properties. https://bugzilla.gnome.org/show_bug.cgi?id=752005 taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=3c48f73
Diffstat (limited to 'font-viewer/sushi-font-widget.h')
-rw-r--r--font-viewer/sushi-font-widget.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/font-viewer/sushi-font-widget.h b/font-viewer/sushi-font-widget.h
index 28b8f727..e794b871 100644
--- a/font-viewer/sushi-font-widget.h
+++ b/font-viewer/sushi-font-widget.h
@@ -59,12 +59,14 @@ struct _SushiFontWidgetClass
GType sushi_font_widget_get_type (void) G_GNUC_CONST;
-SushiFontWidget *sushi_font_widget_new (const gchar *uri);
+SushiFontWidget *sushi_font_widget_new (const gchar *uri, gint face_index);
FT_Face sushi_font_widget_get_ft_face (SushiFontWidget *self);
const gchar *sushi_font_widget_get_uri (SushiFontWidget *self);
+void sushi_font_widget_load (SushiFontWidget *self);
+
G_END_DECLS
#endif /* __SUSHI_FONT_WIDGET_H__ */