GNOME Bugzilla – Bug 743086
Use GResource for application data
Last modified: 2015-02-15 18:18:32 UTC
Use GResource[1] to store and load the application data (css, ui, etc.). This allow a better integration with the lastest GIO & GTK API. 1. https://developer.gnome.org/gio/stable/gio-GResource.html
In the commit e483472 I have added the app-menu as a GResource.
One of the main ideas of GResource is that it can be linked into the application binary, so it is no longer necessary to load an external file. Wrapping menus.ui in almanah.gresource just exchanges loading a UI file from disk for loading a GResource file from disk. It can still fail. I suggest changing the GResource usage to allow loading the UI file from the application binary instead.
Created attachment 296321 [details] [review] resources: Combined resources into app binary Now the resources are combined into the application binary generating the c file resources.c with the glib-compile-resources tool. The required GIO has been updated to 2.32 due GResources. See
Created attachment 296322 [details] [review] resources: Combined resources into app binary Now the resources are combined into the application binary generating the c file resources.c with the glib-compile-resources tool. The required GIO has been updated to 2.32 due GResources.
Review of attachment 296322 [details] [review]: ++
Attachment 296322 [details] pushed as 376b49c - resources: Combined resources into app binary
Created attachment 296836 [details] [review] resources: Added the CSS as a resource
Review of attachment 296322 [details] [review]: Commited!
Created attachment 296837 [details] [review] resources: Added the CSS as a resource Removed css path function in "interface.c".
Created attachment 296839 [details] [review] resources: Moved the UI file to GResource The UI file has been moved into the GResource and removed the function to retrieve the UI file path.
Attachment 296837 [details] pushed as 187e5e6 - resources: Added the CSS as a resource Attachment 296839 [details] pushed as 5ac492a - resources: Moved the UI file to GResource