1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +02:00

Prevent pasting into Hotkey box in keybinding prefs

Reported by AKa on Quality list.
This commit is contained in:
Leland Lucius 2021-01-23 15:48:30 -06:00
parent 0df8fbcc74
commit 82014bacd9
2 changed files with 8 additions and 0 deletions

View File

@ -286,6 +286,8 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S)
&KeyConfigPrefs::OnHotkeyChar)
.ConnectRoot(wxEVT_KILL_FOCUS,
&KeyConfigPrefs::OnHotkeyKillFocus)
.ConnectRoot(wxEVT_CONTEXT_MENU,
&KeyConfigPrefs::OnHotkeyContext)
.AddWindow(mKey);
/* i18n-hint: (verb)*/
@ -657,6 +659,11 @@ void KeyConfigPrefs::OnHotkeyKillFocus(wxEvent & e)
e.Skip();
}
void KeyConfigPrefs::OnHotkeyContext(wxEvent & WXUNUSED(e))
{
// event.Skip() not performed, so event will not be processed further.
}
void KeyConfigPrefs::OnFilterTimer(wxTimerEvent & WXUNUSED(e))
{
// The filter timer has expired, so set the filter

View File

@ -72,6 +72,7 @@ private:
void OnHotkeyKeyDown(wxKeyEvent & e);
void OnHotkeyChar(wxEvent & e);
void OnHotkeyKillFocus(wxEvent & e);
void OnHotkeyContext(wxEvent & e);
void OnFilterTimer(wxTimerEvent & e);
void OnFilterKeyDown(wxKeyEvent & e);