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 722358 - Add grl_registry_add_config_from_resource
Add grl_registry_add_config_from_resource
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks: 722826
 
 
Reported: 2014-01-16 17:09 UTC by Bastien Nocera
Modified: 2014-01-27 09:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core: Split up keyfile processing for config (2.92 KB, patch)
2014-01-16 17:09 UTC, Bastien Nocera
committed Details | Review
core: Add grl_registry_add_config_from_resource() (2.86 KB, patch)
2014-01-16 17:09 UTC, Bastien Nocera
needs-work Details | Review
core: Add grl_registry_add_config_from_resource() (2.87 KB, patch)
2014-01-26 22:41 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-01-16 17:09:18 UTC
.
Comment 1 Bastien Nocera 2014-01-16 17:09:26 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.
Comment 2 Bastien Nocera 2014-01-16 17:09:31 UTC
Created attachment 266491 [details] [review]
core: Add grl_registry_add_config_from_resource()
Comment 3 Juan A. Suarez Romero 2014-01-26 22:22:52 UTC
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(-)
Comment 4 Juan A. Suarez Romero 2014-01-26 22:25:02 UTC
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.
Comment 5 Bastien Nocera 2014-01-26 22:41:48 UTC
Created attachment 267259 [details] [review]
core: Add grl_registry_add_config_from_resource()
Comment 6 Juan A. Suarez Romero 2014-01-27 07:59:25 UTC
Bastien, could you fix the function documentation? It says it loads a .ini-like config file, but I guess it is not, right?
Comment 7 Bastien Nocera 2014-01-27 08:02:20 UTC
(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.
Comment 8 Juan A. Suarez Romero 2014-01-27 08:18:57 UTC
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
Comment 9 Bastien Nocera 2014-01-27 08:25:14 UTC
GResource path vs. local file path.

See other _from_resource() functions in your devhelp, the documentation pretty much matches.
Comment 10 Juan A. Suarez Romero 2014-01-27 09:05:19 UTC
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(+)