~ubuntu-branches/ubuntu/oneiric/lightning-extension/oneiric-proposed

« back to all changes in this revision

Viewing changes to calendar/base/src/calCalendarManager.js

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2011-12-29 12:14:14 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20111229121414-q6pyb0vyeprgpl4e
Tags: 1.1+build1-0ubuntu0.11.10.1
* New upstream stable release (CALENDAR_1_1_BUILD1) (LP: #909599)

* Refresh debian/patches/02_fix_system_libxul_build.patch
* Add debian/patches/03_maxversion_override.patch to ensure compatibility
  with Thunderbird 9 point releases
* Add the new python IDL parser to the tarball
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 *   Philipp Kewisch <mozilla@kewis.ch>
26
26
 *   Daniel Boelzle <daniel.boelzle@sun.com>
27
27
 *   Simon Vaillancourt <simon.at.orcl@gmail.com>
 
28
 *   Lennart Bublies <Lennart.Bublies@gmx.de>
28
29
 *
29
30
 * Alternatively, the contents of this file may be used under the terms of
30
31
 * either the GNU General Public License Version 2 or later (the "GPL"), or
663
664
    },
664
665
 
665
666
    registerCalendar: function(calendar) {
666
 
        // bail if this calendar (or one that looks identical to it) is already registered
667
 
        cal.ASSERT(calendar.id === null, "[calCalendarManager::registerCalendar] calendar already registered!", true);
668
667
        this.assureCache();
669
668
 
670
 
        calendar.id = cal.getUUID();
 
669
        // If the calendar is already registered, bail out
 
670
        cal.ASSERT(!calendar.id || !(calendar.id in this.mCache),
 
671
                   "[calCalendarManager::registerCalendar] calendar already registered!",
 
672
                   true);
 
673
 
 
674
        if (!calendar.id) {
 
675
            calendar.id = cal.getUUID();
 
676
        }
 
677
 
671
678
        cal.setPref(getPrefBranchFor(calendar.id) + "type", calendar.type);
672
679
        cal.setPref(getPrefBranchFor(calendar.id) + "uri", calendar.uri.spec);
673
680