mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-14 19:27:04 -04:00
* Print: list driverless CUPS destinations, not only permanent queues The Print dialog's printer list came from `lpstat -p -d`, which lists only permanent queues. A driverless IPP printer discovered on the network — the standard setup on modern Linux desktops — has no permanent queue: only `lpstat -e` (CUPS >= 1.7) names it, and CUPS builds a temporary queue when `lp` sends it a job. Until now such printers were invisible and the dialog showed only Save as PDF. Enumerate `lpstat -e` alongside `lpstat -p -d` and merge the answers: queues first, deduplicated, default still from `-d`; a spooler without `-e` keeps today's behaviour and loses only the driverless names. The .deb/.rpm now recommend cups-client so a machine without a print stack is not silently printerless. Fixes #652 Co-authored-by: ZCode (GLM-5.3) <[email protected]> * Print: fix the off-unix build and a driverless default's marker `lpstat_e_command` is called only from `printers`' unix block, so off unix it was dead code and CI's Windows clippy gate (`-D warnings`) failed to build the crate. Gate it like its caller. The default destination can itself be driverless — `lpoptions -d` names a destination no queue exists for — and the merge appended it from `lpstat -e` with `default: false`, so the dialog preselected the first queue instead of the user's default. The `-d` default now marks the appended entry too; the test covers it, and CRLF in `-e` output. Co-authored-by: ZCode (GLM-5.3) <[email protected]> --------- Co-authored-by: ZCode (GLM-5.3) <[email protected]> Co-authored-by: Brandon Thomas <[email protected]>