16a7bb1faf2ac9f7c276ddedf33b820dace23102
diff --git a/gobject/gvaluetransform.c b/gobject/gvaluetransform.c
index e1c3bba..a487540 100644
--- a/gobject/gvaluetransform.c
+++ b/gobject/gvaluetransform.c
@@ -239,7 +239,30 @@ value_transform_flags_string (const GValue *src_value,
   
   g_type_class_unref (class);
 }
+static void
+value_transform_string_enum (const GValue *src_value,
+                             GValue       *dest_value)
+{
+  GEnumClass *class = g_type_class_ref (G_VALUE_TYPE (dest_value));
+  const GEnumValue* enum_value;
+
+  enum_value = g_enum_get_value_from_string (class, src_value->data[0].v_pointer);
+  if (enum_value)
+    dest_value->data[0].v_long = enum_value->value;
+
+  g_type_class_unref (class);
 
+}
+static void
+value_transform_string_flags (const GValue *src_value,
+                              GValue       *dest_value)
+{
+  GFlagsClass *class = g_type_class_ref (G_VALUE_TYPE (dest_value));
+
+  dest_value->data[0].v_ulong = g_flags_get_value_from_string (class, src_value->data[0].v_pointer);
+
+  g_type_class_unref (class);
+}
 
 /* registration
  */
@@ -440,4 +463,6 @@ g_value_transforms_init (void)
   g_value_register_transform_func (G_TYPE_DOUBLE,       G_TYPE_STRING,          value_transform_double_string);
   /* string types */
   g_value_register_transform_func (G_TYPE_STRING,       G_TYPE_STRING,          value_transform_string_string);
+  g_value_register_transform_func (G_TYPE_STRING,       G_TYPE_ENUM,            value_transform_string_enum);
+  g_value_register_transform_func (G_TYPE_STRING,       G_TYPE_FLAGS,           value_transform_string_flags);
 }
