Native NSPrintPanel bound to selected queue (#13) #44

Merged
gronod merged 1 commits from feat/13-nsprintpanel into milestone/m3-printing 2026-09-09 00:14:54 +01:00
Owner

Native NSPrintPanel bound to the selected CUPS queue via PMPrinterCreateFromPrinterIDPMSessionSetCurrentPMPrinter → session defaults — never System Settings, CUPS web UI, or NSWorkspace (#188).

  • Default button “Use Settings” (settings capture, not print); cancel → nil, not an error.
  • NSPrinter(name: displayName) fallback (from lpoptions printer-info) when PM binding fails; PMRelease on every path via defer.
  • UITestHooks panel stub (ICCERY_TEST_PRINT_PANEL=ok|cancel + PANEL_OPTIONS/PANEL_PRINTER) and ICCERY_CUPS_BIN_DIR for mock CUPS binaries — XCUITest can't drive the modal.
  • Layers ②–⑥ (ColorSync suppression + capture) land in issue 14 between binding and runModal.

Tests: PrintPanelStubTests cover cancel→nil, ok→result, default printer mapping. Panel-on-hardware PDE check is the M3 hardware gate.

Closes #13.

Generated with Devin

Native `NSPrintPanel` bound to the selected CUPS queue via `PMPrinterCreateFromPrinterID` → `PMSessionSetCurrentPMPrinter` → session defaults — never System Settings, CUPS web UI, or `NSWorkspace` (#188). - Default button **“Use Settings”** (settings capture, not print); cancel → `nil`, not an error. - `NSPrinter(name: displayName)` fallback (from `lpoptions` `printer-info`) when PM binding fails; `PMRelease` on every path via `defer`. - `UITestHooks` panel stub (`ICCERY_TEST_PRINT_PANEL=ok|cancel` + `PANEL_OPTIONS`/`PANEL_PRINTER`) and `ICCERY_CUPS_BIN_DIR` for mock CUPS binaries — XCUITest can't drive the modal. - Layers ②–⑥ (ColorSync suppression + capture) land in issue 14 between binding and `runModal`. Tests: `PrintPanelStubTests` cover cancel→nil, ok→result, default printer mapping. Panel-on-hardware PDE check is the M3 hardware gate. Closes #13. Generated with [Devin](https://devin.ai)
gronod added 1 commit 2026-09-09 00:14:23 +01:00
- PrintPanelService: PMPrinterCreateFromPrinterID(CUPS queue id) ->
  PMSessionSetCurrentPMPrinter -> session default settings/page format.
- NSPrinter(name: displayName) fallback when PM binding fails; display
  name resolved via lpoptions printer-info (docs/11 #188).
- Default button 'Use Settings' (capture, not print); cancel -> nil.
- PMPrinter released on every path via defer.
- UITestHooks: printPanelResult stub (ICCERY_TEST_PRINT_PANEL=ok/cancel
  + PANEL_OPTIONS/PANEL_PRINTER), printPanelStubbed gate, cupsBinaryDir
  + lpArgvOutURL env seams; CupsService injected via AppEnvironment.

Never opens System Settings / CUPS web UI / NSWorkspace.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
gronod merged commit 14f521a65e into milestone/m3-printing 2026-09-09 00:14:54 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#44