[eog] EogClipboardHandler: Convert to G_DEFINE_TYPE_WITH_PRIVATE



commit e0f99fbc2782126f6ff4b715b3c51de662b0d0a2
Author: Felix Riemann <friemann gnome org>
Date:   Fri Oct 4 14:23:44 2013 +0200

    EogClipboardHandler: Convert to G_DEFINE_TYPE_WITH_PRIVATE

 src/eog-clipboard-handler.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/eog-clipboard-handler.c b/src/eog-clipboard-handler.c
index a600894..b47116f 100644
--- a/src/eog-clipboard-handler.c
+++ b/src/eog-clipboard-handler.c
@@ -47,10 +47,7 @@ struct _EogClipboardHandlerPrivate {
        gchar     *uri;
 };
 
-#define EOG_CLIPBOARD_HANDLER_GET_PRIVATE(object) \
-       (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_CLIPBOARD_HANDLER, EogClipboardHandlerPrivate))
-
-G_DEFINE_TYPE(EogClipboardHandler, eog_clipboard_handler, G_TYPE_INITIALLY_UNOWNED)
+G_DEFINE_TYPE_WITH_PRIVATE(EogClipboardHandler, eog_clipboard_handler, G_TYPE_INITIALLY_UNOWNED)
 
 static GdkPixbuf*
 eog_clipboard_handler_get_pixbuf (EogClipboardHandler *handler)
@@ -178,7 +175,7 @@ eog_clipboard_handler_dispose (GObject *obj)
 static void
 eog_clipboard_handler_init (EogClipboardHandler *handler)
 {
-       handler->priv = EOG_CLIPBOARD_HANDLER_GET_PRIVATE (handler);
+       handler->priv = eog_clipboard_handler_get_instance_private (handler);
 }
 
 static void
@@ -186,8 +183,6 @@ eog_clipboard_handler_class_init (EogClipboardHandlerClass *klass)
 {
        GObjectClass *g_obj_class = G_OBJECT_CLASS (klass);
 
-       g_type_class_add_private (klass, sizeof (EogClipboardHandlerPrivate));
-
        g_obj_class->get_property = eog_clipboard_handler_get_property;
        g_obj_class->set_property = eog_clipboard_handler_set_property;
        g_obj_class->dispose = eog_clipboard_handler_dispose;


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