summaryrefslogtreecommitdiff
path: root/src/scanner.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-03 12:10:06 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-03 12:10:06 +0100
commit02cc3d8088c307a26f9b52e294fb932d1e40ee4d (patch)
treec7e987a1421f4c7db08c1aa4bf17107185dca4d0 /src/scanner.vala
parentf64f5d0c9e37828bc1a42f8e69bbc4d3d8c549f5 (diff)
Imported Upstream version 3.19.1upstream/3.19.1
Diffstat (limited to 'src/scanner.vala')
-rw-r--r--src/scanner.vala51
1 files changed, 26 insertions, 25 deletions
diff --git a/src/scanner.vala b/src/scanner.vala
index bc2be6d..16f33cf 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -672,63 +672,64 @@ public class Scanner
var cap = option.cap;
if (cap != 0)
{
- s += " cap=";
+ var caps = "";
if ((cap & Sane.Capability.SOFT_SELECT) != 0)
{
- if (s != "")
- s += ",";
- s += "soft-select";
+ if (caps != "")
+ caps += ",";
+ caps += "soft-select";
cap &= ~Sane.Capability.SOFT_SELECT;
}
if ((cap & Sane.Capability.HARD_SELECT) != 0)
{
- if (s != "")
- s += ",";
- s += "hard-select";
+ if (caps != "")
+ caps += ",";
+ caps += "hard-select";
cap &= ~Sane.Capability.HARD_SELECT;
}
if ((cap & Sane.Capability.SOFT_DETECT) != 0)
{
- if (s != "")
- s += ",";
- s += "soft-detect";
+ if (caps != "")
+ caps += ",";
+ caps += "soft-detect";
cap &= ~Sane.Capability.SOFT_DETECT;
}
if ((cap & Sane.Capability.EMULATED) != 0)
{
- if (s != "")
- s += ",";
- s += "emulated";
+ if (caps != "")
+ caps += ",";
+ caps += "emulated";
cap &= ~Sane.Capability.EMULATED;
}
if ((cap & Sane.Capability.AUTOMATIC) != 0)
{
- if (s != "")
- s += ",";
- s += "automatic";
+ if (caps != "")
+ caps += ",";
+ caps += "automatic";
cap &= ~Sane.Capability.AUTOMATIC;
}
if ((cap & Sane.Capability.INACTIVE) != 0)
{
- if (s != "")
- s += ",";
- s += "inactive";
+ if (caps != "")
+ caps += ",";
+ caps += "inactive";
cap &= ~Sane.Capability.INACTIVE;
}
if ((cap & Sane.Capability.ADVANCED) != 0)
{
- if (s != "")
- s += ",";
- s += "advanced";
+ if (caps != "")
+ caps += ",";
+ caps += "advanced";
cap &= ~Sane.Capability.ADVANCED;
}
/* Unknown capabilities */
if (cap != 0)
{
- if (s != "")
- s += ",";
- s += "%x".printf ((int) cap);
+ if (caps != "")
+ caps += ",";
+ caps += "%x".printf ((int) cap);
}
+ s += " cap=" + caps;
}
debug ("%s", s);