[simple-scan] Fix escape key not stopping scan
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [simple-scan] Fix escape key not stopping scan
- Date: Mon, 22 Jul 2019 23:07:05 +0000 (UTC)
commit 5c4e33f759deb744e8c405a66152bf6ad99888c1
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Jul 23 10:58:28 2019 +1200
Fix escape key not stopping scan
Fixes #35
src/app-window.vala | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 6434ff4..53bb77e 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -22,6 +22,7 @@ public class AppWindow : Gtk.ApplicationWindow
{ "scan_single", scan_single_cb },
{ "scan_adf", scan_adf_cb },
{ "scan_batch", scan_batch_cb },
+ { "scan_stop", scan_stop_cb },
{ "reorder", reorder_document_cb },
{ "save", save_document_activate_cb },
{ "email", email_document_cb },
@@ -642,6 +643,11 @@ public class AppWindow : Gtk.ApplicationWindow
scan (options);
}
+ private void scan_stop_cb ()
+ {
+ stop_scan ();
+ }
+
private void set_scan_type (ScanType scan_type)
{
this.scan_type = scan_type;
@@ -1555,6 +1561,7 @@ public class AppWindow : Gtk.ApplicationWindow
app.set_accels_for_action ("app.scan_single", { "<Ctrl>1" });
app.set_accels_for_action ("app.scan_adf", { "<Ctrl>F" });
app.set_accels_for_action ("app.scan_batch", { "<Ctrl>M" });
+ app.set_accels_for_action ("app.scan_stop", { "Escape" });
app.set_accels_for_action ("app.save", { "<Ctrl>S" });
app.set_accels_for_action ("app.email", { "<Ctrl>E" });
app.set_accels_for_action ("app.print", { "<Ctrl>P" });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]