summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessio Treglia <quadrispro@ubuntu.com>2010-04-22 15:16:13 +0200
committerAlessio Treglia <quadrispro@ubuntu.com>2010-04-22 15:16:13 +0200
commit37dbb3bb4f1aca00f322ebd7b57041a322328e9d (patch)
tree5757fc4e42d2a7e11b97b2e43a3e8d2aa65523bb
parent7c11a305979da5578af3595f240e24c04414aa2e (diff)
Set duplex and batch-scan flags if supported by driver (LP: #566759).
-rw-r--r--debian/patches/10-set_supported_flags.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/10-set_supported_flags.patch b/debian/patches/10-set_supported_flags.patch
new file mode 100644
index 0000000..d086e78
--- /dev/null
+++ b/debian/patches/10-set_supported_flags.patch
@@ -0,0 +1,26 @@
+Origin:
+ http://bazaar.launchpad.net/~robert-ancell/simple-scan/trunk/revision/394
+Bug: https://bugs.launchpad.net/566759
+Applied-Upstream: commit: 394
+Description: Set "duplex" and "batch-scan" flags if supported by driver.
+---
+ src/scanner.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- simple-scan.orig/src/scanner.c
++++ simple-scan/src/scanner.c
+@@ -1054,6 +1054,14 @@ do_get_option (Scanner *scanner)
+ break;
+ }
+ }
++ else if (strcmp (option->name, "duplex") == 0) {
++ if (option->type == SANE_TYPE_BOOL)
++ set_bool_option (scanner->priv->handle, option, option_index, job->type == SCAN_ADF_BOTH, NULL);
++ }
++ else if (strcmp (option->name, "batch-scan") == 0) {
++ if (option->type == SANE_TYPE_BOOL)
++ set_bool_option (scanner->priv->handle, option, option_index, job->type != SCAN_SINGLE, NULL);
++ }
+ else if (strcmp (option->name, SANE_NAME_BIT_DEPTH) == 0) {
+ if (job->depth > 0)
+ set_int_option (scanner->priv->handle, option, option_index, job->depth, NULL);