Print jobs whose transport add-on is either "Print To File" or not set at all (in case of "Preview" printer) are not processed sequentially.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27113 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
812da77b02
commit
4523512663
@ -2,6 +2,9 @@ SubDir HAIKU_TOP src add-ons print transports print_to_file ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
# In case of changing the name of this transport add-on
|
||||
# the method NeedsLocking() in src/servers/print/ResourceManager.cpp
|
||||
# has to be updated as well.
|
||||
Addon Print\ To\ File :
|
||||
print_transport.cpp
|
||||
FileSelector.cpp
|
||||
|
@ -126,7 +126,7 @@ Printer::Printer(const BDirectory* node, Resource* res)
|
||||
: Inherited(B_EMPTY_STRING),
|
||||
fPrinter(gLock, be_app, *node),
|
||||
fResource(res),
|
||||
fSinglePrintThread(true),
|
||||
fSinglePrintThread(res->NeedsLocking()),
|
||||
fJob(NULL),
|
||||
fProcessing(0),
|
||||
fAbort(false)
|
||||
@ -136,9 +136,6 @@ Printer::Printer(const BDirectory* node, Resource* res)
|
||||
if (SpoolDir()->ReadAttrString(PSRV_PRINTER_ATTR_PRT_NAME, &name) == B_OK)
|
||||
SetName(name.String());
|
||||
|
||||
if (name == "Preview")
|
||||
fSinglePrintThread = false;
|
||||
|
||||
// Add us to the global list of known printer definitions
|
||||
sPrinters.AddItem(this);
|
||||
|
||||
|
@ -27,7 +27,15 @@ Resource::~Resource() {
|
||||
}
|
||||
|
||||
bool Resource::NeedsLocking() {
|
||||
return !(fTransport == "Print to File" || fTransport == "NONE");
|
||||
// TODO R2: Provide API to query that information
|
||||
// ATM: Print jobs are not processed sequentially
|
||||
// if the transport add-on is either "Print To File"
|
||||
// or in case of "Preview" printer it
|
||||
// is set on R5 to "NONE" IIRC and the Haiku
|
||||
// preflet sets an empty string.
|
||||
return !(fTransport == "Print To File"
|
||||
|| fTransport == "NONE"
|
||||
|| fTransport == "");
|
||||
}
|
||||
|
||||
bool Resource::Equals(const char* transport, const char* address, const char* connection) {
|
||||
|
@ -22,13 +22,12 @@ private:
|
||||
BString fConnection;
|
||||
sem_id fResourceAvailable;
|
||||
|
||||
bool NeedsLocking();
|
||||
|
||||
|
||||
public:
|
||||
Resource(const char* transport, const char* address, const char* connection);
|
||||
~Resource();
|
||||
|
||||
bool NeedsLocking();
|
||||
|
||||
bool Equals(const char* transport, const char* address, const char* connection);
|
||||
|
||||
const BString& Transport() const { return fTransport; }
|
||||
|
Loading…
Reference in New Issue
Block a user