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/gtkcellview.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/gtkcellview.c')
-rw-r--r-- | gtk/gtkcellview.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index d5d33ede32..ce36676c7d 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -153,12 +153,13 @@ enum PROP_FIT_MODEL }; -G_DEFINE_TYPE_WITH_CODE (GtkCellView, gtk_cell_view, GTK_TYPE_WIDGET, +G_DEFINE_TYPE_WITH_CODE (GtkCellView, gtk_cell_view, GTK_TYPE_WIDGET, + G_ADD_PRIVATE (GtkCellView) G_IMPLEMENT_INTERFACE (GTK_TYPE_CELL_LAYOUT, gtk_cell_view_cell_layout_init) G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_cell_view_buildable_init) - G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)); + G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)) static void gtk_cell_view_class_init (GtkCellViewClass *klass) @@ -322,8 +323,6 @@ gtk_cell_view_class_init (GtkCellViewClass *klass) ADD_SET_PROP ("background-set", PROP_BACKGROUND_SET, P_("Background set"), P_("Whether this tag affects the background color")); - - g_type_class_add_private (gobject_class, sizeof (GtkCellViewPrivate)); } static void @@ -533,16 +532,10 @@ gtk_cell_view_set_property (GObject *object, static void gtk_cell_view_init (GtkCellView *cellview) { - GtkCellViewPrivate *priv; - - cellview->priv = G_TYPE_INSTANCE_GET_PRIVATE (cellview, - GTK_TYPE_CELL_VIEW, - GtkCellViewPrivate); - priv = cellview->priv; + cellview->priv = gtk_cell_view_get_instance_private (cellview); + cellview->priv->orientation = GTK_ORIENTATION_HORIZONTAL; gtk_widget_set_has_window (GTK_WIDGET (cellview), FALSE); - - priv->orientation = GTK_ORIENTATION_HORIZONTAL; } static void |