From e36dc1c9d7623d60cb264bbb3602765c7c320d41 Mon Sep 17 00:00:00 2001 From: Reactor Scram Date: Wed, 24 Jul 2024 12:50:10 -0500 Subject: [PATCH] ux(gui-client): remove keyboard accelerators (#6017) Closes #5953 In all my testing on Windows I've never seen these work. I tried them a couple days ago on Linux and I haven't seen them work there either. No clue why. Tauri bug? Windows bug? --- .../src-tauri/src/client/gui/system_tray.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/rust/gui-client/src-tauri/src/client/gui/system_tray.rs b/rust/gui-client/src-tauri/src/client/gui/system_tray.rs index e55a117d6..c154fcab8 100644 --- a/rust/gui-client/src-tauri/src/client/gui/system_tray.rs +++ b/rust/gui-client/src-tauri/src/client/gui/system_tray.rs @@ -210,7 +210,6 @@ fn signing_in(waiting_message: &str) -> SystemTrayMenu { } trait FirezoneMenu { - fn accelerated(self, id: Event, title: &str, accelerator: &str) -> Self; fn add_bottom_section(self, quit_text: &str) -> Self; fn copyable(self, s: &str) -> Self; fn disabled>(self, title: S) -> Self; @@ -219,13 +218,6 @@ trait FirezoneMenu { } impl FirezoneMenu for SystemTrayMenu { - /// An item with an event and a keyboard accelerator - /// - /// Doesn't work on Windows: - fn accelerated(self, id: Event, title: &str, accelerator: &str) -> Self { - self.add_item(item(id, title).accelerator(accelerator)) - } - /// Things that always show, like About, Settings, Help, Quit, etc. fn add_bottom_section(self, quit_text: &str) -> Self { self.separator() @@ -243,13 +235,9 @@ impl FirezoneMenu for SystemTrayMenu { "Support...", ), )) - .accelerated( - Event::ShowWindow(Window::Settings), - "Settings", - "Ctrl+Shift+,", - ) + .item(Event::ShowWindow(Window::Settings), "Settings") .separator() - .accelerated(Event::Quit, quit_text, "Ctrl+Q") + .item(Event::Quit, quit_text) } fn copyable(self, s: &str) -> Self {