Comment 20 for bug 684376

Revision history for this message
In , Timothy Arceri (t-fridey) wrote :

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