summaryrefslogtreecommitdiff
path: root/gtk/gtkentrybuffer.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2013-06-27 20:02:52 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2013-07-09 09:30:02 +0100
commit0899ef7cc9cf73824901923143f38bb9b6d224a3 (patch)
tree16207a8837da8a89a6f4a1d1a1c23074fd29aa1d /gtk/gtkentrybuffer.c
parent365919d5f6da0a8648815ca5cf5805fb88c9be16 (diff)
downloadgtk+-0899ef7cc9cf73824901923143f38bb9b6d224a3.tar.gz
gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
Diffstat (limited to 'gtk/gtkentrybuffer.c')
-rw-r--r--gtk/gtkentrybuffer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtkentrybuffer.c b/gtk/gtkentrybuffer.c
index 2190a10f71..067048ff97 100644
--- a/gtk/gtkentrybuffer.c
+++ b/gtk/gtkentrybuffer.c
@@ -76,7 +76,7 @@ struct _GtkEntryBufferPrivate
gint max_length;
};
-G_DEFINE_TYPE (GtkEntryBuffer, gtk_entry_buffer, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GtkEntryBuffer, gtk_entry_buffer, G_TYPE_OBJECT)
/* --------------------------------------------------------------------------------
* DEFAULT IMPLEMENTATIONS OF TEXT BUFFER
@@ -245,7 +245,7 @@ gtk_entry_buffer_init (GtkEntryBuffer *buffer)
{
GtkEntryBufferPrivate *pv;
- pv = buffer->priv = G_TYPE_INSTANCE_GET_PRIVATE (buffer, GTK_TYPE_ENTRY_BUFFER, GtkEntryBufferPrivate);
+ pv = buffer->priv = gtk_entry_buffer_get_instance_private (buffer);
pv->normal_text = NULL;
pv->normal_text_chars = 0;
@@ -335,8 +335,6 @@ gtk_entry_buffer_class_init (GtkEntryBufferClass *klass)
klass->inserted_text = gtk_entry_buffer_real_inserted_text;
klass->deleted_text = gtk_entry_buffer_real_deleted_text;
- g_type_class_add_private (gobject_class, sizeof (GtkEntryBufferPrivate));
-
/**
* GtkEntryBuffer:text:
*