Andrae Muys wrote:
> 
> Looking at the various widgets in gbwidgets/ the _set_properties()
> function appears to apply all the current properties to the current
> widget.
> 
> Now from what I can tell these functions are only called by
> gb_widget_apply_properties and gb_widget_load.
> 
> gb_widget_apply_properties is simple enough, and from my reading should
> be called once for each property change.

Yes. The property editor calls it to change single properties.
(Originally it updated all the properties in one go, but doesn't now.)

 
> I haven't yet been able to work out gb_widget_load, I'm going to have to
> print out the code and read through it manually.  It appears to
> interleave IO operations with parsing operations with widget
> configuration operations; or am I mistaken?

I think it reads in all the properties for each widget, then creates it,
then recursively reads the children. Unfortunately the code is pretty messy. 
(Note that the clipboard "Paste" function also uses the same code, but
reads from a clipboard buffer rather than from a file.)


> [On this vein, why has
> glade implemented it's own XML parser rather then use libxml?  Is this
> historical?  Does there remain any reason to avoid libxml (beyond the
> work required to convert across of course :)?]

Glade was one of the first GTK+/Gnome projects to use XML. I don't think
libxml was around then. I'd like to switch over to it now, though.

 
> My specific question is this:  Can I rely on _set_properties() being
> called once for each property, or do I have to always set ALL the
> properties of a widget EVERY time it's called?

No. When loading all the properties are set in one go.

 
> Also, regarding the properties sheet.  I want to dynamically add/delete
> properties at run-time.  Is there an easy way to do this?  At the moment
> I'm planning on abandoning the properties sheet and just using an
> external dialog along the lines of gbmenubar.

All the widget-specific properties are added at runtime already, in the
gb_*_create_properties() functions.

If this is for setting properties of widgets from external libraries, I
think you should use the property editor in nearly all cases.

You may have to tweak the property editor. (It needs rewriting at some
point.)

Damon



_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to