diff options
author | Pablo Barciela <[email protected]> | 2019-08-21 00:28:00 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-09-02 23:58:10 +0000 |
commit | 37bc9459caba85375c1a9508cd6321cbf0d1e1c6 (patch) | |
tree | 3cefef77a68d1a9723c66e048e145417b990feb1 | |
parent | 8175abe15fbb13f4640e063f3756eb56fa46825b (diff) | |
download | mate-utils-37bc9459caba85375c1a9508cd6321cbf0d1e1c6.tar.bz2 mate-utils-37bc9459caba85375c1a9508cd6321cbf0d1e1c6.tar.xz |
logview-prefs: avoid 'g_type_class_add_private'
-rw-r--r-- | logview/src/logview-prefs.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/logview/src/logview-prefs.c b/logview/src/logview-prefs.c index f61e572f..6253120a 100644 --- a/logview/src/logview-prefs.c +++ b/logview/src/logview-prefs.c @@ -66,9 +66,6 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; -#define GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_PREFS, LogviewPrefsPrivate)) - struct _LogviewPrefsPrivate { GSettings *logview_prefs; GSettings *interface_prefs; @@ -76,7 +73,7 @@ struct _LogviewPrefsPrivate { GHashTable *filters; }; -G_DEFINE_TYPE (LogviewPrefs, logview_prefs, G_TYPE_OBJECT); +G_DEFINE_TYPE_WITH_PRIVATE (LogviewPrefs, logview_prefs, G_TYPE_OBJECT); static void do_finalize (GObject *obj) @@ -114,8 +111,6 @@ logview_prefs_class_init (LogviewPrefsClass *klass) g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); - - g_type_class_add_private (klass, sizeof (LogviewPrefsPrivate)); } static void @@ -302,7 +297,7 @@ logview_prefs_init (LogviewPrefs *self) { LogviewPrefsPrivate *priv; - priv = self->priv = GET_PRIVATE (self); + priv = self->priv = logview_prefs_get_instance_private (self); priv->logview_prefs = g_settings_new (LOGVIEW_SCHEMA); priv->interface_prefs = g_settings_new ("org.mate.interface"); |