Bug 413462 - "GTK print dialog has incorrect filename extension for Print to File" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=roc a1.9=damons]

This commit is contained in:
reed@reedloden.com 2008-02-09 22:07:34 -08:00
Родитель e849206e70
Коммит a00043f6e5
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -430,6 +430,12 @@ nsPrintSettingsGTK::SetToFileName(const PRUnichar * aToFileName)
return NS_OK;
}
if (StringEndsWith(nsDependentString(aToFileName), NS_LITERAL_STRING(".ps"))) {
gtk_print_settings_set(mPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT, "ps");
} else {
gtk_print_settings_set(mPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT, "pdf");
}
nsCOMPtr<nsILocalFile> file;
NS_NewLocalFile(nsDependentString(aToFileName), PR_TRUE, getter_AddRefs(file));