Hi Robert, Thanks for taking a look at the patch so quickly. To answer your question, no nothing else needs to be changed.
The code that sets pdf to default is in nsPrintSettingsGTK.cpp this checks the extension of the string that I have changed:
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"); }
Maybe it could be improved so that the string is set to mozilla. rather than mozilla.pdf then the extension is attached in nsPrintSettingsGTK.cpp after the print setting is set.
Note: The whole setting of the extension in the application seems a bit messy and I've suggested an improvement to GTK here https://bugzilla.gnome.org/show_bug.cgi?id=657322
Hi Robert,
Thanks for taking a look at the patch so quickly. To answer your question, no nothing else needs to be changed.
The code that sets pdf to default is in nsPrintSettings GTK.cpp this checks the extension of the string that I have changed:
if (StringEndsWith (nsDependentStr ing(aToFileName ), NS_LITERAL_ STRING( ".ps")) ) { print_settings_ set(mPrintSetti ngs, GTK_PRINT_ SETTINGS_ OUTPUT_ FILE_FORMAT, "ps"); print_settings_ set(mPrintSetti ngs, GTK_PRINT_ SETTINGS_ OUTPUT_ FILE_FORMAT, "pdf");
gtk_
} else {
gtk_
}
Maybe it could be improved so that the string is set to mozilla. rather than mozilla.pdf then the extension is attached in nsPrintSettings GTK.cpp after the print setting is set.
Note: The whole setting of the extension in the application seems a bit messy and I've suggested an improvement to GTK here https:/ /bugzilla. gnome.org/ show_bug. cgi?id= 657322