diff --git a/ChangeLog b/ChangeLog index 11df0d60..10e0ec43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-01-27 Joaquin Cuenca Abela + + * src/glade-property-class.c (glade_property_class_update_from_node): + make TagEnums and EnumType non required for enum properties. + * widgets/gtkwindow.xml: ignore type-hint, as it can't be set + after the window becames visible. + 2004-01-27 Joaquin Cuenca Abela * src/glade-signal-handler.c: remove the editable handler from diff --git a/src/glade-property-class.c b/src/glade-property-class.c index 658a013f..24818f57 100644 --- a/src/glade-property-class.c +++ b/src/glade-property-class.c @@ -666,22 +666,28 @@ glade_property_class_update_from_node (GladeXmlNode *node, glade_parameter_get_boolean (class->parameters, "Optional", &class->optional); /* Get the choices */ - if (class->type == GLADE_PROPERTY_TYPE_ENUM) { - gchar *type_name; - GType type; + do + { + if (class->type == GLADE_PROPERTY_TYPE_ENUM) + { + gchar *type_name; + GType type; - child = glade_xml_search_child_required (node, GLADE_TAG_ENUMS); - if (!child) - return FALSE; - class->choices = glade_choice_list_new_from_node (child); - type_name = glade_xml_get_property_string_required (child, "EnumType", NULL); - if (!type_name) - return FALSE; - type = g_type_from_name (type_name); - if (!(type != 0)) - return FALSE; - class->enum_type = type; + child = glade_xml_search_child (node, GLADE_TAG_ENUMS); + if (!child) + break; + class->choices = glade_choice_list_new_from_node (child); + type_name = glade_xml_get_property_string (child, "EnumType"); + if (!type_name) + break; + type = g_type_from_name (type_name); + if (!(type != 0)) + break; + class->enum_type = type; + } } + while (FALSE); + #if 0 /* If the property is an object load it */ if (class->type == GLADE_PROPERTY_TYPE_OBJECT) { diff --git a/src/glade-xml-utils.c b/src/glade-xml-utils.c index 14516f94..07ec380b 100644 --- a/src/glade-xml-utils.c +++ b/src/glade-xml-utils.c @@ -417,7 +417,7 @@ glade_xml_search_child (GladeXmlNode *node_in, const char *name) * @tree: * @name: * - * just a small wrapper arround glade_xml_searc_hchild that displays + * just a small wrapper arround glade_xml_search_child that displays * an error if the child was not found * * Return Value: diff --git a/widgets/gtkwindow.xml b/widgets/gtkwindow.xml index 7a13fd71..59e74663 100644 --- a/widgets/gtkwindow.xml +++ b/widgets/gtkwindow.xml @@ -13,6 +13,10 @@ ignore ignore + + ignore + ignore +