GNOME Bugzilla – Bug 782336
Add additional documentation of the GResource XML format
Last modified: 2017-05-31 10:11:54 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.
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?
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>.»
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.
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>
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>
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