summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrenderertext.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkcellrenderertext.c')
-rw-r--r--gtk/gtkcellrenderertext.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index 3399bb2be0..30ecda489f 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -204,7 +204,7 @@ struct _GtkCellRendererTextPrivate
gulong entry_menu_popdown_timeout;
};
-G_DEFINE_TYPE (GtkCellRendererText, gtk_cell_renderer_text, GTK_TYPE_CELL_RENDERER)
+G_DEFINE_TYPE_WITH_PRIVATE (GtkCellRendererText, gtk_cell_renderer_text, GTK_TYPE_CELL_RENDERER)
static void
gtk_cell_renderer_text_init (GtkCellRendererText *celltext)
@@ -212,9 +212,7 @@ gtk_cell_renderer_text_init (GtkCellRendererText *celltext)
GtkCellRendererTextPrivate *priv;
GtkCellRenderer *cell = GTK_CELL_RENDERER (celltext);
- celltext->priv = G_TYPE_INSTANCE_GET_PRIVATE (celltext,
- GTK_TYPE_CELL_RENDERER_TEXT,
- GtkCellRendererTextPrivate);
+ celltext->priv = gtk_cell_renderer_text_get_instance_private (celltext);
priv = celltext->priv;
gtk_cell_renderer_set_alignment (cell, 0.0, 0.5);
@@ -729,8 +727,6 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
G_TYPE_STRING,
G_TYPE_STRING);
- g_type_class_add_private (object_class, sizeof (GtkCellRendererTextPrivate));
-
gtk_cell_renderer_class_set_accessible_type (cell_class, GTK_TYPE_TEXT_CELL_ACCESSIBLE);
}