diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-10-31 20:30:56 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-10-31 20:30:56 -0400 |
commit | 7ee7019ca744107b69a3b9dd0b632edc9341e86c (patch) | |
tree | 474856110a4a0c8f3163342ad8e8fa9b6abeb8b2 /gtk/gtktoolbar.c | |
parent | 479d64e89ac2a1e7b1e6f4f91b31edd8bdaef4cc (diff) | |
download | gtk+-7ee7019ca744107b69a3b9dd0b632edc9341e86c.tar.gz |
toolbar: Use an element name instead of a style class
The element name is ... toolbar.
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r-- | gtk/gtktoolbar.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 4c8674f4b6..82a3fc7726 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -81,6 +81,10 @@ * * Creating a context menu for the toolbar can be done by connecting to * the #GtkToolbar::popup-context-menu signal. + * + * # CSS nodes + * + * GtkToolbar has a single CSS node with name toolbar. */ @@ -654,6 +658,8 @@ 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); + + gtk_widget_class_set_css_name (widget_class, "toolbar"); } static void @@ -670,14 +676,10 @@ static void gtk_toolbar_init (GtkToolbar *toolbar) { GtkToolbarPrivate *priv; - GtkStyleContext *context; toolbar->priv = gtk_toolbar_get_instance_private (toolbar); priv = toolbar->priv; - context = gtk_widget_get_style_context (GTK_WIDGET (toolbar)); - gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOOLBAR); - gtk_widget_set_can_focus (GTK_WIDGET (toolbar), FALSE); gtk_widget_set_has_window (GTK_WIDGET (toolbar), FALSE); |