diff options
author | Wu Xiaotian <[email protected]> | 2019-06-23 18:17:24 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-06-25 14:16:00 +0200 |
commit | 2f94e82f67629f312489894b5c27bb6e87b7b2fc (patch) | |
tree | 83e33f2c5d6ccd81b29c43ca664c1784d759992f /font-viewer/font-model.c | |
parent | 2bccfe30196b7d2c0f11b9e789e10705f97e56a5 (diff) | |
download | mate-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/font-model.c')
-rw-r--r-- | font-viewer/font-model.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/font-viewer/font-model.c b/font-viewer/font-model.c index 8cbc7ae0..c5d26ceb 100644 --- a/font-viewer/font-model.c +++ b/font-viewer/font-model.c @@ -61,7 +61,7 @@ enum { static guint signals[NUM_SIGNALS] = { 0, }; -G_DEFINE_TYPE (FontViewModel, font_view_model, GTK_TYPE_LIST_STORE); +G_DEFINE_TYPE_WITH_PRIVATE (FontViewModel, font_view_model, GTK_TYPE_LIST_STORE); #define ATTRIBUTES_FOR_CREATING_THUMBNAIL \ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE"," \ @@ -569,7 +569,7 @@ font_view_model_init (FontViewModel *self) GType types[NUM_COLUMNS] = { G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, GDK_TYPE_PIXBUF, G_TYPE_STRING }; - self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, FONT_VIEW_TYPE_MODEL, FontViewModelPrivate); + self->priv = font_view_model_get_instance_private (self); if (FT_Init_FreeType (&self->priv->library) != FT_Err_Ok) g_critical ("Can't initialize FreeType library"); @@ -634,7 +634,6 @@ font_view_model_class_init (FontViewModelClass *klass) 0, NULL, NULL, NULL, G_TYPE_NONE, 0); - g_type_class_add_private (klass, sizeof (FontViewModelPrivate)); } GtkTreeModel * |