summaryrefslogtreecommitdiff
path: root/gtk/gtkprinter.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkprinter.c')
-rw-r--r--gtk/gtkprinter.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gtk/gtkprinter.c b/gtk/gtkprinter.c
index fac0136fe5..d8097363aa 100644
--- a/gtk/gtkprinter.c
+++ b/gtk/gtkprinter.c
@@ -102,7 +102,7 @@ static void gtk_printer_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
-G_DEFINE_TYPE (GtkPrinter, gtk_printer, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GtkPrinter, gtk_printer, G_TYPE_OBJECT)
static void
gtk_printer_class_init (GtkPrinterClass *class)
@@ -115,8 +115,6 @@ gtk_printer_class_init (GtkPrinterClass *class)
object_class->set_property = gtk_printer_set_property;
object_class->get_property = gtk_printer_get_property;
- g_type_class_add_private (class, sizeof (GtkPrinterPrivate));
-
g_object_class_install_property (G_OBJECT_CLASS (class),
PROP_NAME,
g_param_spec_string ("name",
@@ -240,9 +238,7 @@ gtk_printer_init (GtkPrinter *printer)
{
GtkPrinterPrivate *priv;
- priv = printer->priv = G_TYPE_INSTANCE_GET_PRIVATE (printer,
- GTK_TYPE_PRINTER,
- GtkPrinterPrivate);
+ priv = printer->priv = gtk_printer_get_instance_private (printer);
priv->name = NULL;
priv->location = NULL;