css names are always set

No need to check for it, we set the css name on GtkWidgetClass
ourselves.
This commit is contained in:
Matthias Clasen 2016-05-04 12:48:46 -04:00
parent 0efe186d95
commit 7df668f2ac

View File

@ -4420,8 +4420,7 @@ gtk_widget_init (GTypeInstance *instance, gpointer g_class)
gtk_css_node_set_state (priv->cssnode, GTK_STATE_FLAG_DIR_LTR);
/* need to set correct type here, and only class has the correct type here */
gtk_css_node_set_widget_type (priv->cssnode, G_TYPE_FROM_CLASS (g_class));
if (GTK_WIDGET_CLASS (g_class)->priv->css_name)
gtk_css_node_set_name (priv->cssnode, GTK_WIDGET_CLASS (g_class)->priv->css_name);
gtk_css_node_set_name (priv->cssnode, GTK_WIDGET_CLASS (g_class)->priv->css_name);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
priv->style = gtk_widget_get_default_style ();