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 743086 - Use GResource for application data
Use GResource for application data
Status: RESOLVED FIXED
Product: almanah
Classification: Other
Component: General
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: diary-maint
diary-maint
Depends on:
Blocks: 742145
 
 
Reported: 2015-01-17 12:58 UTC by Álvaro Peña
Modified: 2015-02-15 18:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
resources: Combined resources into app binary (6.27 KB, patch)
2015-02-07 11:22 UTC, Álvaro Peña
none Details | Review
resources: Combined resources into app binary (6.27 KB, patch)
2015-02-07 11:24 UTC, Álvaro Peña
committed Details | Review
resources: Added the CSS as a resource (3.97 KB, patch)
2015-02-14 17:17 UTC, Álvaro Peña
none Details | Review
resources: Added the CSS as a resource (5.14 KB, patch)
2015-02-14 17:33 UTC, Álvaro Peña
none Details | Review
resources: Moved the UI file to GResource (14.05 KB, patch)
2015-02-14 18:22 UTC, Álvaro Peña
none Details | Review

Description Álvaro Peña 2015-01-17 12:58:28 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
Comment 1 Álvaro Peña 2015-02-01 16:49:36 UTC
In the commit e483472 I have added the app-menu as a GResource.
Comment 2 Philip Withnall 2015-02-02 13:17:46 UTC
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.
Comment 3 Álvaro Peña 2015-02-07 11:22:50 UTC
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
Comment 4 Álvaro Peña 2015-02-07 11:24:12 UTC
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.
Comment 5 Philip Withnall 2015-02-08 20:43:59 UTC
Review of attachment 296322 [details] [review]:

++
Comment 6 Álvaro Peña 2015-02-14 13:34:01 UTC
Attachment 296322 [details] pushed as 376b49c - resources: Combined resources into app binary
Comment 7 Álvaro Peña 2015-02-14 17:17:25 UTC
Created attachment 296836 [details] [review]
resources: Added the CSS as a resource
Comment 8 Álvaro Peña 2015-02-14 17:19:32 UTC
Review of attachment 296322 [details] [review]:

Commited!
Comment 9 Álvaro Peña 2015-02-14 17:33:52 UTC
Created attachment 296837 [details] [review]
resources: Added the CSS as a resource

Removed css path function in "interface.c".
Comment 10 Álvaro Peña 2015-02-14 18:22:19 UTC
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.
Comment 11 Álvaro Peña 2015-02-15 17:51:25 UTC
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