summaryrefslogtreecommitdiff
path: root/src/eom-print-preview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eom-print-preview.c')
-rw-r--r--src/eom-print-preview.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/eom-print-preview.c b/src/eom-print-preview.c
index 02f4927..214d285 100644
--- a/src/eom-print-preview.c
+++ b/src/eom-print-preview.c
@@ -26,11 +26,6 @@
#include "eom-image.h"
#include "eom-print-preview.h"
-#define EOM_PRINT_PREVIEW_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_PRINT_PREVIEW, EomPrintPreviewPrivate))
-
-G_DEFINE_TYPE (EomPrintPreview, eom_print_preview, GTK_TYPE_ASPECT_FRAME)
-
struct _EomPrintPreviewPrivate {
GtkWidget *area;
GdkPixbuf *image;
@@ -96,6 +91,8 @@ enum {
PROP_PAGE_BOTTOM_MARGIN
};
+G_DEFINE_TYPE_WITH_PRIVATE (EomPrintPreview, eom_print_preview, GTK_TYPE_ASPECT_FRAME)
+
static void eom_print_preview_draw (EomPrintPreview *preview, cairo_t *cr);
static void eom_print_preview_finalize (GObject *object);
static void update_relative_sizes (EomPrintPreview *preview);
@@ -389,8 +386,6 @@ eom_print_preview_class_init (EomPrintPreviewClass *klass)
G_SIGNAL_RUN_FIRST, 0, NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE,
0, NULL);
-
- g_type_class_add_private (klass, sizeof (EomPrintPreviewPrivate));
}
static void
@@ -424,7 +419,7 @@ eom_print_preview_init (EomPrintPreview *preview)
EomPrintPreviewPrivate *priv;
gfloat ratio;
- priv = preview->priv = EOM_PRINT_PREVIEW_GET_PRIVATE (preview);
+ priv = preview->priv = eom_print_preview_get_instance_private (preview);
priv->area = GTK_WIDGET (gtk_drawing_area_new ());