diff options
author | Pablo Barciela <[email protected]> | 2019-07-11 01:41:11 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-07-12 04:32:53 +0000 |
commit | d225445f010dc660bb18ff775fb1d5d565c76ee3 (patch) | |
tree | bb300caf661d74024a7016d98cfc2984bf28aec2 | |
parent | 45145244b6dd9dc11b6d9a6daf4e442cef9457fa (diff) | |
download | pluma-d225445f010dc660bb18ff775fb1d5d565c76ee3.tar.bz2 pluma-d225445f010dc660bb18ff775fb1d5d565c76ee3.tar.xz |
pluma-app: avoid 'g_type_class_add_private'
-rw-r--r-- | pluma/pluma-app.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pluma/pluma-app.c b/pluma/pluma-app.c index f661974f..82172a4f 100644 --- a/pluma/pluma-app.c +++ b/pluma/pluma-app.c @@ -50,8 +50,6 @@ #define PLUMA_PAGE_SETUP_FILE "pluma-page-setup" #define PLUMA_PRINT_SETTINGS_FILE "pluma-print-settings" -#define PLUMA_APP_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_APP, PlumaAppPrivate)) - /* Properties */ enum { @@ -70,7 +68,7 @@ struct _PlumaAppPrivate GtkPrintSettings *print_settings; }; -G_DEFINE_TYPE(PlumaApp, pluma_app, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (PlumaApp, pluma_app, G_TYPE_OBJECT) static void pluma_app_finalize (GObject *object) @@ -123,8 +121,6 @@ pluma_app_class_init (PlumaAppClass *klass) 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); - - g_type_class_add_private (object_class, sizeof(PlumaAppPrivate)); } static gboolean @@ -330,7 +326,7 @@ save_print_settings (PlumaApp *app) static void pluma_app_init (PlumaApp *app) { - app->priv = PLUMA_APP_GET_PRIVATE (app); + app->priv = pluma_app_get_instance_private (app); load_accels (); |