NS_IMETHODIMP nsUnknownContentTypeHandler::PromptForSaveToFile( nsISupports * aWindowContext, const PRUnichar * aDefaultFile, const PRUnichar * aSuggestedFileExtension, nsILocalFile ** aNewFile ) {  printf("PromptForSaveToFile!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\n"); return NS_OK; }
nsUnknownContentTypeHandler::PromptForSaveToFile(nsISupports * aWindowContext, const PRUnichar * aDefaultFile, const PRUnichar * aSuggestedFileExtension, nsILocalFile ** aNewFile) { nsresult rv = NS_OK; nsCOMPtr<nsIFilePicker> filePicker = do_CreateInstance("@mozilla.org/filepicker;1", &rv); if (filePicker) { nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID); nsCOMPtr<nsIStringBundle> stringBundle; NS_ENSURE_TRUE(stringService, NS_ERROR_FAILURE);  NS_ENSURE_SUCCESS(stringService->CreateBundle(HELPERAPP_DIALOG_URL, nsnull, getter_AddRefs(stringBundle)), NS_ERROR_FAILURE);  nsXPIDLString windowTitle; stringBundle->GetStringFromName(NS_LITERAL_STRING("saveDialogTitle").get(), getter_Copies(windowTitle));  nsCOMPtr<nsIDOMWindowInternal> parent( do_GetInterface( aWindowContext ) ); filePicker->Init(parent, windowTitle, nsIFilePicker::modeSave); filePicker->SetDefaultString(aDefaultFile); nsAutoString wildCardExtension (NS_LITERAL_STRING("*").get()); if (aSuggestedFileExtension) wildCardExtension.Append(aSuggestedFileExtension); else wildCardExtension.Append(NS_LITERAL_STRING(".*").get());  filePicker->AppendFilter(wildCardExtension.GetUnicode(), wildCardExtension.GetUnicode()); filePicker->AppendFilters(nsIFilePicker::filterAll);  PRInt16 dialogResult; filePicker->Show(&dialogResult); if (dialogResult == nsIFilePicker::returnCancel) rv = NS_ERROR_FAILURE; else rv = filePicker->GetFile(aNewFile); }  return rv; }
NS_IMETHODIMP nsUnknownContentTypeHandler::PromptForSaveToFile( nsISupports * aWindowContext, const PRUnichar * aDefaultFile, const PRUnichar * aSuggestedFileExtension, nsILocalFile ** aNewFile ) {/* ATENTIE */ printf("PromptForSaveToFile!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\n");	return NS_OK;	}