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 782336 - Add additional documentation of the GResource XML format
Add additional documentation of the GResource XML format
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
2.53.x
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-05-08 15:14 UTC by Eskild Hustvedt
Modified: 2017-05-31 10:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
docs: Mention the alias GResource attribute in the documentation (2.17 KB, patch)
2017-05-31 10:10 UTC, Philip Withnall
committed Details | Review
docs: Mention GtkApplication in the GResource documentation (1.66 KB, patch)
2017-05-31 10:10 UTC, Philip Withnall
committed Details | Review

Description Eskild Hustvedt 2017-05-08 15:14:42 UTC
The documentation for the GResource XML format is a bit sparse. In particular, the alias="" attribute on the <file> element is not documented. This attribute is very useful when using GtkApplication's automatic resource loading (ie. of menus) but is not mentioned in the documentation.
Comment 1 Philip Withnall 2017-05-11 08:11:20 UTC
Indeed, documentation for `alias` is missing. I can’t see anything else which is obviously missing. Eskild, are there any other specific improvements you can think of?
Comment 2 Eskild Hustvedt 2017-05-11 08:22:53 UTC
The alias attribute was the main point of confusion for me. It might be useful to mention (very briefly) and link to the GtkApplication docs in it though, since it provides some automatic loading of resources that depends on some specific naming. At least for me, GResource and GtkApplication were the two docs I ended up referring to (as well as an actual application that used the alias="" attribute).

Something like «Some APIs may load data from GResources automatically, such as <link>GtkApplication</link>.»
Comment 3 Philip Withnall 2017-05-11 09:22:20 UTC
We can’t link to the GtkApplication docs (GIO does not depend on GtkApplication), though we could link from GtkApplication to GResource and we could give relevant examples in the GResource docs. If you want to come up with a patch which satisfies you, that would be great (I can help out if needed) — the file you want to edit is gio/gresource.c. If not, I’ll try and find time in the next few weeks to do this.
Comment 4 Philip Withnall 2017-05-31 10:10:19 UTC
Created attachment 352934 [details] [review]
docs: Mention the alias GResource attribute in the documentation

It was the only part of the XML format which was not documented.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 5 Philip Withnall 2017-05-31 10:10:24 UTC
Created attachment 352935 [details] [review]
docs: Mention GtkApplication in the GResource documentation

Since GtkApplication auto-loads some well-known resource paths. Add a
cross-reference to its documentation. (The cross-reference won’t be
linked if the GTK+ documentation isn’t available at build time, but this
is probably good enough. It is likely to be available.)

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 6 Philip Withnall 2017-05-31 10:11:46 UTC
Attachment 352934 [details] pushed as 678899e - docs: Mention the alias GResource attribute in the documentation
Attachment 352935 [details] pushed as c7d3257 - docs: Mention GtkApplication in the GResource documentation