[simple-scan] Display values which are set in set_option_to_max() method.
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [simple-scan] Display values which are set in set_option_to_max() method.
- Date: Thu, 5 Dec 2019 22:03:47 +0000 (UTC)
commit 0e09d9594607e83e89d22c42fe9f523d502e43f0
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date: Wed Dec 4 23:50:44 2019 +0100
Display values which are set in set_option_to_max() method.
This will help resolve issue #90 and #107,
when Paper Size is set to automatic.
src/scanner.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/scanner.vala b/src/scanner.vala
index 4ab76ce..cebc85e 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -530,7 +530,11 @@ public class Scanner : Object
return;
var status = Sane.control_option (handle, option_index, Sane.Action.SET_VALUE, &option.range.max,
null);
- debug ("sane_control_option (%d, SANE_ACTION_SET_VALUE, option.range.max) -> (%s)", (int)
option_index, Sane.status_to_string (status));
+
+ if (option.type == Sane.ValueType.FIXED)
+ debug ("sane_control_option (%d, SANE_ACTION_SET_VALUE, option.range.max=%f) -> (%s)", (int)
option_index, Sane.UNFIX (option.range.max), Sane.status_to_string (status));
+ else
+ debug ("sane_control_option (%d, SANE_ACTION_SET_VALUE, option.range.max=%d) -> (%s)", (int)
option_index, (int) option.range.max, Sane.status_to_string (status));
}
private bool set_string_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index,
string value, out string result)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]