Damon Chaplin wrote:
> Andrae Muys wrote:
> > 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.)
Ahh I hadn't looked a tthe clipboard buffer yet. Thanks for the
pointer.
> 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.
So it is a historical reason, and the reason is no longer relevant. In
that case would you accept a patch to support libxml? OTOH, I know that
hp would like to see libglade made a part of Gtk+, for this to happen we
would need to use GMarkup instead. Now I have had a look at the Glade
XML format, and I don't think we would have to change anything to
support GMarkup instead of libxml. However GMarkup dosn't support
attributes. I don't think Glade uses attributes anywhere, but if I've
missed something that would require a format change. The advantage of
using GMarkup over libxml is that GMarkup is a standard part of Glib2.0,
while libxml will always remain a seperate library.
Any thought's on this?
> > 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.
Would you accept a patch to fix this? I am really uncomfortable with
having two modules assuming a different contract with the same function.
> > 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.
>
mmm that wasn't what I meant. I still consider this compile-time, as
the properties concerned are still compiled into glade, even if they're
in a different module. What I meant was the ability to add and
specifically *delete* properties from the properties dialog in response
to user actions.
> If this is for setting properties of widgets from external libraries, I
> think you should use the property editor in nearly all cases.
I agree. Hence my questions. If I had just used an external dialog I
would have been mailing a patch to the list rather then questions :).
> You may have to tweak the property editor. (It needs rewriting at some
> point.)
Fine. One more thing for the TODO. I'm away on a camp over the
weekend, so I won't get a chance to do any work. However I will
endevour to post my personal TODO list on monday in the hope that people
might be inspired to do some of it themselves :)
Andrae
_______________________________________________
Glade-devel maillist - [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel