Skip to content

Commit

Permalink
Save print-speed-default and printer-darkness-configured values if th…
Browse files Browse the repository at this point in the history
…e attributes are supported (Issue #337)
  • Loading branch information
michaelrsweet committed Feb 9, 2024
1 parent 06f8942 commit 977491a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Changes in v1.4.6

- Fixed reporting of "printer-strings-languages-supported" attribute
(Issue #328)
- Fixed saving of "print-darkness-default" value (Issue #330)
- Fixed saving of "print-darkness-default" and "print-speed-default" values
(Issue #330 and #337)
- Fixed incoming "raw" print socket support (Issue #331 and #338)
- Fixed web interface support for "printer-darkness" (Issue #333)
- Fixed some issues discovered by OpenScanHub (Issue #335)
Expand Down
4 changes: 2 additions & 2 deletions pappl/system-loadsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,9 @@ papplSystemSaveState(
cupsFilePutConf(fp, "print-quality-default", ippEnumString("print-quality", (int)printer->driver_data.quality_default));
if (printer->driver_data.scaling_default)
cupsFilePutConf(fp, "print-scaling-default", _papplScalingString(printer->driver_data.scaling_default));
if (printer->driver_data.speed_default)
if (printer->driver_data.speed_supported[1] > 0)
cupsFilePrintf(fp, "print-speed-default %d\n", printer->driver_data.speed_default);
if (printer->driver_data.darkness_configured)
if (printer->driver_data.darkness_supported > 0)
cupsFilePrintf(fp, "printer-darkness-configured %d\n", printer->driver_data.darkness_configured);
if (printer->driver_data.x_default)
cupsFilePrintf(fp, "printer-resolution-default %dx%ddpi\n", printer->driver_data.x_default, printer->driver_data.y_default);
Expand Down

0 comments on commit 977491a

Please sign in to comment.