mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
GtkCssProvider: Make it able to parse enums.
This commit is contained in:
parent
d03caa4683
commit
0a0a1a20a7
@ -2314,6 +2314,17 @@ css_provider_parse_value (GtkCssProvider *css_provider,
|
||||
else
|
||||
parsed = FALSE;
|
||||
}
|
||||
else if (G_TYPE_IS_ENUM (type))
|
||||
{
|
||||
GEnumClass *class;
|
||||
GEnumValue *enum_value;
|
||||
|
||||
class = g_type_class_ref (type);
|
||||
enum_value = g_enum_get_value_by_nick (class, value_str);
|
||||
|
||||
g_value_set_enum (value, enum_value->value);
|
||||
g_type_class_unref (class);
|
||||
}
|
||||
else if (type == GTK_TYPE_9SLICE)
|
||||
{
|
||||
Gtk9Slice *slice;
|
||||
|
Loading…
Reference in New Issue
Block a user