diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-10-29 07:01:57 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-10-29 07:01:57 -0400 |
commit | 2936d7bae8c4d834463ef572e1ec63dc6ecd0138 (patch) | |
tree | 51579f79f795ca8e8bc268d6707338d41a9ebee2 /gtk/gtkstatusbar.c | |
parent | 56d3e42a00247e7db5941a4ac3108a58e6abe34b (diff) | |
download | gtk+-2936d7bae8c4d834463ef572e1ec63dc6ecd0138.tar.gz |
statusbar: Add an element name to the css node
This lets us avoid hardcoding the type in CSS.
Diffstat (limited to 'gtk/gtkstatusbar.c')
-rw-r--r-- | gtk/gtkstatusbar.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c index 9cb3106670..b5ee3244f4 100644 --- a/gtk/gtkstatusbar.c +++ b/gtk/gtkstatusbar.c @@ -72,7 +72,12 @@ * gtk_statusbar_pop(). A message can be removed from anywhere in the * stack if its message id was recorded at the time it was added. This * is done using gtk_statusbar_remove(). + * + * # CSS node + * + * GtkStatusbar has a single CSS node with name statusbar. */ + typedef struct _GtkStatusbarMsg GtkStatusbarMsg; struct _GtkStatusbarPrivate @@ -176,6 +181,7 @@ gtk_statusbar_class_init (GtkStatusbarClass *class) gtk_widget_class_bind_template_child_private (widget_class, GtkStatusbar, label); gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_STATUSBAR_ACCESSIBLE); + gtk_widget_class_set_css_name (widget_class, "statusbar"); } static void @@ -183,14 +189,10 @@ gtk_statusbar_init (GtkStatusbar *statusbar) { GtkStatusbarPrivate *priv; GtkShadowType shadow_type; - GtkStyleContext *context; statusbar->priv = gtk_statusbar_get_instance_private (statusbar); priv = statusbar->priv; - context = gtk_widget_get_style_context (GTK_WIDGET (statusbar)); - gtk_style_context_add_class (context, GTK_STYLE_CLASS_STATUSBAR); - priv->seq_context_id = 1; priv->seq_message_id = 1; priv->messages = NULL; |