1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-18 12:16:40 +01:00

easy change key bindings

This commit is contained in:
Paul Licameli
2017-08-29 10:02:22 -04:00
parent 1f7b62f056
commit aa5c3f12a3
6 changed files with 41 additions and 9 deletions

View File

@@ -72,7 +72,7 @@ BEGIN_EVENT_TABLE(KeyConfigPrefs, PrefsPanel)
EVT_TIMER(FilterTimerID, KeyConfigPrefs::OnFilterTimer)
END_EVENT_TABLE()
KeyConfigPrefs::KeyConfigPrefs(wxWindow * parent)
KeyConfigPrefs::KeyConfigPrefs(wxWindow * parent, const wxString &name)
/* i18n-hint: as in computer keyboard (not musical!) */
: PrefsPanel(parent, _("Keyboard")),
mView(NULL),
@@ -82,6 +82,10 @@ KeyConfigPrefs::KeyConfigPrefs(wxWindow * parent)
mFilterPending(false)
{
Populate();
if (!name.empty()) {
auto index = mView->GetIndexByName(name);
mView->SelectNode(index);
}
}
KeyConfigPrefs::~KeyConfigPrefs()
@@ -746,5 +750,6 @@ wxString KeyConfigPrefs::HelpPageName()
PrefsPanel *KeyConfigPrefsFactory::Create(wxWindow *parent)
{
wxASSERT(parent); // to justify safenew
return safenew KeyConfigPrefs(parent);
auto result = safenew KeyConfigPrefs{ parent, mName };
return result;
}