Author: axeld Date: 2009-12-02 15:10:17 +0100 (Wed, 02 Dec 2009) New Revision: 34446 Changeset: http://dev.haiku-os.org/changeset/34446/haiku Modified: haiku/trunk/src/kits/interface/PrintJob.cpp Log: * CanContinue() should obviously return "true" before there is a reason to stop, ie. also before BeginJob() has been called. * This fixes BePDF and Gobe Productive not being able to print under Haiku. Modified: haiku/trunk/src/kits/interface/PrintJob.cpp =================================================================== --- haiku/trunk/src/kits/interface/PrintJob.cpp 2009-12-02 13:27:04 UTC (rev 34445) +++ haiku/trunk/src/kits/interface/PrintJob.cpp 2009-12-02 14:10:17 UTC (rev 34446) @@ -144,9 +144,10 @@ : fPrintJobName(NULL), fSpoolFile(NULL), - fError(B_ERROR), + fError(B_NO_INIT), fSetupMessage(NULL), fDefaultSetupMessage(NULL), + fAbort(0), fCurrentPageHeader(NULL) { memset(&fSpoolFileHeader, 0, sizeof(print_file_header)); @@ -200,6 +201,7 @@ if (!_HandlePrintSetup(fSetupMessage)) return B_ERROR; + fError = B_OK; return B_OK; } @@ -207,6 +209,8 @@ void BPrintJob::BeginJob() { + fError = B_ERROR; + // can not start a new job until it has been commited or cancelled if (fSpoolFile != NULL || fCurrentPageHeader == NULL) return; @@ -253,7 +257,7 @@ fSpoolFileHeader.first_page = (off_t)-1; if (fSpoolFile->Write(&fSpoolFileHeader, sizeof(print_file_header)) - != sizeof(print_file_header)) { + != sizeof(print_file_header)) { CancelJob(); return; }