summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-22 11:39:01 +0200
committerZenWalker <[email protected]>2019-07-25 00:11:52 +0200
commit3e6c9fe48cfbbea769cd8e288f0e429a62325311 (patch)
tree79cff0a59c756307f589e829b71b125930f87dfe
parent8ea03337a81e6dba9ee1aa98b3845133eb3df21d (diff)
downloadpluma-3e6c9fe48cfbbea769cd8e288f0e429a62325311.tar.bz2
pluma-3e6c9fe48cfbbea769cd8e288f0e429a62325311.tar.xz
pluma-plugins-engine: avoid 'g_type_class_add_private'
-rw-r--r--pluma/pluma-plugins-engine.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/pluma/pluma-plugins-engine.c b/pluma/pluma-plugins-engine.c
index c670e620..9893fdea 100644
--- a/pluma/pluma-plugins-engine.c
+++ b/pluma/pluma-plugins-engine.c
@@ -43,13 +43,13 @@
#include "pluma-prefs-manager.h"
#include "pluma-dirs.h"
-G_DEFINE_TYPE (PlumaPluginsEngine, pluma_plugins_engine, PEAS_TYPE_ENGINE)
-
struct _PlumaPluginsEnginePrivate
{
GSettings *plugin_settings;
};
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaPluginsEngine, pluma_plugins_engine, PEAS_TYPE_ENGINE)
+
PlumaPluginsEngine *default_engine = NULL;
static void
@@ -62,9 +62,7 @@ pluma_plugins_engine_init (PlumaPluginsEngine *engine)
peas_engine_enable_loader (PEAS_ENGINE (engine), "python3");
- engine->priv = G_TYPE_INSTANCE_GET_PRIVATE (engine,
- PLUMA_TYPE_PLUGINS_ENGINE,
- PlumaPluginsEnginePrivate);
+ engine->priv = pluma_plugins_engine_get_instance_private (engine);
engine->priv->plugin_settings = g_settings_new (PLUMA_SCHEMA);
@@ -132,8 +130,6 @@ pluma_plugins_engine_class_init (PlumaPluginsEngineClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = pluma_plugins_engine_dispose;
-
- g_type_class_add_private (klass, sizeof (PlumaPluginsEnginePrivate));
}
PlumaPluginsEngine *