summaryrefslogtreecommitdiff
path: root/font-viewer/gd-main-toolbar.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/gd-main-toolbar.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/gd-main-toolbar.c')
-rw-r--r--font-viewer/gd-main-toolbar.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/font-viewer/gd-main-toolbar.c b/font-viewer/gd-main-toolbar.c
index 6d9e9c42..733052b3 100644
--- a/font-viewer/gd-main-toolbar.c
+++ b/font-viewer/gd-main-toolbar.c
@@ -24,8 +24,6 @@
#include <math.h>
#include <glib/gi18n.h>
-G_DEFINE_TYPE (GdMainToolbar, gd_main_toolbar, GTK_TYPE_TOOLBAR)
-
typedef enum {
CHILD_NORMAL = 0,
CHILD_TOGGLE = 1,
@@ -62,6 +60,8 @@ enum {
PROP_SHOW_MODES,
};
+G_DEFINE_TYPE_WITH_PRIVATE (GdMainToolbar, gd_main_toolbar, GTK_TYPE_TOOLBAR)
+
static void
gd_main_toolbar_dispose (GObject *obj)
{
@@ -328,7 +328,7 @@ gd_main_toolbar_constructed (GObject *obj)
static void
gd_main_toolbar_init (GdMainToolbar *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GD_TYPE_MAIN_TOOLBAR, GdMainToolbarPrivate);
+ self->priv = gd_main_toolbar_get_instance_private (self);
}
static void
@@ -349,8 +349,6 @@ gd_main_toolbar_class_init (GdMainToolbarClass *klass)
"Show Modes",
FALSE,
G_PARAM_READWRITE));
-
- g_type_class_add_private (klass, sizeof (GdMainToolbarPrivate));
}
void