GNOME Bugzilla – Bug 741743
gtkmodule: Respect "alias" attribute in gresource
Last modified: 2015-02-03 10:11:23 UTC
Though undocumented, GResource looks at "alias" attribute of "file" element and maps the physical file name to a logical path name.
Created attachment 293028 [details] [review] gtkmodule: Respect "alias" attribute in gresource
cf: https://git.gnome.org/browse/glib/tree/gio/glib-compile-resources.c#n132 https://git.gnome.org/browse/glib/tree/gio/glib-compile-resources.c#n225
Would it make sense to add to the map both the name and the alias?
Created attachment 293320 [details] [review] gtkmodule: Respect "alias" attribute in gresource Though undocumented, glib-compile-resources looks at "alias" attribute of "file" element and maps the physical file name to a logical path name. -- Good point, thanks; updated (though actually glib-compile-resources renames the resource path, despite the word "alias"). Also s/GResource/glib-compile-resources/ in commit message for clarity.
Review of attachment 293320 [details] [review]: ::: codegen/valagtkmodule.vala @@ +82,3 @@ } else if (state == 1 && current_token == MarkupTokenType.TEXT) { var name = reader.content; + gresource_to_file_map.set (Path.build_filename (prefix, alias), Path.build_filename (gresource_dir, name)); alias is not checked here, it could be null.
Created attachment 293329 [details] [review] gtkmodule: Respect "alias" attribute in gresource Though undocumented, glib-compile-resources looks at "alias" attribute of "file" element and maps the physical file name to a logical path name. -- Oops; fixed.
Review of attachment 293329 [details] [review]: Looks good thanks.
Attachment 293329 [details] pushed as 6c268a6 - gtkmodule: Respect "alias" attribute in gresource
*** Bug 743625 has been marked as a duplicate of this bug. ***