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:16 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-03 12:10:16 +0100
commit80718a1e12c6eb5429ae84c1d7e78f9bb4a19b14 (patch)
treec1020bc5de633078799942fdee4d8edda245d158 /src/scanner.vala
parent3b7526f55295d8cf84a954145ee60d98c62c5111 (diff)
parent02cc3d8088c307a26f9b52e294fb932d1e40ee4d (diff)
Merge tag 'upstream/3.19.1'
Upstream version 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);