mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
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:
parent
e849206e70
commit
a00043f6e5
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user