diff --git a/CHANGES.md b/CHANGES.md index 7e2e0023..91a551f9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,5 +25,6 @@ Changes in v2.0b1 - Fixed "printer-id" value for new printers (Issue #301) - Fixed Set-Printer-Attributes for "output-bin-default" and "sides-default" (Issue #305) +- Fixed "printer-settable-attributes-supported" value (Issue #311) - Fixed `-n` support for setting number of copies (Issue #312) - Fixed default "copies" value with `papplJobCreateWithFile`. diff --git a/pappl/printer-driver.c b/pappl/printer-driver.c index fee0c089..8203d54b 100644 --- a/pappl/printer-driver.c +++ b/pappl/printer-driver.c @@ -451,7 +451,6 @@ make_attrs( static const char * const printer_settable_attributes[] = { // printer-settable-attributes values "copies-default", - "document-format-default", "media-col-default", "media-col-ready", "media-default", @@ -461,6 +460,7 @@ make_attrs( "print-color-mode-default", "print-content-optimize-default", "print-quality-default", + "printer-contact-col", "printer-geo-location", "printer-location", "printer-organization", @@ -1076,12 +1076,14 @@ make_attrs( // printer-settable-attributes memcpy((void *)svalues, printer_settable_attributes, sizeof(printer_settable_attributes)); - num_values = (int)(sizeof(printer_settable_attributes) / sizeof(printer_settable_attributes[0])); + num_values = sizeof(printer_settable_attributes) / sizeof(printer_settable_attributes[0]); if (data->mode_supported) svalues[num_values ++] = "label-mode-configured"; if (data->tear_offset_supported[1]) svalues[num_values ++] = "label-tear-off-configured"; + if (data->num_bin) + svalues[num_values ++] = "output-bin-default"; if (data->darkness_supported) svalues[num_values ++] = "print-darkness-default"; if (data->speed_supported[1]) @@ -1093,6 +1095,8 @@ make_attrs( svalues[num_values ++] = "printer-wifi-password"; svalues[num_values ++] = "printer-wifi-ssid"; } + if (data->sides_supported != PAPPL_SIDES_ONE_SIDED) + svalues[num_values ++] = "sides-default"; for (i = 0; i < (size_t)data->num_vendor && num_values < (int)(sizeof(svalues) / sizeof(svalues[0])); i ++) { snprintf(vvalues[i], sizeof(vvalues[0]), "%s-default", data->vendor[i]);