summaryrefslogtreecommitdiff
path: root/src/scanner.c
diff options
context:
space:
mode:
authorAlessio Treglia <quadrispro@ubuntu.com>2010-04-16 10:03:40 +0200
committerAlessio Treglia <quadrispro@ubuntu.com>2010-04-16 10:03:40 +0200
commita10c17b3f17ebe3b96f92d57aa24f21c6cea01e8 (patch)
treeeb1bf3b2ce0c87e2c7adf9f486b37ba5e8d70325 /src/scanner.c
parentada687210b925332ef4ed553b5eaf1a150a7e0da (diff)
parent279b3fab7a8fcee6ed831447b37e1ac5d0397d44 (diff)
Merge commit 'upstream/1.0.2'
Diffstat (limited to 'src/scanner.c')
-rw-r--r--src/scanner.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/scanner.c b/src/scanner.c
index 9181868..b27ae2a 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -457,6 +457,10 @@ set_default_option (SANE_Handle handle, const SANE_Option_Descriptor *option, SA
{
SANE_Status status;
+ /* Check if supports automatic option */
+ if ((option->cap & SANE_CAP_AUTOMATIC) == 0)
+ return FALSE;
+
status = sane_control_option (handle, option_index, SANE_ACTION_SET_AUTO, NULL, NULL);
g_debug ("sane_control_option (%d, SANE_ACTION_SET_AUTO) -> %s",
option_index, get_status_string (status));
@@ -880,7 +884,7 @@ do_open (Scanner *scanner)
if (!job->device) {
g_warning ("No scan device available");
- fail_scan (scanner, status,
+ fail_scan (scanner, 0,
/* Error displayed when no scanners to scan with */
_("No scanners available. Please connect a scanner."));
return;
@@ -986,6 +990,8 @@ do_get_option (Scanner *scanner)
else if (strcmp (option->name, SANE_NAME_SCAN_SOURCE) == 0) {
const char *flatbed_sources[] =
{
+ "Auto",
+ SANE_I18N ("Auto"),
"Flatbed",
SANE_I18N ("Flatbed"),
"FlatBed",