widgetpath: Use CSS-like syntax in to_string()
Print pseudo-classes using ':' sign.
This commit is contained in:
@ -337,18 +337,16 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
|
|||||||
|
|
||||||
appended = FALSE;
|
appended = FALSE;
|
||||||
fclass = g_type_class_ref (GTK_TYPE_STATE_FLAGS);
|
fclass = g_type_class_ref (GTK_TYPE_STATE_FLAGS);
|
||||||
g_string_append_c (string, '[');
|
|
||||||
for (i = 0; i < fclass->n_values; i++)
|
for (i = 0; i < fclass->n_values; i++)
|
||||||
{
|
{
|
||||||
if (elem->state & fclass->values[i].value)
|
if (elem->state & fclass->values[i].value)
|
||||||
{
|
{
|
||||||
if (appended)
|
if (appended)
|
||||||
g_string_append_c (string, '|');
|
g_string_append_c (string, ':');
|
||||||
g_string_append (string, fclass->values[i].value_nick);
|
g_string_append (string, fclass->values[i].value_nick);
|
||||||
appended = TRUE;
|
appended = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_string_append_c (string, ']');
|
|
||||||
g_type_class_unref (fclass);
|
g_type_class_unref (fclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user