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 741743 - gtkmodule: Respect "alias" attribute in gresource
gtkmodule: Respect "alias" attribute in gresource
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
: 743625 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-12-19 06:55 UTC by Daiki Ueno
Modified: 2015-02-03 10:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkmodule: Respect "alias" attribute in gresource (1.59 KB, patch)
2014-12-19 06:55 UTC, Daiki Ueno
none Details | Review
gtkmodule: Respect "alias" attribute in gresource (1.53 KB, patch)
2014-12-24 08:16 UTC, Daiki Ueno
needs-work Details | Review
gtkmodule: Respect "alias" attribute in gresource (1.74 KB, patch)
2014-12-24 23:51 UTC, Daiki Ueno
committed Details | Review

Description Daiki Ueno 2014-12-19 06:55:17 UTC
Though undocumented, GResource looks at "alias" attribute of "file"
element and maps the physical file name to a logical path name.
Comment 1 Daiki Ueno 2014-12-19 06:55:19 UTC
Created attachment 293028 [details] [review]
gtkmodule: Respect "alias" attribute in gresource
Comment 3 Luca Bruno 2014-12-19 09:09:13 UTC
Would it make sense to add to the map both the name and the alias?
Comment 4 Daiki Ueno 2014-12-24 08:16:43 UTC
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.
Comment 5 Luca Bruno 2014-12-24 23:08:25 UTC
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.
Comment 6 Daiki Ueno 2014-12-24 23:51:53 UTC
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.
Comment 7 Luca Bruno 2014-12-24 23:58:31 UTC
Review of attachment 293329 [details] [review]:

Looks good thanks.
Comment 8 Daiki Ueno 2014-12-25 02:14:23 UTC
Attachment 293329 [details] pushed as 6c268a6 - gtkmodule: Respect "alias" attribute in gresource
Comment 9 Luca Bruno 2015-02-03 10:11:23 UTC
*** Bug 743625 has been marked as a duplicate of this bug. ***