add:  var RefreshServers = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "servers.reloadonlaunch", false );  if( RefreshServers == true ) this.refreshAllRemoteCalendars( );  
context: calendarManager.prototype.getAllCalendars = function calMan_getAllCalendars(){   this.calendars = new Array();   var profileComponent = Components.classes["@mozilla.org/profile/manager;1"].createInstance();         var profileInternal = profileComponent.QueryInterface(Components.interfaces.nsIProfileInternal);    var profileFile = profileInternal.getProfileDir(profileInternal.currentProfile);         profileFile.append("CalendarDataFile.ics");                         //the root calendar is not stored in the prefs file.   var thisCalendar = new CalendarObject;   thisCalendar.name = "Default";   thisCalendar.path = profileFile.path;   var active;   active = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "server0.active", true );   thisCalendar.active = active;   thisCalendar.remote = false;   this.calendars[ this.calendars.length ] = thisCalendar;      //go through the prefs file, calendars are stored in there.   var NumberOfCalendars = getIntPref(this.CalendarWindow.calendarPreferences.calendarPref, "servers.count", 1 );      var RefreshServers = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "servers.reloadonlaunch", false );      dump( "\nYou have "+NumberOfCalendars+" and I'm supposed to refresh teh server? "+RefreshServers );      //don't count the default server, so this starts at 1   for( var i = 1; i < NumberOfCalendars; i++ )   {      thisCalendar = new CalendarObject();      try {                thisCalendar.name = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".name", "" );         thisCalendar.path = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".path", "" );         thisCalendar.active = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".active", false );         thisCalendar.remote = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".remote", false );         thisCalendar.remotePath = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".remotePath", "" );                  if( RefreshServers == true && thisCalendar.remote == true )            this.retrieveAndSaveRemoteCalendar( thisCalendar, onResponseAndRefresh );                  this.calendars[ this.calendars.length ] = thisCalendar;      }      catch ( e )      {         dump( "error: could not get calendar information from preferences\n"+e );      }   }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/77824624bf822726f3d6c3e79b6fbdb8110fa894/calendarManager.js/buggy/calendar/resources/content/calendarManager.js