widgetpath: Use CSS-like syntax in to_string()

Print pseudo-classes using ':' sign.
This commit is contained in:
Benjamin Otte
2014-08-13 16:18:04 +02:00
parent de19fa4bb3
commit b276b6198f

View File

@ -337,18 +337,16 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
appended = FALSE;
fclass = g_type_class_ref (GTK_TYPE_STATE_FLAGS);
g_string_append_c (string, '[');
for (i = 0; i < fclass->n_values; i++)
{
if (elem->state & fclass->values[i].value)
{
if (appended)
g_string_append_c (string, '|');
g_string_append_c (string, ':');
g_string_append (string, fclass->values[i].value_nick);
appended = TRUE;
}
}
g_string_append_c (string, ']');
g_type_class_unref (fclass);
}