From ee0b3b032e472546577ac433cc16d9ddd1a11073 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 16 Feb 2025 21:39:29 +0100 Subject: [PATCH] change well known page width height option --- src/kds_s2000w_option_descriptors.c | 12 ++++++------ tests/kds_s2000w_option_descriptor_tests.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/kds_s2000w_option_descriptors.c b/src/kds_s2000w_option_descriptors.c index cbea3f3..494c370 100644 --- a/src/kds_s2000w_option_descriptors.c +++ b/src/kds_s2000w_option_descriptors.c @@ -999,9 +999,9 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_width() constraint->quant = 1; SANE_Option_Descriptor descriptor = { - "image-width", - "Image width", - "Image width", + SANE_NAME_PAGE_WIDTH, + SANE_TITLE_PAGE_WIDTH, + SANE_DESC_PAGE_WIDTH, SANE_TYPE_INT, SANE_UNIT_NONE, sizeof(SANE_Int), @@ -1023,9 +1023,9 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_height() constraint->quant = 1; SANE_Option_Descriptor descriptor = { - "image-height", - "Image height", - "Image height", + SANE_NAME_PAGE_HEIGHT, + SANE_TITLE_PAGE_HEIGHT, + SANE_DESC_PAGE_HEIGHT, SANE_TYPE_INT, SANE_UNIT_NONE, sizeof(SANE_Int), diff --git a/tests/kds_s2000w_option_descriptor_tests.c b/tests/kds_s2000w_option_descriptor_tests.c index 86167d2..4579f1c 100644 --- a/tests/kds_s2000w_option_descriptor_tests.c +++ b/tests/kds_s2000w_option_descriptor_tests.c @@ -208,9 +208,9 @@ void kds_s2000w_option_get_descriptor_eleven_test() { SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(11); - assert_string_equal("image-width", option->name); - assert_string_equal("Image width", option->title); - assert_string_equal("Image width", option->desc); + assert_string_equal(SANE_NAME_PAGE_WIDTH, option->name); + assert_string_equal(SANE_TITLE_PAGE_WIDTH, option->title); + assert_string_equal(SANE_DESC_PAGE_WIDTH, option->desc); assert_int_equal(SANE_TYPE_INT, option->type); assert_int_equal(SANE_UNIT_NONE, option->unit); assert_int_equal(sizeof(SANE_Int), option->size); @@ -225,9 +225,9 @@ void kds_s2000w_option_get_descriptor_twelve_test() { SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(12); - assert_string_equal("image-height", option->name); - assert_string_equal("Image height", option->title); - assert_string_equal("Image height", option->desc); + assert_string_equal(SANE_NAME_PAGE_HEIGHT, option->name); + assert_string_equal(SANE_TITLE_PAGE_HEIGHT, option->title); + assert_string_equal(SANE_DESC_PAGE_HEIGHT, option->desc); assert_int_equal(SANE_TYPE_INT, option->type); assert_int_equal(SANE_UNIT_NONE, option->unit); assert_int_equal(sizeof(SANE_Int), option->size); -- 2.39.5