builder: Allow parsing G_TYPE_BYTES from strings

Just create a bytes containing the literal string.
This commit is contained in:
Benjamin Otte 2019-10-21 04:57:03 +02:00
parent 553a9c292d
commit 4cca27a7af

View File

@ -2095,6 +2095,10 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
gchar **vector = g_strsplit (string, "\n", 0);
g_value_take_boxed (value, vector);
}
else if (G_VALUE_HOLDS (value, G_TYPE_BYTES))
{
g_value_take_boxed (value, g_bytes_new (string, strlen (string)));
}
else
{
g_set_error (error,