First step to fix bug 177279: Alarms don't fire under certain (very common) conditions

This commit is contained in:
mostafah%oeone.com 2003-06-18 16:30:48 +00:00
Родитель e626476498
Коммит 0c6da5fb01
2 изменённых файлов: 5 добавлений и 7 удалений

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

@ -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

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

@ -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" )
{