Commit 80cf4229 authored by Felix Riemann's avatar Felix Riemann
Browse files

EogMetadataReader: Convert to G_DEFINE_TYPE_WITH_PRIVATE

Use G_ADD_PRIVATE for this due to G_DEFINE_TYPE_WITH_CODE
parent 7725a558
......@@ -86,9 +86,6 @@ struct _EogMetadataReaderJpgPrivate {
int bytes_read;
};
#define EOG_METADATA_READER_JPG_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_METADATA_READER_JPG, EogMetadataReaderJpgPrivate))
static void
eog_metadata_reader_jpg_init_emr_iface (gpointer g_iface, gpointer iface_data);
......@@ -96,7 +93,8 @@ eog_metadata_reader_jpg_init_emr_iface (gpointer g_iface, gpointer iface_data);
G_DEFINE_TYPE_WITH_CODE (EogMetadataReaderJpg, eog_metadata_reader_jpg,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (EOG_TYPE_METADATA_READER,
eog_metadata_reader_jpg_init_emr_iface))
eog_metadata_reader_jpg_init_emr_iface) \
G_ADD_PRIVATE (EogMetadataReaderJpg))
static void
......@@ -128,11 +126,11 @@ eog_metadata_reader_jpg_dispose (GObject *object)
}
static void
eog_metadata_reader_jpg_init (EogMetadataReaderJpg *obj)
eog_metadata_reader_jpg_init (EogMetadataReaderJpg *emr)
{
EogMetadataReaderJpgPrivate *priv;
priv = obj->priv = EOG_METADATA_READER_JPG_GET_PRIVATE (obj);
priv = emr->priv = eog_metadata_reader_jpg_get_instance_private (emr);
priv->exif_chunk = NULL;
priv->exif_len = 0;
priv->iptc_chunk = NULL;
......@@ -147,8 +145,6 @@ eog_metadata_reader_jpg_class_init (EogMetadataReaderJpgClass *klass)
GObjectClass *object_class = (GObjectClass*) klass;
object_class->dispose = eog_metadata_reader_jpg_dispose;
g_type_class_add_private (klass, sizeof (EogMetadataReaderJpgPrivate));
}
static gboolean
......
......@@ -85,16 +85,14 @@ struct _EogMetadataReaderPngPrivate {
gboolean hasIHDR;
};
#define EOG_METADATA_READER_PNG_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_METADATA_READER_PNG, EogMetadataReaderPngPrivate))
static void
eog_metadata_reader_png_init_emr_iface (gpointer g_iface, gpointer iface_data);
G_DEFINE_TYPE_WITH_CODE (EogMetadataReaderPng, eog_metadata_reader_png,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (EOG_TYPE_METADATA_READER,
eog_metadata_reader_png_init_emr_iface))
eog_metadata_reader_png_init_emr_iface) \
G_ADD_PRIVATE(EogMetadataReaderPng))
static void
eog_metadata_reader_png_dispose (GObject *object)
......@@ -121,11 +119,11 @@ eog_metadata_reader_png_dispose (GObject *object)
}
static void
eog_metadata_reader_png_init (EogMetadataReaderPng *obj)
eog_metadata_reader_png_init (EogMetadataReaderPng *emr)
{
EogMetadataReaderPngPrivate *priv;
priv = obj->priv = EOG_METADATA_READER_PNG_GET_PRIVATE (obj);
priv = emr->priv = eog_metadata_reader_png_get_instance_private (emr);
priv->icc_chunk = NULL;
priv->icc_len = 0;
priv->xmp_chunk = NULL;
......@@ -148,8 +146,6 @@ eog_metadata_reader_png_class_init (EogMetadataReaderPngClass *klass)
GObjectClass *object_class = (GObjectClass*) klass;
object_class->dispose = eog_metadata_reader_png_dispose;
g_type_class_add_private (klass, sizeof (EogMetadataReaderPngPrivate));
}
static gboolean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment