Its been a long week, I went ahead and rewrote the parser code in Glade from the ground up, and then moved on to support dual formats, Im a little ashamed to say that this huge hacking experience was brought to you by coffee and cigarettes, for lack of *cough* other illicit substances that may have done better for my health, all grievances aside, it really is a nice piece of work I’d like to share with you all (its 7:15am Sao Paulo time and I’m blogging while cooling down and getting ready to sleep).
So lets see, what do we have ?
Well the new parser supports what Ive been calling class level definitions of xml layouts, in other words your widget library plugin is allowed to define, read and write properties and children in customizable ways, this was ofcourse needed to support the different formats that some widget classes are loaded from using GtkBuilder. We’ve also added an option, available in Glade’s edit menu, to decide which format your project will be saved in, Libglade or GtkBuilder.
Currently all widgets and properties formerly supported by Glade can now be saved and loaded in both formats. We dont yet have any support for the fancy GObjects now supported by GtkBuilder but VERY thankfully Johan has already provided a first try patch to get UIManager, our most awkward exception to load, this also must have been alot of work (and we may still need a few minor tweaks in the core to get it running). Other exciting things such as liststores and sizegroups should follow suit without too much of a headache. Another caveat is that Glade still has no idea what widgets are deprecated in the new builder format, which should be easy enough to remedy (glade will currently just save any widgets in the new format regardless).
This work is now available in trunk, and I do sincerely hope you all enjoy