[eog] EogExifDetails: Convert to G_DEFINE_TYPE_WITH_PRIVATE



commit 77be951cb3d61fa2c051de14ea3501d2c07cf7e6
Author: Felix Riemann <friemann gnome org>
Date:   Fri Oct 4 14:22:46 2013 +0200

    EogExifDetails: Convert to G_DEFINE_TYPE_WITH_PRIVATE

 src/eog-exif-details.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/eog-exif-details.c b/src/eog-exif-details.c
index 4f9c6ed..4db3bbc 100644
--- a/src/eog-exif-details.c
+++ b/src/eog-exif-details.c
@@ -40,11 +40,6 @@
 
 #include <string.h>
 
-#define EOG_EXIF_DETAILS_GET_PRIVATE(object) \
-       (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_EXIF_DETAILS, EogExifDetailsPrivate))
-
-G_DEFINE_TYPE (EogExifDetails, eog_exif_details, GTK_TYPE_TREE_VIEW)
-
 typedef enum {
        EXIF_CATEGORY_CAMERA,
        EXIF_CATEGORY_IMAGE_DATA,
@@ -209,6 +204,8 @@ static char*  set_row_data (GtkTreeStore *store, char *path, char *parent, const
 
 static void eog_exif_details_reset (EogExifDetails *exif_details);
 
+G_DEFINE_TYPE_WITH_PRIVATE (EogExifDetails, eog_exif_details, GTK_TYPE_TREE_VIEW)
+
 static void
 eog_exif_details_dispose (GObject *object)
 {
@@ -240,7 +237,7 @@ eog_exif_details_init (EogExifDetails *exif_details)
        GtkTreeViewColumn *column;
        GtkCellRenderer *cell;
 
-       exif_details->priv = EOG_EXIF_DETAILS_GET_PRIVATE (exif_details);
+       exif_details->priv = eog_exif_details_get_instance_private (exif_details);
 
        priv = exif_details->priv;
 
@@ -276,8 +273,6 @@ eog_exif_details_class_init (EogExifDetailsClass *klass)
        GObjectClass *object_class = (GObjectClass*) klass;
 
        object_class->dispose = eog_exif_details_dispose;
-
-       g_type_class_add_private (object_class, sizeof (EogExifDetailsPrivate));
 }
 
 #ifdef HAVE_EXIF


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]