rem: url.spec = droppedUrl; gCalendarWindow.calendarManager.launchAddCalendarDialog(url.fileBaseName, url.spec ) 
add: url.spec = droppedUrl; gCalendarWindow.calendarManager.launchOpenCalendarFileDialog(url.fileBaseName, url.spec ); 
context:    onDrop: function (aEvent, aXferData, aDragSession)   {      var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);      // trans.addDataFlavor("application/x-moz-file");      trans.addDataFlavor("text/x-moz-url");      aDragSession.getData (trans, i);      var dataObj = new Object();      var bestFlavor = new Object();      var len = new Object();      trans.getAnyTransferData(bestFlavor, dataObj, len);      switch (bestFlavor.value)      {      case "text/x-moz-url":         var droppedUrl = this.retrieveURLFromData(aXferData.data, aXferData.flavour.contentType);         if (!droppedUrl)             return;         // url has spec, fileName, fileBaseName, fileExtension and others         var url = Components.classes["@mozilla.org/network/standard-url;1"].createInstance();         url = url.QueryInterface(Components.interfaces.nsIURL);	      url.spec = droppedUrl;	      gCalendarWindow.calendarManager.launchAddCalendarDialog(url.fileBaseName, url.spec )         break;      case "application/x-moz-file": // file from OS, we expect it to be iCalendar data         try {            var fileObj = dataObj.value.QueryInterface(Components.interfaces.nsIFile);            var aDataStream = readDataFromFile( fileObj.path );         }         catch(ex) {            alert(ex.message);         }	 break;      }        },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d89fa92fd30b1260aaa26aae53bd2b8e22b3ca10/calendarManager.js/buggy/calendar/resources/content/calendarManager.js