diff --git a/calendar/resources/content/calendar.js b/calendar/resources/content/calendar.js index 1dd114b46c7..90ea7790221 100644 --- a/calendar/resources/content/calendar.js +++ b/calendar/resources/content/calendar.js @@ -194,6 +194,8 @@ function calendarInit() //a bit of a hack since the menulist doesn't remember the selected value var value = document.getElementById( 'event-filter-menulist' ).value; document.getElementById( 'event-filter-menulist' ).selectedItem = document.getElementById( 'event-filter-'+value ); + + gEventSource.alarmObserver.firePendingAlarms(); } // Set the date and time on the clock and set up a timeout to refresh the clock when the diff --git a/calendar/resources/content/calendarEvent.js b/calendar/resources/content/calendarEvent.js index 45c3f2257c3..303d562a1d8 100644 --- a/calendar/resources/content/calendarEvent.js +++ b/calendar/resources/content/calendarEvent.js @@ -642,8 +642,6 @@ CalendarEventDataSource.prototype.prepareAlarms = function calEvent_prepareAlarm this.alarmObserver = new CalendarAlarmObserver( this ); this.gICalLib.addObserver( this.alarmObserver ); - - this.alarmObserver.firePendingAlarms( this.alarmObserver ); } function CalendarAlarmObserver( calendarService ) @@ -662,8 +660,6 @@ CalendarAlarmObserver.prototype.firePendingAlarms = function calAlarm_firePendin for( var i in this.pendingAlarmList ) { this.fireAlarm( this.pendingAlarmList[ i ] ); - - observer.onAlarm( this.pendingAlarmList[ i ] ); } } this.pendingAlarmList = null; @@ -681,11 +677,11 @@ CalendarAlarmObserver.prototype.onError = function(){} CalendarAlarmObserver.prototype.onAlarm = function calAlarm_onAlarm( calendarEvent ) { - dump( "caEvent.alarmWentOff is "+ calendarEvent ); + dump( "caEvent.alarmWentOff is "+ calendarEvent + "\n" ); if( this.addToPending ) { - dump( "defering alarm "+ calendarEvent ); + dump( "defering alarm "+ calendarEvent + "\n" ); this.pendingAlarmList.push( calendarEvent ); } else @@ -696,7 +692,7 @@ CalendarAlarmObserver.prototype.onAlarm = function calAlarm_onAlarm( calendarEve CalendarAlarmObserver.prototype.fireAlarm = function calAlarm_fireAlarm( calendarEvent ) { - dump( "Fire alarm "+ calendarEvent ); + dump( "Fire alarm "+ calendarEvent + "\n" ); if( typeof( gCalendarWindow ) == "undefined" ) {