forked from 1b-agent/opencadstudio-upstream
feat(plot): printer driver properties and a roomier plot dialog
Properties… next to the printer used to open the CUPS web interface in a browser. It now edits the driver options of the *selected* printer the way LibreOffice's Properties… does, without leaving the plot dialog: - CUPS platforms (Linux, any desktop; macOS): an in-line editor lists the printer's PPD options as `lpoptions -l` reports them — media type, colour mode, quality, duplex, trays, scaling — with readable choice labels, Reset / Cancel / Apply. Apply keeps only the choices that differ from the driver defaults, per printer, in the plot config, and every job for that printer passes them as `lp -o key=value`. Where CUPS cannot answer, the desktop's printer settings panel opens instead of a browser. - Windows: the driver's document-properties sheet (`DocumentPropertiesW` with prompt, owned by the main window) and, on OK, the result stored as the user's printing preferences for that printer (`SetPrinter` level 9), which the job honours. `printui /e` (printing preferences) replaces the device-properties sheet as the fallback. The desktop print portal was tried first and dropped: GTK 4's print dialog loses the preselected printer when the default queue is listed before it, so the dialog always opened on the wrong printer. Dialog layout: the modal grows to 940×620; Printer / plotter and Paper size share a line with their pickers (long queue and media names now fit); Copies + Properties… and Custom… sit beneath; the custom-sheet editor labels each margin (Left / Right, Top / Bottom) and shows the unit. Also recognises `none_device`, AutoCAD's stored spelling for "no plotter", and writes it back unchanged. Tests: `lpoptions` parsing and keyword humanising, the editor flow (load, stale answer ignored, set, apply, remember, reset, error, cancel), device name round-trips including `none_device`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5e271e2dbb
commit
737666b894
29 files changed
+1000
-103
No files matched your search
@@ -5018,6 +5018,15 @@ plot =
|
||||
.custom-paper-size = Custom paper size
|
||||
.printable-margins = Printable margins
|
||||
.enter-a-positive-width-and-height = Enter a positive width and height.
|
||||
.paper-size = Paper size
|
||||
.count-driver-option-s-set-for-this-printer = __ocs_fmt_0__ driver option(s) set for this printer.
|
||||
.printer-properties-printer = Printer properties — __ocs_fmt_0__
|
||||
.this-printer-reports-no-driver-options = This printer reports no driver options.
|
||||
.could-not-read-the-printer-s-options-error = Could not read the printer's options: __ocs_fmt_0__
|
||||
.reading-the-printer-s-options = Reading the printer's options…
|
||||
.printing-preferences-saved-for-printer = Printing preferences saved for __ocs_fmt_0__.
|
||||
.printing-preferences-unchanged = Printing preferences unchanged.
|
||||
.printer-properties = Printer properties
|
||||
.merge-overlapping-lines = Слияние пересекающихся линий
|
||||
.object-lineweights = Весы для объектов
|
||||
.orientation = Ориентация
|
||||
|
||||
Reference in new issue
Block a user