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

Alexandre Julliard julliard at winehq.org
Mon Mar 13 15:40:31 CDT 2017


Module: wine
Branch: master
Commit: 485840bc2dfc6d510b22684764eaea3659af5063
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=485840bc2dfc6d510b22684764eaea3659af5063

Author: Ken Thomases <ken at codeweavers.com>
Date:   Sun Mar 12 17:12:59 2017 -0500

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 at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wineps.drv/ps.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c
index a01346e..972609d 100644
--- a/dlls/wineps.drv/ps.c
+++ b/dlls/wineps.drv/ps.c
@@ -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 )




More information about the wine-cvs mailing list