GNOME Bugzilla – Bug 657357
Make IndividualAggregator a singleton or officially support using multiple instances of it
Last modified: 2012-01-09 11:32:05 UTC
when you create two FolksIndividualAggreators in the same process, the second one ends up empty.
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.
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?
(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!)
Sounds perfectly reasonable :-)
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 ***