gtkwidgetpath: update gtk_widget_path_to_string

From gtk_widget_path_iter_set_object_name documentation:
"When set, the object name overrides the object type when matching CSS"

Update gtk_widget_path_to_string to match this behaviour.
This commit is contained in:
Alberts Muktupāvels 2016-01-12 21:34:56 +02:00
parent 276101a3bc
commit c60cea3037

View File

@ -298,7 +298,10 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
if (i > 0)
g_string_append_c (string, ' ');
g_string_append (string, g_type_name (gtk_css_node_declaration_get_type (elem->decl)));
if (gtk_css_node_declaration_get_name (elem->decl))
g_string_append (string, gtk_css_node_declaration_get_name (elem->decl));
else
g_string_append (string, g_type_name (gtk_css_node_declaration_get_type (elem->decl)));
if (gtk_css_node_declaration_get_id (elem->decl))
{