Last Comment Bug 776673 - Allow easily observing all calendars at once
: Allow easily observing all calendars at once
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Internal Components (show other bugs)
: Lightning 1.5
: All All
: -- normal (vote)
: 1.9
Assigned To: Philipp Kewisch [:Fallen]
:
Mentors:
Depends on:
Blocks: 777683
  Show dependency treegraph
 
Reported: 2012-07-23 13:15 PDT by Philipp Kewisch [:Fallen]
Modified: 2012-09-28 05:35 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix v1 - Add interface methods and test (33.59 KB, text/plain)
2012-07-23 13:15 PDT, Philipp Kewisch [:Fallen]
matthew.mecca: review+
Details

Description Philipp Kewisch [:Fallen] 2012-07-23 13:15:20 PDT
Created attachment 645038 [details]
Fix v1 - Add interface methods and test

Right now to observe operations on all calendars at once you have to:

* Create a composite calendar, add in all current calendars
* Observe the calendar manager to reflect additions/deletions into the composite calendar
* Add an observer on the composite calendar

I'd like to simplify this a bit so all you need to do is:

* Add a (new type of) observer on the calendar manager.

This patch takes care and also adds a test. If you are wondering about the large removal of getPrefBranchFor and friends, these functions are just moved (without change) to the bottom of the file so that the actual calendar manager is at the top.
Comment 1 Philipp Kewisch [:Fallen] 2012-07-23 13:23:16 PDT
Comment on attachment 645038 [details]
Fix v1 - Add interface methods and test

Actually, there is only this part. I'm so used to missing this in extensions I create that I wasn't aware this isn't used in core (yet).
Comment 2 Matthew Mecca [:mmecca] 2012-08-04 19:31:02 PDT
Comment on attachment 645038 [details]
Fix v1 - Add interface methods and test

Looks good. r=mmecca
Comment 3 Philipp Kewisch [:Fallen] 2012-08-09 11:38:31 PDT
Pushed to comm-central changeset 71eae60afbf6

Note You need to log in before you can comment on or make changes to this bug.