GNOME Bugzilla – Bug 712553
GtkBuilder: Make IDs optional
Last modified: 2013-11-18 11:02:40 UTC
One requirement of .ui files is that each object must have an ID, even if it is never referred to or directly loaded from the code. This makes editing .ui files much more onerous than it has to be, due to the frequent need to invent new IDs, while avoiding clashes. This commit makes IDs optional in the XML. They only need to be provided for objects which are referred to or explictly loaded from the code. Since GtkBuilder needs IDs for its own internal accounting, we create IDs of the form ___object_N___ if not specified in the XML.
Created attachment 260070 [details] [review] GtkBuilder: Make IDs optional
Pasting conversation from IRC... <tristan> mclasen, for GtkBuilder syntax, it's a good step... but it doesn't mean that Glade will be able to handle files with missing 'id's until Glade is patched... which shouldn't be too much trouble (just generate an id for any missing ones at load time) <mclasen> right, I didn't write a glade patch <tristan> so, making that change is fine with me, I would recommend not changing your .ui files defining GTK+'s composite widgets until the latter is done too