From f331ce24649cb04de183b56069f498d0e7da8c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 2 Dec 2009 14:10:17 +0000 Subject: [PATCH] * 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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34446 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/PrintJob.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/PrintJob.cpp b/src/kits/interface/PrintJob.cpp index 61e23c1307..279ab388b1 100644 --- a/src/kits/interface/PrintJob.cpp +++ b/src/kits/interface/PrintJob.cpp @@ -144,9 +144,10 @@ BPrintJob::BPrintJob(const char* jobName) : 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 @@ BPrintJob::ConfigJob() if (!_HandlePrintSetup(fSetupMessage)) return B_ERROR; + fError = B_OK; return B_OK; } @@ -207,6 +209,8 @@ BPrintJob::ConfigJob() 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 @@ BPrintJob::BeginJob() fSpoolFileHeader.first_page = (off_t)-1; if (fSpoolFile->Write(&fSpoolFileHeader, sizeof(print_file_header)) - != sizeof(print_file_header)) { + != sizeof(print_file_header)) { CancelJob(); return; }