summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r--gtk/gtktoolbar.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index dcdcf2e32b..b9c5fa8f61 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -317,6 +317,7 @@ static void toolbar_rebuild_menu (GtkToolShell
G_DEFINE_TYPE_WITH_CODE (GtkToolbar, gtk_toolbar, GTK_TYPE_CONTAINER,
+ G_ADD_PRIVATE (GtkToolbar)
G_IMPLEMENT_INTERFACE (GTK_TYPE_TOOL_SHELL,
toolbar_tool_shell_iface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
@@ -656,8 +657,6 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
add_ctrl_tab_bindings (binding_set, 0, GTK_DIR_TAB_FORWARD);
add_ctrl_tab_bindings (binding_set, GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
-
- g_type_class_add_private (gobject_class, sizeof (GtkToolbarPrivate));
}
static void
@@ -676,9 +675,7 @@ gtk_toolbar_init (GtkToolbar *toolbar)
GtkToolbarPrivate *priv;
GtkStyleContext *context;
- toolbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (toolbar,
- GTK_TYPE_TOOLBAR,
- GtkToolbarPrivate);
+ toolbar->priv = gtk_toolbar_get_instance_private (toolbar);
priv = toolbar->priv;
gtk_widget_set_can_focus (GTK_WIDGET (toolbar), FALSE);