Skip to content

Fix Duplicate Printer PPD and driver selection - #478

Merged
alexpevzner merged 4 commits into
masterfrom
improve-duplicate-printer-flow
Oct 4, 2026
Merged

alexpevzner merged 4 commits into
masterfrom
improve-duplicate-printer-flow

Conversation

@SinghCod3r

Copy link
Copy Markdown
Collaborator

Summary

Improve the Duplicate Printer workflow by opening the existing New Printer dialog instead of using a separate name-only dialog.

The duplicated printer now starts with its existing configuration and allows the user to review or modify the settings before creating the new queue.

Changes

  • Open the existing New Printer / Describe Printer dialog when duplicating a printer.
  • Preserve the original printer's:
    • Device URI
    • PPD/driver
    • Description
    • Location
    • Shared state
    • Discovered device identity
  • Preserve the driverless recommendation for printers that support driverless printing.
  • Avoid unnecessary PPD loading and driver matching when the original driver is retained.
  • Allow users to explicitly choose a different driver through the existing driver-selection workflow.
  • Show the existing inline loading spinner while the driver database is being loaded.
  • Clean up driver-loading state when navigating back or cancelling.
  • Keep class duplication and rename behavior unchanged.
  • Keep the normal Add Printer workflow unchanged.
  • Add regression tests covering duplicate initialization, PPD preservation, device identity, driver selection, and loading behavior.
  • Handle PPD retrieval/parsing failures safely and clean up temporary PPD files.

User-visible behavior

Previously:

Right-click printer → Duplicate → enter a new name

Now:

Right-click printer
    → Duplicate
    → New Printer / Describe Printer
    → review or modify settings
    → optionally choose a different driver
    → create the new printer

This also provides a way to correct the selected driver when needed without affecting the original printer.

Testing

  • pytest -q test_newprinter.py — 78 passed
  • python3 -m py_compile newprinter.py system-config-printer.py — passed
  • git diff --check — passed
  • Manually verified the Duplicate Printer workflow in the GUI.

@SinghCod3r
SinghCod3r marked this pull request as ready for review October 4, 2026 09:10
@alexpevzner
alexpevzner merged commit 0306bc2 into master Oct 4, 2026
5 checks passed
@alexpevzner
alexpevzner deleted the improve-duplicate-printer-flow branch October 7, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants