From 9063f4d2ba8b84ee3c3839a6f7565c8d621fee14 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Wed, 31 Jul 2024 01:32:51 +0200 Subject: [PATCH] help-overlay: Update keyboard shortcuts Using actions no longer works since they are not global anymore. Also add "Open with" to the list. Closes #254 --- data/resources/gtk/help-overlay.ui | 63 ++++++++++++++++++------------ src/window/actions.rs | 1 + 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/data/resources/gtk/help-overlay.ui b/data/resources/gtk/help-overlay.ui index 5f79ad9..42951d2 100644 --- a/data/resources/gtk/help-overlay.ui +++ b/data/resources/gtk/help-overlay.ui @@ -11,13 +11,7 @@ General Shortcuts - Show Main Menu - F10 - - - - - Copy Image or Metadata to Clipboard + Copy Image or Selected Text to Clipboard <Ctrl>C @@ -35,26 +29,14 @@ - Toggle Image Properties - win.toggle-properties + Open Image with Other App + <Ctrl><Shift>O Set as Background - win.set-background - - - - - Toggle Fullscreen - win.toggle-fullscreen - - - - - Leave Fullscreen - win.leave-fullscreen + <Ctrl>F8 @@ -123,13 +105,13 @@ First Image - win.first + Home Last Image - win.last + End @@ -140,13 +122,13 @@ Rotate Clockwise - win.rotate-cw + <Ctrl>R Rotate Counterclockwise - win.rotate-ccw + <Ctrl><Shift>R @@ -215,6 +197,35 @@ + + + View + + + Toggle Fullscreen + F11 + + + + + Leave Fullscreen + Escape + + + + + Toggle Image Properties + F9 <Alt>Return + + + + + Show Main Menu + F10 + + + + Gestures diff --git a/src/window/actions.rs b/src/window/actions.rs index a9667ea..65895cd 100644 --- a/src/window/actions.rs +++ b/src/window/actions.rs @@ -397,6 +397,7 @@ impl Action { Action::CopyImage => klass.install_action(&action, None, move |win, _, _| { win.copy_image(); }), + Action::SetBackground => { klass.install_action_async(&action, None, |win, _, _| async move { win.set_background().await;