diff --git a/ChangeLog b/ChangeLog index ec3424ad..8845db58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-08-24 Joaquin Cuenca Abela + + * src/glade-widget-class.c (glade_widget_class_remove_duplicated_properties): + when we had a specialized property on a base widget class, if this property + was the first one on the list of properties, the whole list was removed. + 2003-08-21 Paolo Borelli * src/glade-widget.[ch]: remove the tree structure (GladeWidget->parent diff --git a/src/glade-widget-class.c b/src/glade-widget-class.c index def46384..c5bea419 100644 --- a/src/glade-widget-class.c +++ b/src/glade-widget-class.c @@ -545,22 +545,36 @@ glade_widget_class_remove_duplicated_properties (GladeWidgetClass *widget_class) GList *old_property; /* if it's the first time we see this property, then we add it to the list of - * properties that we will keep for this widget. Idem if the last time we saw - * this property, it was not modified, and this time the property is modified + * properties that we will keep the property. Idem if the last time we saw + * this property it was not modified, and this time the property is modified * (ie, we change the non modified property by the modified one). */ if ((old_property = g_hash_table_lookup (hash_properties, property_class->id)) == NULL || (!((GladePropertyClass*) old_property->data)->is_modified && property_class->is_modified)) { /* remove the old property */ if (old_property != NULL) + { + GList *new_head = widget_class->properties; + + if (old_property == widget_class->properties) + new_head = g_list_next (old_property); + g_list_remove_link (widget_class->properties, old_property); + widget_class->properties = new_head; + } g_hash_table_insert (hash_properties, property_class->id, properties_classes); properties_classes = g_list_next (properties_classes); } else { GList *tmp = properties_classes; + GList *new_head = widget_class->properties; + + if (tmp == widget_class->properties) + new_head = g_list_next (tmp); + properties_classes = g_list_next (properties_classes); g_list_remove_link (widget_class->properties, tmp); + widget_class->properties = new_head; } } @@ -583,6 +597,9 @@ glade_widget_class_remove_duplicated_properties (GladeWidgetClass *widget_class) * the xml filename. * * Return Value: The new GladeWidgetClass, or %NULL if there are any errors. + * + * TODO: this function should replace glade_widget_class_new_from_name & new_from_node + * when done, we should of course rename it. **/ GladeWidgetClass * glade_widget_class_new_from_name2 (const char *name, @@ -615,7 +632,7 @@ glade_widget_class_new_from_name2 (const char *name, goto lblError; } - widget_class->generic_name = generic_name ? g_strdup (generic_name) : NULL; + widget_class->generic_name = g_strdup (generic_name); widget_class->name = g_strdup (name); widget_class->in_palette = generic_name ? TRUE : FALSE; diff --git a/widgets/gtkaccellabel.xml b/widgets/gtkaccellabel.xml index 0c144371..2bb34f5b 100644 --- a/widgets/gtkaccellabel.xml +++ b/widgets/gtkaccellabel.xml @@ -1,39 +1,9 @@ - GtkAccelLabel - accellabel - False - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/widgets/gtkdialog.xml b/widgets/gtkdialog.xml index 9ac5c91e..3e654034 100644 --- a/widgets/gtkdialog.xml +++ b/widgets/gtkdialog.xml @@ -21,11 +21,6 @@ - - - - ignore - String diff --git a/widgets/gtkmenubar.xml b/widgets/gtkmenubar.xml index 9d04c66a..cb10d91f 100644 --- a/widgets/gtkmenubar.xml +++ b/widgets/gtkmenubar.xml @@ -7,8 +7,6 @@ - - ignore diff --git a/widgets/gtkmessagedialog.xml b/widgets/gtkmessagedialog.xml index 28b8853d..7a1fcc71 100644 --- a/widgets/gtkmessagedialog.xml +++ b/widgets/gtkmessagedialog.xml @@ -19,11 +19,6 @@ - - - - ignore - String diff --git a/widgets/gtkwidget.xml b/widgets/gtkwidget.xml index 11dc879f..3284f815 100644 --- a/widgets/gtkwidget.xml +++ b/widgets/gtkwidget.xml @@ -6,6 +6,8 @@ ignore ignore + + diff --git a/widgets/gtkwindow.xml b/widgets/gtkwindow.xml index 6efceb6d..171cd5c6 100644 --- a/widgets/gtkwindow.xml +++ b/widgets/gtkwindow.xml @@ -9,9 +9,6 @@ - - - String glade_gtk_widget_set_tooltip @@ -21,6 +18,4 @@ - - - +