From 678899e87a77b534535af58d87872d642aef6a5c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 31 May 2017 11:08:05 +0100 Subject: [PATCH] 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 https://bugzilla.gnome.org/show_bug.cgi?id=782336 --- gio/gresource.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gio/gresource.c b/gio/gresource.c index 80c80ab08..117fe8cc4 100644 --- a/gio/gresource.c +++ b/gio/gresource.c @@ -83,6 +83,13 @@ G_DEFINE_BOXED_TYPE (GResource, g_resource, g_resource_ref, g_resource_unref) * set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will * abort. * + * Resource files will be exported in the GResource namespace using the + * combination of the given `prefix` and the filename from the `file` element. + * The `alias` attribute can be used to alter the filename to expose them at a + * different location in the resource namespace. Typically, this is used to + * include files from a different source directory without exposing the source + * directory in the resource namespace, as in the example below. + * * Resource bundles are created by the [glib-compile-resources][glib-compile-resources] program * which takes an XML file that describes the bundle, and a set of files that the XML references. These * are combined into a binary resource bundle. @@ -95,6 +102,7 @@ G_DEFINE_BOXED_TYPE (GResource, g_resource, g_resource_ref, g_resource_unref) * data/splashscreen.png * dialog.ui * menumarkup.xml + * data/example.css * * * ]| @@ -104,6 +112,7 @@ G_DEFINE_BOXED_TYPE (GResource, g_resource, g_resource_ref, g_resource_unref) * /org/gtk/Example/data/splashscreen.png * /org/gtk/Example/dialog.ui * /org/gtk/Example/menumarkup.xml + * /org/gtk/Example/example.css * ]| * * Note that all resources in the process share the same namespace, so use Java-style