From dd11f86000751e785a29034b332dabcb1559049e Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 4 Jul 2021 23:21:53 +0100 Subject: [PATCH] Don't show Ctrl-W for Close on MSW. Fixes https://gitlab.com/kicad/code/kicad/issues/8391 --- common/hotkey_store.cpp | 2 ++ common/tool/action_menu.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/common/hotkey_store.cpp b/common/hotkey_store.cpp index 3d63cf2f1e..9427776e91 100644 --- a/common/hotkey_store.cpp +++ b/common/hotkey_store.cpp @@ -60,7 +60,9 @@ static PSEUDO_ACTION* g_gesturePseudoActions[] = { }; static PSEUDO_ACTION* g_standardPlatformCommands[] = { +#ifndef __WINDOWS__ new PSEUDO_ACTION( _( "Close" ), MD_CTRL + 'W' ), +#endif new PSEUDO_ACTION( _( "Quit" ), MD_CTRL + 'Q' ) }; diff --git a/common/tool/action_menu.cpp b/common/tool/action_menu.cpp index 84962a2ae7..de083ab835 100644 --- a/common/tool/action_menu.cpp +++ b/common/tool/action_menu.cpp @@ -208,10 +208,17 @@ wxMenuItem* ACTION_MENU::Add( ACTION_MENU* aMenu ) void ACTION_MENU::AddClose( wxString aAppname ) { +#ifdef __WINDOWS_ + Add( _( "Close" ), + wxString::Format( _( "Close %s" ), aAppname ), + wxID_CLOSE, + BITMAPS::exit ); +#else Add( _( "Close" ) + "\tCtrl+W", wxString::Format( _( "Close %s" ), aAppname ), wxID_CLOSE, BITMAPS::exit ); +#endif }