GNOME Bugzilla – Bug 722358
Add grl_registry_add_config_from_resource
Last modified: 2014-01-27 09:05:37 UTC
.
Created attachment 266490 [details] [review] core: Split up keyfile processing for config Into a separate function, so it can be used to load from data instead.
Created attachment 266491 [details] [review] core: Add grl_registry_add_config_from_resource()
Comment on attachment 266490 [details] [review] core: Split up keyfile processing for config commit 8eb5dac7799d6507ec62e4f694da892b169374b4 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Jan 16 17:30:35 2014 +0100 core: Split up keyfile processing for config Into a separate function, so it can be used to load from data instead. https://bugzilla.gnome.org/show_bug.cgi?id=722358 src/grl-registry.c | 57 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 25 deletions(-)
Review of attachment 266491 [details] [review]: ::: src/grl-registry.c @@ +1687,3 @@ + * + * Load plugin configurations from a .ini-like config file. + * This description doesn't correspond with the function, does it? @@ +1698,3 @@ +{ + GError *load_error = NULL; + GKeyFile *keyfile; This should be initialized to %NULL.
Created attachment 267259 [details] [review] core: Add grl_registry_add_config_from_resource()
Bastien, could you fix the function documentation? It says it loads a .ini-like config file, but I guess it is not, right?
(In reply to comment #6) > Bastien, could you fix the function documentation? It says it loads a .ini-like > config file, but I guess it is not, right? It says: Load plugin configurations from a .ini-like resource file. Which is what it does.
Hmmm, but that is almost the same than grl_registry_add_config_from_file(): "Load plugin configurations from a .ini-like config file." What's the difference then? We should update the documentation to clearly state the difference between both functions
GResource path vs. local file path. See other _from_resource() functions in your devhelp, the documentation pretty much matches.
Comment on attachment 267259 [details] [review] core: Add grl_registry_add_config_from_resource() commit f58647687b15766c60c7d1f22134316c0a9ac874 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Jan 16 18:08:55 2014 +0100 core: Add grl_registry_add_config_from_resource() https://bugzilla.gnome.org/show_bug.cgi?id=722358 src/grl-registry.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/grl-registry.h | 4 ++++ 2 files changed, 58 insertions(+)