[simple-scan] Add help message for Canon Pixma Multi-Functions Printers



commit ebdc9dd1b9686ff63602de5cfa2261e811917bff
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date:   Fri Apr 10 19:20:23 2020 +0200

    Add help message for Canon Pixma Multi-Functions Printers

 src/app-window.vala  |   7 ++
 src/simple-scan.vala | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 219 insertions(+)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 3a16a68..c203039 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -1630,6 +1630,12 @@ public class AppWindow : Gtk.ApplicationWindow
             /* Instructions on how to install Brother scanner drivers */
             instructions = _("Drivers for this are available on the <a 
href=\"http://support.brother.com\";>Brother website</a>.");
             break;
+        case "pixma":
+            /* Message to indicate a Canon Pixma scanner has been detected */
+            message = _("You appear to have a Canon scanner, which is supported by <a 
href=\"http://www.sane-project.org/man/sane-pixma.5.html\";>pixma SANE backend</a>.");
+            /* Instructions on how to resolve issue with SANE scanner drivers */
+            instructions = _("Please check if your <a 
href=\"http://www.sane-project.org/sane-supported-devices.html\";>scanner was tested by SANE</a>, otherwise 
report the issue to <a href=\"https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/sane-devel\";>mailing 
list</a>.");
+            break;
         case "samsung":
             /* Message to indicate a Samsung scanner has been detected */
             message = _("You appear to have a Samsung scanner.");
@@ -1672,6 +1678,7 @@ public class AppWindow : Gtk.ApplicationWindow
         label.visible = true;
         label.xalign = 0f;
         label.vexpand = true;
+        label.use_markup = true;
         dialog.get_content_area ().add (label);
 
         var instructions_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
diff --git a/src/simple-scan.vala b/src/simple-scan.vala
index bcc720b..46e4768 100644
--- a/src/simple-scan.vala
+++ b/src/simple-scan.vala
@@ -543,6 +543,217 @@ public class SimpleScan : Gtk.Application
       0x04f960a9, /* ADS-1600W */
     };
 
+    /* Taken from backend/pixma/pixma_mp150.c pixma_mp730.c pixma_mp750.c pixma_mp800.c in the pixma SANE 
backend repository */
+    /* Canon Pixma IDs extracted using the following Python script
+      import sys
+      for f in sys.argv:
+        for l in open(f, "r").readlines():
+          tokens=l.split ()
+          if len (tokens) >= 3 and tokens[0].startswith("#define") and tokens[1].endswith("_PID") and 
tokens[2].startswith("0x") and not tokens[2].endswith("ffff"):
+            print ( "0x04a9" + tokens[2][2:] + ", /* " +  tokens[1][:-4] + " * /")
+    */
+    private const uint32 pixma_devices[] = {
+      0x04a91709, /* MP150 */
+      0x04a9170a, /* MP170 */
+      0x04a9170b, /* MP450 */
+      0x04a9170c, /* MP500 */
+      0x04a91712, /* MP530 */
+      0x04a91714, /* MP160 */
+      0x04a91715, /* MP180 */
+      0x04a91716, /* MP460 */
+      0x04a91717, /* MP510 */
+      0x04a91718, /* MP600 */
+      0x04a91719, /* MP600R */
+      0x04a9172b, /* MP140 */
+      0x04a9171c, /* MX7600 */
+      0x04a91721, /* MP210 */
+      0x04a91722, /* MP220 */
+      0x04a91723, /* MP470 */
+      0x04a91724, /* MP520 */
+      0x04a91725, /* MP610 */
+      0x04a91727, /* MX300 */
+      0x04a91728, /* MX310 */
+      0x04a91729, /* MX700 */
+      0x04a9172c, /* MX850 */
+      0x04a9172e, /* MP630 */
+      0x04a9172f, /* MP620 */
+      0x04a91730, /* MP540 */
+      0x04a91731, /* MP480 */
+      0x04a91732, /* MP240 */
+      0x04a91733, /* MP260 */
+      0x04a91734, /* MP190 */
+      0x04a91735, /* MX860 */
+      0x04a91736, /* MX320 */
+      0x04a91737, /* MX330 */
+      0x04a9173a, /* MP250 */
+      0x04a9173b, /* MP270 */
+      0x04a9173c, /* MP490 */
+      0x04a9173d, /* MP550 */
+      0x04a9173e, /* MP560 */
+      0x04a9173f, /* MP640 */
+      0x04a91741, /* MX340 */
+      0x04a91742, /* MX350 */
+      0x04a91743, /* MX870 */
+      0x04a91746, /* MP280 */
+      0x04a91747, /* MP495 */
+      0x04a91748, /* MG5100 */
+      0x04a91749, /* MG5200 */
+      0x04a9174a, /* MG6100 */
+      0x04a9174d, /* MX360 */
+      0x04a9174e, /* MX410 */
+      0x04a9174f, /* MX420 */
+      0x04a91750, /* MX880 */
+      0x04a91751, /* MG2100 */
+      0x04a91752, /* MG3100 */
+      0x04a91753, /* MG4100 */
+      0x04a91754, /* MG5300 */
+      0x04a91755, /* MG6200 */
+      0x04a91757, /* MP493 */
+      0x04a91758, /* E500 */
+      0x04a91759, /* MX370 */
+      0x04a9175B, /* MX430 */
+      0x04a9175C, /* MX510 */
+      0x04a9175D, /* MX710 */
+      0x04a9175E, /* MX890 */
+      0x04a9175A, /* E600 */
+      0x04a91763, /* MG4200 */
+      0x04a9175F, /* MP230 */
+      0x04a91765, /* MG6300 */
+      0x04a91760, /* MG2200 */
+      0x04a91761, /* E510 */
+      0x04a91762, /* MG3200 */
+      0x04a91764, /* MG5400 */
+      0x04a91766, /* MX390 */
+      0x04a91767, /* E610 */
+      0x04a91768, /* MX450 */
+      0x04a91769, /* MX520 */
+      0x04a9176a, /* MX720 */
+      0x04a9176b, /* MX920 */
+      0x04a9176c, /* MG2400 */
+      0x04a9176d, /* MG2500 */
+      0x04a9176e, /* MG3500 */
+      0x04a9176f, /* MG6500 */
+      0x04a91770, /* MG6400 */
+      0x04a91771, /* MG5500 */
+      0x04a91772, /* MG7100 */
+      0x04a91774, /* MX470 */
+      0x04a91775, /* MX530 */
+      0x04a91776, /* MB5000 */
+      0x04a91777, /* MB5300 */
+      0x04a91778, /* MB2000 */
+      0x04a91779, /* MB2300 */
+      0x04a9177a, /* E400 */
+      0x04a9177b, /* E560 */
+      0x04a9177c, /* MG7500 */
+      0x04a9177e, /* MG6600 */
+      0x04a9177f, /* MG5600 */
+      0x04a91780, /* MG2900 */
+      0x04a91788, /* E460 */
+      0x04a91787, /* MX490 */
+      0x04a91789, /* E480 */
+      0x04a9178a, /* MG3600 */
+      0x04a9178b, /* MG7700 */
+      0x04a9178c, /* MG6900 */
+      0x04a9178d, /* MG6800 */
+      0x04a9178e, /* MG5700 */
+      0x04a91792, /* MB2700 */
+      0x04a91793, /* MB2100 */
+      0x04a91794, /* G3000 */
+      0x04a91795, /* G2000 */
+      0x04a9179f, /* TS9000 */
+      0x04a91800, /* TS8000 */
+      0x04a91801, /* TS6000 */
+      0x04a91802, /* TS5000 */
+      0x04a9180b, /* MG3000 */
+      0x04a9180c, /* E470 */
+      0x04a9181e, /* E410 */
+      0x04a9181d, /* G4000 */
+      0x04a91822, /* TS6100 */
+      0x04a91825, /* TS5100 */
+      0x04a91827, /* TS3100 */
+      0x04a91828, /* E3100 */
+      0x04a9178f, /* MB5400 */
+      0x04a91790, /* MB5100 */
+      0x04a91820, /* TS9100 */
+      0x04a91823, /* TR8500 */
+      0x04a91824, /* TR7500 */
+      0x04a9185c, /* TS9500 */
+      0x04a91912, /* LIDE400 */
+      0x04a91913, /* LIDE300 */
+      0x04a91821, /* TS8100 */
+      0x04a9183a, /* G2010 */
+      0x04a9183b, /* G3010 */
+      0x04a9183d, /* G4010 */
+      0x04a9183e, /* TS9180 */
+      0x04a9183f, /* TS8180 */
+      0x04a91840, /* TS6180 */
+      0x04a91841, /* TR8580 */
+      0x04a91842, /* TS8130 */
+      0x04a91843, /* TS6130 */
+      0x04a91844, /* TR8530 */
+      0x04a91845, /* TR7530 */
+      0x04a91846, /* XK50 */
+      0x04a91847, /* XK70 */
+      0x04a91854, /* TR4500 */
+      0x04a91855, /* E4200 */
+      0x04a91856, /* TS6200 */
+      0x04a91857, /* TS6280 */
+      0x04a91858, /* TS6230 */
+      0x04a91859, /* TS8200 */
+      0x04a9185a, /* TS8280 */
+      0x04a9185b, /* TS8230 */
+      0x04a9185d, /* TS9580 */
+      0x04a9185e, /* TR9530 */
+      0x04a91863, /* G7000 */
+      0x04a91865, /* G6000 */
+      0x04a91866, /* G6080 */
+      0x04a91869, /* GM4000 */
+      0x04a91873, /* XK80 */
+      0x04a9188b, /* TS5300 */
+      0x04a9188c, /* TS5380 */
+      0x04a9188d, /* TS6300 */
+      0x04a9188e, /* TS6380 */
+      0x04a9188f, /* TS7330 */
+      0x04a91890, /* TS8300 */
+      0x04a91891, /* TS8380 */
+      0x04a91892, /* TS8330 */
+      0x04a91893, /* XK60 */
+      0x04a91894, /* TS6330 */
+      0x04a918a2, /* TS3300 */
+      0x04a918a3, /* E3300 */
+      0x04a9261f, /* MP10 */
+      0x04a9262f, /* MP730 */
+      0x04a92630, /* MP700 */
+      0x04a92635, /* MP5 */
+      0x04a9263c, /* MP360 */
+      0x04a9263d, /* MP370 */
+      0x04a9263e, /* MP390 */
+      0x04a9263f, /* MP375R */
+      0x04a9264c, /* MP740 */
+      0x04a9264d, /* MP710 */
+      0x04a9265d, /* MF5730 */
+      0x04a9265e, /* MF5750 */
+      0x04a9265f, /* MF5770 */
+      0x04a92660, /* MF3110 */
+      0x04a926e6, /* IR1020 */
+      0x04a91706, /* MP750 */
+      0x04a91708, /* MP760 */
+      0x04a91707, /* MP780 */
+      0x04a9170d, /* MP800 */
+      0x04a9170e, /* MP800R */
+      0x04a91713, /* MP830 */
+      0x04a9171a, /* MP810 */
+      0x04a9171b, /* MP960 */
+      0x04a91726, /* MP970 */
+      0x04a91901, /* CS8800F */
+      0x04a9172d, /* MP980 */
+      0x04a91740, /* MP990 */
+      0x04a91908, /* CS9000F */
+      0x04a9174b, /* MG8100 */
+      0x04a91756, /* MG8200 */
+      0x04a9190d, /* CS9000F_MII */
+    };
+
     /* Taken from uld/noarch/oem.conf in the Samsung SANE driver */
     private const uint32 samsung_devices[] = { 0x04e83425, 0x04e8341c, 0x04e8342a, 0x04e8343d, 0x04e83456, 
0x04e8345a, 0x04e83427, 0x04e8343a, 0x04e83428, 0x04e8343b, 0x04e83455, 0x04e83421, 0x04e83439, 0x04e83444, 
0x04e8343f, 0x04e8344e, 0x04e83431, 0x04e8345c, 0x04e8344d, 0x04e83462, 0x04e83464, 0x04e83461, 0x04e83460, 
0x04e8340e, 0x04e83435,
                                                0x04e8340f, 0x04e83441, 0x04e8344f, 0x04e83413, 0x04e8341b, 
0x04e8342e, 0x04e83426, 0x04e8342b, 0x04e83433, 0x04e83440, 0x04e83434, 0x04e8345b, 0x04e83457, 0x04e8341f, 
0x04e83453, 0x04e8344b, 0x04e83409, 0x04e83412, 0x04e83419, 0x04e8342c, 0x04e8343c, 0x04e83432, 0x04e8342d, 
0x04e83430, 0x04e8342f,
@@ -1340,6 +1551,7 @@ public class SimpleScan : Gtk.Application
         add_devices (driver_map, brscan2_devices, "brscan2");
         add_devices (driver_map, brscan3_devices, "brscan3");
         add_devices (driver_map, brscan4_devices, "brscan4");
+        add_devices (driver_map, pixma_devices, "pixma");
         add_devices (driver_map, samsung_devices, "samsung");
         add_devices (driver_map, smfp_devices, "smfp");
         add_devices (driver_map, hpaio_devices, "hpaio");


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