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 629096 - Add a library init function
Add a library init function
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
git master
Other Linux
: Normal normal
: gnome-3.0
Assigned To: folks-maint
folks-maint
Depends on: 628970
Blocks: 629084
 
 
Reported: 2010-09-08 18:31 UTC by Philip Withnall
Modified: 2010-09-20 23:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Move debug initialisation to BackendStore (1.57 KB, patch)
2010-09-13 15:26 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2010-09-08 18:31:31 UTC
While writing the folks-import tool, I've found that I can't stop the flow of debug messages, because log handling is initialised in the constructor for IndividualAggregator, but folks-import doesn't use an IndividualAggregator.

I think we should add a library initialisation function, similar to gtk_init() and friends, which would take care of this. For the moment, I can only think of setting up the debug log handling, but there may be other code which can go in there in future.
Comment 1 Philip Withnall 2010-09-13 13:43:48 UTC
Actually, this code can just move to the constructor of BackendStore now that we're making it a singleton.
Comment 2 Philip Withnall 2010-09-13 13:59:06 UTC
(Mass changing milestones; please search for this phrase to delete the bug spam.)
Comment 3 Philip Withnall 2010-09-13 15:26:25 UTC
Created attachment 170163 [details] [review]
Move debug initialisation to BackendStore

http://git.collabora.co.uk/?p=user/pwith/folks;a=shortlog;h=refs/heads/629096-debug-init

This does just that, and is based on the bgo628970-expose-backends branch in bug #628970.
Comment 4 Travis Reitter 2010-09-20 23:02:58 UTC
Review of attachment 170163 [details] [review]:

Looks good.
Comment 5 Travis Reitter 2010-09-20 23:03:15 UTC
Merged:

commit 7debb14bfbb22b5865c1d60804c81777151e3640
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Mon Sep 13 16:24:03 2010 +0100

    Move debug initialisation to BackendStore
    
    Now that the BackendStore is a singleton, its initialiser will more reliably
    be called than the initialiser for IndividualAggregator (since clients can
    theoretically not use the IndividualAggregator, but have to use the
    BackendStore). Closes: bgo#629096

 folks/backend-store.vala         |    3 +++
 folks/individual-aggregator.vala |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)