diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2013-06-27 20:02:52 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2013-07-09 09:30:02 +0100 |
commit | 0899ef7cc9cf73824901923143f38bb9b6d224a3 (patch) | |
tree | 16207a8837da8a89a6f4a1d1a1c23074fd29aa1d /gtk/gtkcellrendereraccel.c | |
parent | 365919d5f6da0a8648815ca5cf5805fb88c9be16 (diff) | |
download | gtk+-0899ef7cc9cf73824901923143f38bb9b6d224a3.tar.gz |
gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
Diffstat (limited to 'gtk/gtkcellrendereraccel.c')
-rw-r--r-- | gtk/gtkcellrendereraccel.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c index 32f385ea59..a953361964 100644 --- a/gtk/gtkcellrendereraccel.c +++ b/gtk/gtkcellrendereraccel.c @@ -104,16 +104,14 @@ struct _GtkCellRendererAccelPrivate static guint signals[LAST_SIGNAL] = { 0 }; -G_DEFINE_TYPE (GtkCellRendererAccel, gtk_cell_renderer_accel, GTK_TYPE_CELL_RENDERER_TEXT) +G_DEFINE_TYPE_WITH_PRIVATE (GtkCellRendererAccel, gtk_cell_renderer_accel, GTK_TYPE_CELL_RENDERER_TEXT) static void gtk_cell_renderer_accel_init (GtkCellRendererAccel *cell_accel) { gchar *text; - cell_accel->priv = G_TYPE_INSTANCE_GET_PRIVATE (cell_accel, - GTK_TYPE_CELL_RENDERER_ACCEL, - GtkCellRendererAccelPrivate); + cell_accel->priv = gtk_cell_renderer_accel_get_instance_private (cell_accel); text = convert_keysym_state_to_string (cell_accel, 0, 0, 0); g_object_set (cell_accel, "text", text, NULL); @@ -247,8 +245,6 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class) g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); - - g_type_class_add_private (cell_accel_class, sizeof (GtkCellRendererAccelPrivate)); } |