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 657357 - Make IndividualAggregator a singleton or officially support using multiple instances of it
Make IndividualAggregator a singleton or officially support using multiple in...
Status: RESOLVED DUPLICATE of bug 667410
Product: folks
Classification: Platform
Component: general
git master
Other All
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-25 17:25 UTC by Tiffany Antopolski
Modified: 2012-01-09 11:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tiffany Antopolski 2011-08-25 17:25:06 UTC
when you create two FolksIndividualAggreators in the same process, the second one ends up empty.
Comment 1 Philip Withnall 2011-08-27 17:41:32 UTC
folks wasn't really designed with this use case in mind, so while it probably is a bug, I'd want to know why you're using two IndividualAggregators in your code. Setting up an IndividualAggregator is quite an expensive operation, and you don't want to be doing it twice if you can avoid it.
Comment 2 Tiffany Antopolski 2011-08-27 17:48:13 UTC
What if two independent libraries in the same program try to both create an aggregator.  They can't really be expected to know about eachother.  

I personally wasn't really trying to do that, and have since altered my code, but I think this is still a bug.  Perhaps make it a singleton?
Comment 3 Philip Withnall 2011-08-27 18:12:42 UTC
(In reply to comment #2)
> What if two independent libraries in the same program try to both create an
> aggregator.  They can't really be expected to know about eachother.  

That is a reasonable point. I'd probably expect one or both of the libraries to allow the user to pass an existing IndividualAggregator instance to them instead of always creating their own. Specifically, I think all of the libfolks-gtk widgets (including yours) should do that.

> I personally wasn't really trying to do that, and have since altered my code,
> but I think this is still a bug.  Perhaps make it a singleton?

As I said on IRC, there's a comment in the code already questioning whether we should do that.

I'm going to hijack this bug and make it about singletonising IndividualAggregator. (I hope you don't mind!)
Comment 4 Tiffany Antopolski 2011-08-28 03:52:36 UTC
Sounds perfectly reasonable :-)
Comment 5 Philip Withnall 2012-01-09 11:32:05 UTC
I was tricked into fixing the bugs in IndividualAggregator which were making the second instance of it empty in bug #667410. It looks like we now officially support multiple IndividualAggregator instances!

Tiffany, if you find any more bugs due to having multiple individual aggregators, please open a new bug report about them. Thanks.

*** This bug has been marked as a duplicate of bug 667410 ***