rem: 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");   var thisCalendar = new CalendarObject; thisCalendar.name = "Default"; thisCalendar.path = profileFile.path; var active; 
add: var newCalendarFile = this.getProfileDirectory(); newCalendarFile.append( "Calendar" ); newCalendarFile.append( "CalendarDataFile.ics" ); 
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 ServerArray = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "servers.array", "" );      var ArrayOfCalendars = ServerArray.split( "," );      //don't count the default server, so this starts at 1   for( var i = 1; i < ArrayOfCalendars.length; i++ )   {      if( ArrayOfCalendars[i] >= this.nextCalendarNumber )         this.nextCalendarNumber = parseInt( ArrayOfCalendars[i] )+1;      thisCalendar = new CalendarObject();            try {          thisCalendar.serverNumber = ArrayOfCalendars[i];         thisCalendar.name = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+ArrayOfCalendars[i]+".name", "" );         thisCalendar.path = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+ArrayOfCalendars[i]+".path", "" );         thisCalendar.active = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+ArrayOfCalendars[i]+".active", false );         thisCalendar.remote = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+ArrayOfCalendars[i]+".remote", false );         thisCalendar.remotePath = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+ArrayOfCalendars[i]+".remotePath", "" );                  this.calendars[ this.calendars.length ] = thisCalendar;      }      catch ( e )      {         dump( "error: could not get calendar information from preferences\n"+e );      }   }   var RefreshServers = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "servers.reloadonlaunch", false );      if( RefreshServers == true )      this.refreshAllRemoteCalendars( );}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/eccfe24949238ab11afd71e280a2c50fe7ee3ea0/calendarManager.js/buggy/calendar/resources/content/calendarManager.js