After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 712553 - GtkBuilder: Make IDs optional
GtkBuilder: Make IDs optional
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
unspecified
Other All
: Normal normal
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-18 01:22 UTC by Matthias Clasen
Modified: 2013-11-18 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkBuilder: Make IDs optional (6.44 KB, patch)
2013-11-18 01:22 UTC, Matthias Clasen
none Details | Review

Description Matthias Clasen 2013-11-18 01:22:43 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.
Comment 1 Matthias Clasen 2013-11-18 01:22:45 UTC
Created attachment 260070 [details] [review]
GtkBuilder: Make IDs optional
Comment 2 Tristan Van Berkom 2013-11-18 11:00:40 UTC
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