wineps.drv: Set the AP_D_InputSlot CUPS option if no input slot is specified.

This overrides a default InputSlot value specified or derived from the PPD and
allows the tray to be auto-selected based on the media.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ken Thomases 2017-03-12 17:12:59 -05:00 committed by Alexandre Julliard
parent d7f68cb5f4
commit 485840bc2d
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,7 @@ static const char *cups_duplexes[3] =
};
static const char cups_collate_false[] = "%cupsJobTicket: collate=false\n";
static const char cups_collate_true[] = "%cupsJobTicket: collate=true\n";
static const char cups_ap_d_inputslot[] = "%cupsJobTicket: AP_D_InputSlot=\n"; /* intentionally empty value */
static const char psheader[] = /* title llx lly urx ury orientation */
"%%%%Creator: Wine PostScript Driver\n"
@ -375,6 +376,10 @@ static void write_cups_job_ticket( PHYSDEV dev, const struct ticket_info *info )
write_spool( dev, cups_collate_true, sizeof(cups_collate_true) - 1 );
}
}
if (!(physDev->Devmode->dmPublic.dmFields & DM_DEFAULTSOURCE) ||
physDev->Devmode->dmPublic.u1.s1.dmDefaultSource == DMBIN_AUTO)
write_spool( dev, cups_ap_d_inputslot, sizeof(cups_ap_d_inputslot) - 1 );
}
INT PSDRV_WriteHeader( PHYSDEV dev, LPCWSTR title )