Blame SOURCES/cheese-3.28.0-fix-accelerators.patch

735313
From 446da7884914d471ce50f8b327edddbaf0d75ccb Mon Sep 17 00:00:00 2001
735313
From: esoleyman <emil@soleyman.com>
735313
Date: Fri, 24 May 2019 15:25:02 -0500
735313
Subject: [PATCH] Fix the accelerators
735313
735313
The thumbnail view did not allow users to execute commands such as open,
735313
save as, trash, or delete for one or more photo / video thumbnails using
735313
keyboard shortcuts such as ctrl+o, ctrl+s, etc...
735313
735313
https://gitlab.gnome.org/GNOME/cheese/issues/9
735313
---
735313
 src/cheese-application.vala | 2 +-
735313
 src/cheese-window.vala      | 7 +++++++
735313
 2 files changed, 8 insertions(+), 1 deletion(-)
735313
735313
diff --git a/src/cheese-application.vala b/src/cheese-application.vala
735313
index c4542be0..f46f3165 100644
735313
--- a/src/cheese-application.vala
735313
+++ b/src/cheese-application.vala
735313
@@ -116,7 +116,7 @@ public class Cheese.Application : Gtk.Application
735313
             Environment.set_application_name (_("Cheese"));
735313
             Window.set_default_icon_name ("org.gnome.Cheese");
735313
 
735313
-            this.add_accelerator ("space", "app.shoot", null);
735313
+            this.set_accels_for_action ("app.shoot", {"space"});
735313
 
735313
             // FIXME: Push these into the main window initialization.
735313
             main_window.setup_ui ();
735313
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
735313
index 09879fc5..25df09e7 100644
735313
--- a/src/cheese-window.vala
735313
+++ b/src/cheese-window.vala
735313
@@ -1312,6 +1312,13 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
735313
 
735313
         var menu = application.get_menu_by_id ("thumbview-menu");
735313
         thumbnail_popup = new Gtk.Menu.from_model (menu);
735313
+        
735313
+        application.set_accels_for_action ("app.quit", {"<Primary>q"});
735313
+        application.set_accels_for_action ("app.fullscreen", {"F11"});
735313
+        application.set_accels_for_action ("win.file-open", {"<Primary>o"});
735313
+        application.set_accels_for_action ("win.file-saveas", {"<Primary>s"});
735313
+        application.set_accels_for_action ("win.file-trash", {"Delete"});
735313
+        application.set_accels_for_action ("win.file-delete", {"<Shift>Delete"});
735313
 
735313
         this.add_action_entries (actions, this);
735313
 
735313
-- 
735313
GitLab
735313