[eog] EogPluginEngine: Convert to G_DEFINE_TYPE_WITH_PRIVATE
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogPluginEngine: Convert to G_DEFINE_TYPE_WITH_PRIVATE
- Date: Fri, 4 Oct 2013 13:27:31 +0000 (UTC)
commit 119a768de747c60cb3464d5f2e3d94b1825a1025
Author: Felix Riemann <friemann gnome org>
Date: Fri Oct 4 14:19:20 2013 +0200
EogPluginEngine: Convert to G_DEFINE_TYPE_WITH_PRIVATE
src/eog-plugin-engine.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/eog-plugin-engine.c b/src/eog-plugin-engine.c
index 8c13bed..3c082e2 100644
--- a/src/eog-plugin-engine.c
+++ b/src/eog-plugin-engine.c
@@ -38,12 +38,12 @@
#define EOG_PLUGIN_DATA_DIR EOG_DATA_DIR G_DIR_SEPARATOR_S "plugins"
-G_DEFINE_TYPE (EogPluginEngine, eog_plugin_engine, PEAS_TYPE_ENGINE)
-
struct _EogPluginEnginePrivate {
GSettings *plugins_settings;
};
+G_DEFINE_TYPE_WITH_PRIVATE (EogPluginEngine, eog_plugin_engine, PEAS_TYPE_ENGINE);
+
static void
eog_plugin_engine_dispose (GObject *object)
{
@@ -63,8 +63,6 @@ eog_plugin_engine_class_init (EogPluginEngineClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (EogPluginEnginePrivate));
-
object_class->dispose = eog_plugin_engine_dispose;
}
@@ -73,9 +71,7 @@ eog_plugin_engine_init (EogPluginEngine *engine)
{
eog_debug (DEBUG_PLUGINS);
- engine->priv = G_TYPE_INSTANCE_GET_PRIVATE (engine,
- EOG_TYPE_PLUGIN_ENGINE,
- EogPluginEnginePrivate);
+ engine->priv = eog_plugin_engine_get_instance_private (engine);
engine->priv->plugins_settings = g_settings_new ("org.gnome.eog.plugins");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]