[gegl/soc-2011-warp] gegl-xml: add support to reading xml properties in xml files
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2011-warp] gegl-xml: add support to reading xml properties in xml files
- Date: Sun, 4 Sep 2011 12:20:44 +0000 (UTC)
commit fc063eac51102d5e41204a74acf7d7863662f2b0
Author: Michael Murà <batolettre gmail com>
Date: Sun Sep 4 14:18:44 2011 +0200
gegl-xml: add support to reading xml properties in xml files
gegl/gegl-xml.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gegl/gegl-xml.c b/gegl/gegl-xml.c
index 03d3699..91676e9 100644
--- a/gegl/gegl-xml.c
+++ b/gegl/gegl-xml.c
@@ -186,6 +186,12 @@ set_clone_prop_as_well:
gegl_node_set (new, param_name, FALSE, NULL);
}
}
+ else if (g_type_is_a (paramspec->value_type, G_TYPE_ENUM))
+ {
+ GEnumClass *eclass = g_type_class_peek (paramspec->value_type);
+ GEnumValue *evalue = g_enum_get_value_by_nick (eclass, param_value);
+ gegl_node_set (new, param_name, evalue->value, NULL);
+ }
else if (paramspec->value_type == GEGL_TYPE_COLOR)
{
GeglColor *color = g_object_new (GEGL_TYPE_COLOR,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]