rem: gAlarmWindow.focus(); if ("addAlarm" in gAlarmWindow) { gAlarmWindow.addAlarm(event); 
add: if (this._WindowOpening) { openAlarmWindow = this._WindowOpening; } openAlarmWindow.focus(); if ("addAlarm" in openAlarmWindow) { openAlarmWindow.addAlarm(event); 
context:     onAlarm: function( event ) {        //If an event has alarm email address, we assume the alarm is of email        //type.  See similar note in eventDialog.js        if(event.alarmEmailAddress && event.alarmEmailAddress != "") {            //XXX Re-implement this!            return;        }        //The alarm dialog will play a sound, but if it isn't opened, we need        //to play a sound on our own here.        var prefService = Components.classes["@mozilla.org/preferences-service;1"]                          .getService(Components.interfaces.nsIPrefService);        var calendarPrefs = prefService.getBranch("calendar.alarms.");        if(!calendarPrefs.getBoolPref("show") &&            calendarPrefs.getBoolPref("playsound")) {            playSound();            return;        }        //Check to see if an alarm window already exists.  It not, create it.        var wMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"]                                  .getService(Components.interfaces.nsIWindowMediator);        var gAlarmWindow = wMediator.getMostRecentWindow("calendarAlarmWindow");        if( !gAlarmWindow ) {            var wWatcher = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]                                     .getService(Components.interfaces.nsIWindowWatcher);            gAlarmWindow = wWatcher.openWindow(null,                                               "chrome://calendar/content/calendar-alarm-dialog.xul",                                               "_blank",                                               "chrome,dialog=yes,all",                                                null);        }        gAlarmWindow.focus();        if ("addAlarm" in gAlarmWindow) {            gAlarmWindow.addAlarm(event);        }         else {            var addAlarm = function() {                gAlarmWindow.addAlarm( event );            }            gAlarmWindow.addEventListener("load", addAlarm, false);        }    }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5ddcc8248b1cadf8793adf2012758e7ac4e758d0/calAlarmMonitor.js/clean/calendar/resources/content/calAlarmMonitor.js