summaryrefslogtreecommitdiff
path: root/src/eom-metadata-reader-png.c
diff options
context:
space:
mode:
authorFelix Riemann <[email protected]>2013-10-04 14:21:20 +0200
committerraveit65 <[email protected]>2018-07-17 21:53:38 +0200
commitfb7c5396f68f03f634a57654267a67191031e75d (patch)
treef634486c039fa81b6953abc192fffa02dca3d6a4 /src/eom-metadata-reader-png.c
parent5a5612ab8ec4fb31464fa35e049a4a3b7cb64393 (diff)
downloadeom-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-metadata-reader-png.c')
-rw-r--r--src/eom-metadata-reader-png.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/eom-metadata-reader-png.c b/src/eom-metadata-reader-png.c
index c475e06..8ad2405 100644
--- a/src/eom-metadata-reader-png.c
+++ b/src/eom-metadata-reader-png.c
@@ -85,16 +85,14 @@ struct _EomMetadataReaderPngPrivate {
gboolean hasIHDR;
};
-#define EOM_METADATA_READER_PNG_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_METADATA_READER_PNG, EomMetadataReaderPngPrivate))
-
static void
eom_metadata_reader_png_init_emr_iface (gpointer g_iface, gpointer iface_data);
G_DEFINE_TYPE_WITH_CODE (EomMetadataReaderPng, eom_metadata_reader_png,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (EOM_TYPE_METADATA_READER,
- eom_metadata_reader_png_init_emr_iface))
+ eom_metadata_reader_png_init_emr_iface) \
+ G_ADD_PRIVATE(EomMetadataReaderPng))
static void
eom_metadata_reader_png_dispose (GObject *object)
@@ -121,11 +119,11 @@ eom_metadata_reader_png_dispose (GObject *object)
}
static void
-eom_metadata_reader_png_init (EomMetadataReaderPng *obj)
+eom_metadata_reader_png_init (EomMetadataReaderPng *emr)
{
EomMetadataReaderPngPrivate *priv;
- priv = obj->priv = EOM_METADATA_READER_PNG_GET_PRIVATE (obj);
+ priv = emr->priv = eom_metadata_reader_png_get_instance_private (emr);
priv->icc_chunk = NULL;
priv->icc_len = 0;
priv->xmp_chunk = NULL;
@@ -148,8 +146,6 @@ eom_metadata_reader_png_class_init (EomMetadataReaderPngClass *klass)
GObjectClass *object_class = (GObjectClass*) klass;
object_class->dispose = eom_metadata_reader_png_dispose;
-
- g_type_class_add_private (klass, sizeof (EomMetadataReaderPngPrivate));
}
static gboolean