diff --git a/content/base/src/nsDocumentViewer.cpp b/content/base/src/nsDocumentViewer.cpp index 7ba06838db86..05b6612e0adf 100644 --- a/content/base/src/nsDocumentViewer.cpp +++ b/content/base/src/nsDocumentViewer.cpp @@ -4479,8 +4479,9 @@ nsresult rv; /* cleanup done, let's fire-up an error dialog to notify the user * what went wrong... - */ - ShowPrintErrorDialog(rv); + */ + if (rv != NS_ERROR_ABORT) + ShowPrintErrorDialog(rv); } return rv; diff --git a/gfx/src/gtk/nsDeviceContextSpecG.cpp b/gfx/src/gtk/nsDeviceContextSpecG.cpp index d571e932dc1d..0ea3e0e1bbb2 100644 --- a/gfx/src/gtk/nsDeviceContextSpecG.cpp +++ b/gfx/src/gtk/nsDeviceContextSpecG.cpp @@ -218,8 +218,12 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::Init(PRBool aQuiet) if (buttonPressed == 0) { canPrint = PR_TRUE; } + else { + rv = NS_ERROR_ABORT; + } } - } else { + } + else { canPrint = PR_TRUE; } @@ -293,7 +297,7 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::Init(PRBool aQuiet) return NS_OK; } - return NS_ERROR_FAILURE; + return rv; } NS_IMETHODIMP nsDeviceContextSpecGTK :: GetToPrinter( PRBool &aToPrinter ) diff --git a/gfx/src/xlib/nsDeviceContextSpecXlib.cpp b/gfx/src/xlib/nsDeviceContextSpecXlib.cpp index 4cfae4af7f86..f685816209ec 100644 --- a/gfx/src/xlib/nsDeviceContextSpecXlib.cpp +++ b/gfx/src/xlib/nsDeviceContextSpecXlib.cpp @@ -205,8 +205,12 @@ NS_IMETHODIMP nsDeviceContextSpecXlib::Init(PRBool aQuiet) if (buttonPressed == 0) { canPrint = PR_TRUE; } + else { + rv = NS_ERROR_ABORT; + } } - } else { + } + else { canPrint = PR_TRUE; } @@ -280,7 +284,7 @@ NS_IMETHODIMP nsDeviceContextSpecXlib::Init(PRBool aQuiet) return NS_OK; } - return NS_ERROR_FAILURE; + return rv; } NS_IMETHODIMP nsDeviceContextSpecXlib::GetToPrinter(PRBool &aToPrinter) diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 7ba06838db86..05b6612e0adf 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -4479,8 +4479,9 @@ nsresult rv; /* cleanup done, let's fire-up an error dialog to notify the user * what went wrong... - */ - ShowPrintErrorDialog(rv); + */ + if (rv != NS_ERROR_ABORT) + ShowPrintErrorDialog(rv); } return rv; diff --git a/layout/html/base/src/printing.properties b/layout/html/base/src/printing.properties index 820efb32ecf4..a79ac181c8c2 100644 --- a/layout/html/base/src/printing.properties +++ b/layout/html/base/src/printing.properties @@ -45,22 +45,22 @@ fontsize=10 # Print error codes print_error_dialog_title=Printer error -NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND=Printer command not found -NS_ERROR_GFX_PRINTER_CMD_FAILURE=Printer command failure -NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAIULABLE=No printer found -NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND=Printer not found -NS_ERROR_GFX_PRINTER_ACCESS_DENIED=Access to printer denied -NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE=Invalid printer attribute -NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY=Printer not ready -NS_ERROR_GFX_PRINTER_OUT_OF_PAPER=Printer out pf paper -NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR=Printer I/O error -NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE=Could not open output file for printing -NS_ERROR_GFX_PRINTER_FILE_IO_ERROR=Print file I/O error -NS_ERROR_UNEXPECTED=Unexpected error -NS_ERROR_OUT_OF_MEMORY=Out of memory -NS_ERROR_NOT_IMPLEMENTED=Functionality not implemented (yet) +NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND=There was a problem printing. The printer doesn't support a printing command. +NS_ERROR_GFX_PRINTER_CMD_FAILURE=There was a problem printing. An instruction that was sent to the printer failed. +NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAIULABLE=There was a problem printing. No printer could be found. +NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND=There was a problem printing. The printer could not be found. +NS_ERROR_GFX_PRINTER_ACCESS_DENIED=There was a problem printing. Access to the printer was denied. +NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE=There was a problem printing. Tried to set an invalid printer attribute. +NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY=There was a problem printing. The printer not ready. +NS_ERROR_GFX_PRINTER_OUT_OF_PAPER=There was a problem printing. The printer is out pf paper. +NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR=There was a problem printing. Printer I/O error. +NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE=There was a problem printing. The output file could not be opened. +NS_ERROR_GFX_PRINTER_FILE_IO_ERROR=There was an error writing the printing output file. +NS_ERROR_UNEXPECTED=There was an unexpected problem when printing. +NS_ERROR_OUT_OF_MEMORY=There was a problem printing. There is not enough free memory to print. +NS_ERROR_NOT_IMPLEMENTED=Some printing functionality is not implemented yet. NS_ERROR_NOT_AVAILABLE=Not available -NS_ERROR_ABORT=Job aborted -NS_ERROR_FAILURE=Failure +NS_ERROR_ABORT=The print job was aborted, or canceled. +NS_ERROR_FAILURE=Printing failed for some reason. # EOF.