add: fp.appendFilter( filtervCalendar, "*" + extensionvCalendar ); 
context: function saveEventsToFile( calendarEventArray ){   if( !calendarEventArray)      calendarEventArray = gCalendarWindow.EventSelection.selectedEvents;   if (calendarEventArray.length == 0)   {      alert( calendarStringBundle.GetStringFromName( "noEventsToSave" ) );      return;   }   // No show the 'Save As' dialog and ask for a filename to save to   const nsIFilePicker = Components.interfaces.nsIFilePicker;   var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);   // caller can force disable of sand box, even if ON globally   fp.init(window, "Save As", nsIFilePicker.modeSave);   if(calendarEventArray.length == 1 && calendarEventArray[0].title)      fp.defaultString = calendarEventArray[0].title;   else      fp.defaultString = calendarStringBundle.GetStringFromName( "defaultFileName" );   fp.defaultExtension = "ics";   fp.appendFilter( filterCalendar, "*" + extensionCalendar );   fp.appendFilter( filterRtf, "*" + extensionRtf );   fp.appendFilters(nsIFilePicker.filterHTML);   fp.appendFilter( filterCsv, "*" + extensionCsv );   fp.appendFilter( filterXcs, "*" + extensionXcs );   fp.appendFilter( filterRdf, "*" + extensionRdf );   fp.show();   // Now find out as what to save, convert the events and save to file.   if (fp.file && fp.file.path.length > 0)    {      const UTF8 = "UTF-8";      var aDataStream;      var extension;      var charset;      switch (fp.filterIndex) {      case 0 : // ics         aDataStream = eventArrayToICalString( calendarEventArray, true );         extension   = extensionCalendar;         charset = "UTF-8";         break;      case 1 : // rtf         aDataStream = eventArrayToRTF( calendarEventArray );         extension   = extensionRtf;         break;      case 2 : // html         aDataStream = eventArrayToHTML( calendarEventArray );         extension   = ".htm";         charset = "UTF-8";         break;      case 3 : // csv         aDataStream = eventArrayToCsv( calendarEventArray );         extension   = extensionCsv;         charset = "UTF-8";         break;      case 4 : // xCal         aDataStream = eventArrayToXCS( calendarEventArray );         extension   = extensionXcs;         charset = "UTF-8";         break;      case 5 : // rdf         aDataStream = eventArrayToRdf( calendarEventArray );         extension   = extensionRdf;         charset = "UTF-8";         break;      }      var filePath = fp.file.path;      if(filePath.indexOf(".") == -1 )          filePath += extension;      saveDataToFile( filePath, aDataStream, charset );   }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/dfbe72b204610db2a6a769ab49c4fc282ea030e7/importExport.js/clean/calendar/resources/content/importExport.js