diff options
author | Felix Riemann <[email protected]> | 2013-10-04 14:21:20 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-07-17 21:53:38 +0200 |
commit | fb7c5396f68f03f634a57654267a67191031e75d (patch) | |
tree | f634486c039fa81b6953abc192fffa02dca3d6a4 /src/eom-plugin-engine.c | |
parent | 5a5612ab8ec4fb31464fa35e049a4a3b7cb64393 (diff) | |
download | eom-fb7c5396f68f03f634a57654267a67191031e75d.tar.bz2 eom-fb7c5396f68f03f634a57654267a67191031e75d.tar.xz |
Convert to G_DEFINE_TYPE_WITH_PRIVATE part 2
origin commits:
https://gitlab.gnome.org/GNOME/eog/commit/ffc4137
https://gitlab.gnome.org/GNOME/eog/commit/ad8c963
https://gitlab.gnome.org/GNOME/eog/commit/afa0dc8
https://gitlab.gnome.org/GNOME/eog/commit/119a768
https://gitlab.gnome.org/GNOME/eog/commit/7725a55
https://gitlab.gnome.org/GNOME/eog/commit/80cf422
Diffstat (limited to 'src/eom-plugin-engine.c')
-rw-r--r-- | src/eom-plugin-engine.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/eom-plugin-engine.c b/src/eom-plugin-engine.c index 534b28c..dc434f2 100644 --- a/src/eom-plugin-engine.c +++ b/src/eom-plugin-engine.c @@ -38,23 +38,11 @@ #define USER_EOM_PLUGINS_LOCATION "plugins/" -G_DEFINE_TYPE (EomPluginEngine, eom_plugin_engine, PEAS_TYPE_ENGINE) - struct _EomPluginEnginePrivate { GSettings *plugins_settings; }; -static void -eom_plugin_engine_init (EomPluginEngine *engine) -{ - eom_debug (DEBUG_PLUGINS); - - engine->priv = G_TYPE_INSTANCE_GET_PRIVATE (engine, - EOM_TYPE_PLUGIN_ENGINE, - EomPluginEnginePrivate); - - engine->priv->plugins_settings = g_settings_new (EOM_CONF_PLUGINS); -} +G_DEFINE_TYPE_WITH_PRIVATE (EomPluginEngine, eom_plugin_engine, PEAS_TYPE_ENGINE) static void eom_plugin_engine_dispose (GObject *object) @@ -76,8 +64,16 @@ eom_plugin_engine_class_init (EomPluginEngineClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = eom_plugin_engine_dispose; +} + +static void +eom_plugin_engine_init (EomPluginEngine *engine) +{ + eom_debug (DEBUG_PLUGINS); - g_type_class_add_private (klass, sizeof (EomPluginEnginePrivate)); + engine->priv = eom_plugin_engine_get_instance_private (engine); + + engine->priv->plugins_settings = g_settings_new (EOM_CONF_PLUGINS); } EomPluginEngine * |