mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-10-09 00:07:00 -04:00
make TagEnums and EnumType non required for enum properties. ignore
2004-01-27 Joaquin Cuenca Abela <e98cuenc@yahoo.com> * 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.
This commit is contained in:
parent
79ac086664
commit
4986a223fe
@ -1,3 +1,10 @@
|
||||
2004-01-27 Joaquin Cuenca Abela <e98cuenc@yahoo.com>
|
||||
|
||||
* 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 <e98cuenc@yahoo.com>
|
||||
|
||||
* src/glade-signal-handler.c: remove the editable handler from
|
||||
|
@ -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) {
|
||||
|
@ -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:
|
||||
|
@ -13,6 +13,10 @@
|
||||
<SetFunction>ignore</SetFunction>
|
||||
<GetFunction>ignore</GetFunction>
|
||||
</Property>
|
||||
<Property Id="type-hint">
|
||||
<SetFunction>ignore</SetFunction>
|
||||
<GetFunction>ignore</GetFunction>
|
||||
</Property>
|
||||
|
||||
</Properties>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user