diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-10-24 10:10:33 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-10-24 10:39:18 -0400 |
commit | f194b9608adaed0df820bc5c2988caafdcb80e4d (patch) | |
tree | 16fd1318f7214fc7364634132c7d903a3088ffd1 /gtk/gtknotebook.c | |
parent | e2bfe9e95afaa8e06557aae905850987163ea147 (diff) | |
download | gtk+-f194b9608adaed0df820bc5c2988caafdcb80e4d.tar.gz |
notebook: Use the element name notebook
Switch GtkNotebook from using the .notebook style class to
using the element name notebook for its main css node.
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 3dd162199f..7dd8bf61cd 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -1165,13 +1165,13 @@ gtk_notebook_class_init (GtkNotebookClass *class) add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD); gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_NOTEBOOK_ACCESSIBLE); + gtk_widget_class_set_css_name (widget_class, "notebook"); } static void gtk_notebook_init (GtkNotebook *notebook) { GtkNotebookPrivate *priv; - GtkStyleContext *context; GtkCssNode *widget_node; gtk_widget_set_can_focus (GTK_WIDGET (notebook), TRUE); @@ -1220,9 +1220,6 @@ gtk_notebook_init (GtkNotebook *notebook) gtk_drag_dest_set_track_motion (GTK_WIDGET (notebook), TRUE); - context = gtk_widget_get_style_context (GTK_WIDGET (notebook)); - gtk_style_context_add_class (context, GTK_STYLE_CLASS_NOTEBOOK); - widget_node = gtk_widget_get_css_node (GTK_WIDGET (notebook)); priv->tabs_node = gtk_css_node_new (); gtk_css_node_set_name (priv->tabs_node, I_("tabs")); @@ -7411,14 +7408,11 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook, else gtk_widget_hide (page->tab_label); } - - gtk_style_context_remove_class (context, GTK_STYLE_CLASS_NOTEBOOK); } else { gtk_widget_set_can_focus (GTK_WIDGET (notebook), TRUE); gtk_notebook_update_labels (notebook); - gtk_style_context_add_class (context, GTK_STYLE_CLASS_NOTEBOOK); } for (i = 0; i < N_ACTION_WIDGETS; i++) |