[simple-scan/gnome-3-36] Add initial Lexmark printers support



commit 3c6c83e70b26d5d40ad13310b75c7604d49cf6ec
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date:   Thu Apr 2 22:54:04 2020 +0200

    Add initial Lexmark printers support
    
    Fixes: #161

 src/scanner.vala | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/scanner.vala b/src/scanner.vala
index a3a52da..466d517 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -1006,6 +1006,7 @@ public class Scanner : Object
                     "Color",
                     "24bit Color[Fast]", /* brother4 driver, Brother DCP-1622WE, #134 */
                     "24bit Color", /* Seen in the proprietary brother3 driver */
+                    "24-bit Color", /* #161 Lexmark CX310dn */
                     "Color - 16 Million Colors" /* Samsung unified driver. LP: 892915 */
                 };
                 string[] gray_scan_modes =
@@ -1014,6 +1015,7 @@ public class Scanner : Object
                     "Gray",
                     "Grayscale",
                     Sane.I18N ("Grayscale"),
+                    "8-bit Grayscale", /* #161 Lexmark CX310dn */
                     "True Gray", /* Seen in the proprietary brother3 driver */
                     "Grayscale - 256 Levels"  /* Samsung unified driver. LP: 892915 */
                 };
@@ -1025,7 +1027,7 @@ public class Scanner : Object
                     Sane.I18N ("LineArt"),
                     "Black & White",
                     Sane.I18N ("Black & White"),
-                    "Binary",
+                    "Binary", /* Epson PM-A820 */
                     Sane.I18N ("Binary"),
                     "Thresholded",
                     Sane.VALUE_SCAN_MODE_GRAY,
@@ -1033,8 +1035,10 @@ public class Scanner : Object
                     "Grayscale",
                     Sane.I18N ("Grayscale"),
                     "True Gray", /* Seen in the proprietary brother3 driver */
+                    "1-bit Black & White", /* #161 Lexmark CX310dn */
                     "Black and White - Line Art",  /* Samsung unified driver. LP: 892915 */
-                    "Black and White - Halftone"
+                    "Black and White - Halftone",
+                    "Monochrome" /* Epson */
                 };
 
                 switch (job.scan_mode)
@@ -1058,6 +1062,8 @@ public class Scanner : Object
 
             /* Duplex */
             option = get_option_by_name (handle, "duplex", out index);
+            if (option == null) /* #161 Lexmark CX310dn Duplex */
+                option = get_option_by_name (handle, "scan-both-sides", out index);
             if (option != null)
             {
                 if (option.type == Sane.ValueType.BOOL)
@@ -1098,6 +1104,8 @@ public class Scanner : Object
 
             /* Set resolution and bit depth */
             option = get_option_by_name (handle, Sane.NAME_SCAN_RESOLUTION, out index);
+            if (option == null) /* #161 Lexmark CX310dn Duplex */
+                option = get_option_by_name (handle, "scan-resolution", out index);
             if (option != null)
             {
                 set_fixed_or_int_option (handle, option, index, job.dpi, out job.dpi);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]