summaryrefslogtreecommitdiff
path: root/gtk/gtktoggletoolbutton.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/gtktoggletoolbutton.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/gtktoggletoolbutton.c')
-rw-r--r--gtk/gtktoggletoolbutton.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtktoggletoolbutton.c b/gtk/gtktoggletoolbutton.c
index 7c8d22569a..4db54aa629 100644
--- a/gtk/gtktoggletoolbutton.c
+++ b/gtk/gtktoggletoolbutton.c
@@ -92,6 +92,7 @@ static guint toggle_signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkToggleToolButton, gtk_toggle_tool_button, GTK_TYPE_TOOL_BUTTON,
+ G_ADD_PRIVATE (GtkToggleToolButton)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_toggle_tool_button_activatable_interface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
@@ -142,8 +143,6 @@ gtk_toggle_tool_button_class_init (GtkToggleToolButtonClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
- g_type_class_add_private (object_class, sizeof (GtkToggleToolButtonPrivate));
}
static void
@@ -152,9 +151,7 @@ gtk_toggle_tool_button_init (GtkToggleToolButton *button)
GtkToolButton *tool_button = GTK_TOOL_BUTTON (button);
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (_gtk_tool_button_get_button (tool_button));
- button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
- GTK_TYPE_TOGGLE_TOOL_BUTTON,
- GtkToggleToolButtonPrivate);
+ button->priv = gtk_toggle_tool_button_get_instance_private (button);
/* If the real button is a radio button, it may have been
* active at the time it was created.