From 977491a059b282dcaeab5d201f5955df1d9adcf6 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 9 Feb 2024 06:42:51 -0500 Subject: [PATCH] Save print-speed-default and printer-darkness-configured values if the attributes are supported (Issue #337) --- CHANGES.md | 3 ++- pappl/system-loadsave.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 17907c22..0f7f53f5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/pappl/system-loadsave.c b/pappl/system-loadsave.c index 8342736c..d66c0ddc 100644 --- a/pappl/system-loadsave.c +++ b/pappl/system-loadsave.c @@ -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);