Fix default properties introspection once for all
@jpu
Submitted by Juan Pablo Ugarte Link to original bug (#708188)
Description
Glade uses default values defined in the parameter spec of the property to determine if a property should be saved or not in the xml file.
But sometimes the runtime has a different value because either its a bug or a derived class changed it its init function.
This was the source of several annoying bugs over time. So lets see if we can fix this issue for real.
For this I propose a new approach to properties defaults introspection
Patch https://bug625867.bugzilla-attachments.gnome.org/attachment.cgi?id=254955
Ok so this patch take a completely new and radical approach to determine the proper default value of a property.
We simply ignore defaults declared in the parameter specs and create a dummy instance of each object class we keep in GladeAdaptor and update the defaults from that instance while cloning parent properties (see gwa_clone_parent_properties())
This seems to work just fine, and it could even let us deprecate save-always flag in the catalog and avoid all kind of stupid bugs like this one!
Of course these kind of changes belong to the early start of a development series and not a few days before making a stable release.
so for glade-3-16 I think i will go with the workaround proposed in my previous comment!
cheers!