summaryrefslogtreecommitdiff
path: root/gtk/gtkcolorbutton.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/gtkcolorbutton.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/gtkcolorbutton.c')
-rw-r--r--gtk/gtkcolorbutton.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index f607bf5244..ae9afd14e2 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -136,6 +136,7 @@ static const GtkTargetEntry drop_types[] = { { "application/x-color", 0, 0 } };
static void gtk_color_button_iface_init (GtkColorChooserInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkColorButton, gtk_color_button, GTK_TYPE_BUTTON,
+ G_ADD_PRIVATE (GtkColorButton)
G_IMPLEMENT_INTERFACE (GTK_TYPE_COLOR_CHOOSER,
gtk_color_button_iface_init))
@@ -257,8 +258,6 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
- g_type_class_add_private (gobject_class, sizeof (GtkColorButtonPrivate));
}
static gboolean
@@ -427,9 +426,7 @@ gtk_color_button_init (GtkColorButton *button)
PangoRectangle rect;
/* Create the widgets */
- button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
- GTK_TYPE_COLOR_BUTTON,
- GtkColorButtonPrivate);
+ button->priv = gtk_color_button_get_instance_private (button);
button->priv->draw_area = gtk_drawing_area_new ();
layout = gtk_widget_create_pango_layout (GTK_WIDGET (button), "Black");