Bug 446190 ��� alarm service should mind disabled calendars; r=philipp

This commit is contained in:
daniel.boelzle%sun.com 2008-07-21 07:38:34 +00:00
Родитель 75755a7b88
Коммит f45524172e
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -119,7 +119,8 @@ interface calICalendar : nsISupports
* e.g. on the server or in local prefs.
*
* Currently known properties are:
* [boolean] calendar-main-in-composite
* [boolean] disabled
* [boolean] calendar-main-in-composite
* [string] name
* [boolean] readOnly
* [boolean] requiresNetwork If false, the calendar does not require

Просмотреть файл

@ -75,9 +75,7 @@ function calAlarmService() {
this.alarmService.notifyObservers("onRemoveAlarmsByCalendar", [calendar]);
// a refreshed calendar signals that it has been reloaded
// (and cannot notify detailed changes), thus reget all alarms of it:
if (!calendar.getProperty("disabled")) {
this.alarmService.initAlarms([calendar]);
}
this.alarmService.initAlarms([calendar]);
}
},
onAddItem: function(aItem) {
@ -581,7 +579,8 @@ calAlarmService.prototype = {
for each(var calendar in calendars) {
// assuming that suppressAlarms does not change anymore until refresh:
if (!calendar.getProperty("suppressAlarms") &&
calendar.getProperty("capabilities.alarms.popup.supported") !== false) {
(calendar.getProperty("capabilities.alarms.popup.supported") !== false) &&
!calendar.getProperty("disabled")) {
calendar.getItems(filter, 0, start, until, getListener);
}
}