summaryrefslogtreecommitdiff
path: root/font-viewer/sushi-font-widget.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-23 18:17:24 +0800
committerraveit65 <[email protected]>2019-06-25 14:16:00 +0200
commit2f94e82f67629f312489894b5c27bb6e87b7b2fc (patch)
tree83e33f2c5d6ccd81b29c43ca664c1784d759992f /font-viewer/sushi-font-widget.c
parent2bccfe30196b7d2c0f11b9e789e10705f97e56a5 (diff)
downloadmate-control-center-2f94e82f67629f312489894b5c27bb6e87b7b2fc.tar.bz2
mate-control-center-2f94e82f67629f312489894b5c27bb6e87b7b2fc.tar.xz
font-viewer: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'font-viewer/sushi-font-widget.c')
-rw-r--r--font-viewer/sushi-font-widget.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/font-viewer/sushi-font-widget.c b/font-viewer/sushi-font-widget.c
index bad2ffee..cffd8776 100644
--- a/font-viewer/sushi-font-widget.c
+++ b/font-viewer/sushi-font-widget.c
@@ -62,7 +62,7 @@ struct _SushiFontWidgetPrivate {
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
static guint signals[NUM_SIGNALS] = { 0, };
-G_DEFINE_TYPE (SushiFontWidget, sushi_font_widget, GTK_TYPE_DRAWING_AREA);
+G_DEFINE_TYPE_WITH_PRIVATE (SushiFontWidget, sushi_font_widget, GTK_TYPE_DRAWING_AREA);
#define SURFACE_SIZE 4
#define SECTION_SPACING 16
@@ -586,8 +586,7 @@ sushi_font_widget_init (SushiFontWidget *self)
{
FT_Error err;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, SUSHI_TYPE_FONT_WIDGET,
- SushiFontWidgetPrivate);
+ self->priv = sushi_font_widget_get_instance_private (self);
self->priv->face = NULL;
err = FT_Init_FreeType (&self->priv->library);
@@ -716,7 +715,6 @@ sushi_font_widget_class_init (SushiFontWidgetClass *klass)
G_TYPE_NONE, 1, G_TYPE_STRING);
g_object_class_install_properties (oclass, NUM_PROPERTIES, properties);
- g_type_class_add_private (klass, sizeof (SushiFontWidgetPrivate));
}
SushiFontWidget *