summaryrefslogtreecommitdiff
path: root/src/glade-widget-class.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tvb@src.gnome.org>2005-08-24 20:31:30 +0000
committerTristan Van Berkom <tvb@src.gnome.org>2005-08-24 20:31:30 +0000
commitf53f6a9d21262f4c9d85def84695d08a01842903 (patch)
treec71c555ab024ab5a07ff2f142c455bfb84a7f9cf /src/glade-widget-class.c
parent0e76af06e9dfcdb318519cd75c48675689dff6fd (diff)
downloadglade-f53f6a9d21262f4c9d85def84695d08a01842903.tar.gz
glade_default_app_selection_clear() Add call to glade_util_clear_selection
* src/glade-app.c: glade_default_app_selection_clear() Add call to glade_util_clear_selection () so that placeholders selection also gets cleared. * src/glade-editor.c: Make ((GladeEditorProperty *)prop)->signal_prop a weak pointer to the said property, this way we avoid crashed when leaving dangleing pointers from canceled query dialogs. * src/glade-project-view.c: Added GTK_IS_WIDGET() clause avoiding dumb warnings. * src/glade-property-class.c: Fixed "name" on custom properties to be retrieved from there pspecs, also gave "default" and "name" tags precedence to those found on the pspec. * src/glade-widget-class.c: Fixed a hidden segfault waiting to happen. fixed order of derived custom properties (used g_list_append, not prepend for this special case where the order matters and we cant just g_list_reverse). * src/glade-widget.c: Added GTK_IS_WIDGET() clause avoiding dumb warnings. * widgets/gtk+.xml: Removed unused glade-parameter stuff.
Diffstat (limited to 'src/glade-widget-class.c')
-rw-r--r--src/glade-widget-class.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/glade-widget-class.c b/src/glade-widget-class.c
index debd9caa..cde6f3f0 100644
--- a/src/glade-widget-class.c
+++ b/src/glade-widget-class.c
@@ -728,6 +728,7 @@ glade_widget_class_merge_properties (GType parent_type,
GladePropertyClass *parent_p_class = list->data;
GladePropertyClass *child_p_class;
+
/* search the child's properties for one with the same id */
for (list2 = *widget_properties; list2; list2 = list2->next)
{
@@ -736,14 +737,16 @@ glade_widget_class_merge_properties (GType parent_type,
break;
}
- /* if not found, prepend a clone of the parent's one; if found
+ /* if not found, append a clone of the parent's one; if found
* but the parent one was modified (and not the child one)
- * substitute it.
+ * substitute it (note it is importand to *append* and not prepend
+ * since this would screw up the order of custom properties in
+ * derived objects).
*/
if (!list2)
{
property_class = glade_property_class_clone (parent_p_class);
- *widget_properties = g_list_prepend (*widget_properties, property_class);
+ *widget_properties = g_list_append (*widget_properties, property_class);
}
else if (parent_p_class->is_modified && !child_p_class->is_modified)
{
@@ -796,7 +799,9 @@ glade_widget_class_merge_properties (GType parent_type,
}
for (list = remove; list; list = list->next)
{
- g_list_delete_link (*widget_properties, (GList *)list->data);
+ *widget_properties =
+ g_list_delete_link (*widget_properties,
+ (GList *)list->data);
}
g_list_free (remove);
}