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>
|
2004-01-27 Joaquin Cuenca Abela <e98cuenc@yahoo.com>
|
||||||
|
|
||||||
* src/glade-signal-handler.c: remove the editable handler from
|
* 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);
|
glade_parameter_get_boolean (class->parameters, "Optional", &class->optional);
|
||||||
|
|
||||||
/* Get the choices */
|
/* Get the choices */
|
||||||
if (class->type == GLADE_PROPERTY_TYPE_ENUM) {
|
do
|
||||||
gchar *type_name;
|
{
|
||||||
GType type;
|
if (class->type == GLADE_PROPERTY_TYPE_ENUM)
|
||||||
|
{
|
||||||
|
gchar *type_name;
|
||||||
|
GType type;
|
||||||
|
|
||||||
child = glade_xml_search_child_required (node, GLADE_TAG_ENUMS);
|
child = glade_xml_search_child (node, GLADE_TAG_ENUMS);
|
||||||
if (!child)
|
if (!child)
|
||||||
return FALSE;
|
break;
|
||||||
class->choices = glade_choice_list_new_from_node (child);
|
class->choices = glade_choice_list_new_from_node (child);
|
||||||
type_name = glade_xml_get_property_string_required (child, "EnumType", NULL);
|
type_name = glade_xml_get_property_string (child, "EnumType");
|
||||||
if (!type_name)
|
if (!type_name)
|
||||||
return FALSE;
|
break;
|
||||||
type = g_type_from_name (type_name);
|
type = g_type_from_name (type_name);
|
||||||
if (!(type != 0))
|
if (!(type != 0))
|
||||||
return FALSE;
|
break;
|
||||||
class->enum_type = type;
|
class->enum_type = type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
while (FALSE);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* If the property is an object load it */
|
/* If the property is an object load it */
|
||||||
if (class->type == GLADE_PROPERTY_TYPE_OBJECT) {
|
if (class->type == GLADE_PROPERTY_TYPE_OBJECT) {
|
||||||
|
@ -417,7 +417,7 @@ glade_xml_search_child (GladeXmlNode *node_in, const char *name)
|
|||||||
* @tree:
|
* @tree:
|
||||||
* @name:
|
* @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
|
* an error if the child was not found
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
<SetFunction>ignore</SetFunction>
|
<SetFunction>ignore</SetFunction>
|
||||||
<GetFunction>ignore</GetFunction>
|
<GetFunction>ignore</GetFunction>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property Id="type-hint">
|
||||||
|
<SetFunction>ignore</SetFunction>
|
||||||
|
<GetFunction>ignore</GetFunction>
|
||||||
|
</Property>
|
||||||
|
|
||||||
</Properties>
|
</Properties>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user