diff options
author | Pablo Barciela <[email protected]> | 2019-08-21 00:18:08 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-09-02 23:58:10 +0000 |
commit | 3e4b980cf8ef119348360b2e30572ddd3e945fe4 (patch) | |
tree | 69f76c8ce29bd43f4779507b17e82c208babc6f0 | |
parent | 7f0457c0438ec2f76a4c04e384c2f78e0ede9043 (diff) | |
download | mate-utils-3e4b980cf8ef119348360b2e30572ddd3e945fe4.tar.bz2 mate-utils-3e4b980cf8ef119348360b2e30572ddd3e945fe4.tar.xz |
logview-app: avoid 'g_type_class_add_private'
-rw-r--r-- | logview/src/logview-app.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/logview/src/logview-app.c b/logview/src/logview-app.c index ebccf03b..d7f5af69 100644 --- a/logview/src/logview-app.c +++ b/logview/src/logview-app.c @@ -47,10 +47,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; static LogviewApp *app_singleton = NULL; -G_DEFINE_TYPE (LogviewApp, logview_app, G_TYPE_OBJECT); - -#define GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_APP, LogviewAppPrivate)) +G_DEFINE_TYPE_WITH_PRIVATE (LogviewApp, logview_app, G_TYPE_OBJECT); static gboolean main_window_delete_cb (GtkWidget *widget, @@ -300,14 +297,12 @@ logview_app_class_init (LogviewAppClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - - g_type_class_add_private (klass, sizeof (LogviewAppPrivate)); } static void logview_app_init (LogviewApp *self) { - LogviewAppPrivate *priv = self->priv = GET_PRIVATE (self); + LogviewAppPrivate *priv = self->priv = logview_app_get_instance_private (self); priv->prefs = logview_prefs_get (); priv->manager = logview_manager_get (); |