Skip to content

application, thumbnailer: Remove redundant GResource registration

Debarshi Ray requested to merge wip/rishi/redundant-resource-registration into master

GResources in the form of C source files generated by glib-compile-resources(1) without the --manual-register flag, are automatically registered as long as the compiler supports constructor and destructor functions. Given that there's no explicit desire to support compilers without such support, codified by the lack of the --manual-register flag, calling g_resources_register is redundant.

Such statically compiled and linked GResources are automatically added as GStaticResources to a list internal to GIO by the generated constructor function, and are lazily registered whenever their contents are referred to by their global path or URI.

This is unlike standalone *.gresource bundles. Those are GVariant database (or GVDB) files, which need to be explicitly registered with g_resources_register after being loaded with g_resource_load, so that their contents can be referred to by their global path or URI.

Merge request reports