diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index 59b01de1e5..3b0575392e 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -50,6 +50,16 @@ using namespace PBD; using Gtkmm2ext::Keyboard; +#if defined(PLATFORM_WINDOWS) +const char* KeyEditor::blacklist_filename = "keybindings.win.blacklist"; +#elif defined(__APPLE__) +const char* KeyEditor::blacklist_filename = "keybindings.mac.blacklist"; +#else +const char* KeyEditor::blacklist_filename = "keybindings.blacklist"; +#endif + +const char* KeyEditor::whitelist_filename = "keybindings.whitelist"; + KeyEditor::KeyEditor () : WavesDialog ("waves_keyeditor.xml", true, false) , view (get_tree_view ("view")) @@ -85,7 +95,7 @@ KeyEditor::load_blackwhitelists () { string list; - if (find_file (ARDOUR::ardour_data_search_path(), X_("keybindings.blacklist"), list)) { + if (find_file (ARDOUR::ardour_data_search_path(), X_(blacklist_filename), list)) { ifstream in (list.c_str()); while (in) { @@ -95,7 +105,7 @@ KeyEditor::load_blackwhitelists () } } - if (find_file (ARDOUR::ardour_data_search_path(), X_("keybindings.whitelist"), list)) { + if (find_file (ARDOUR::ardour_data_search_path(), X_(whitelist_filename), list)) { ifstream in (list.c_str()); while (in) { diff --git a/gtk2_ardour/keyeditor.h b/gtk2_ardour/keyeditor.h index 6a76665b4f..fa434b27ae 100644 --- a/gtk2_ardour/keyeditor.h +++ b/gtk2_ardour/keyeditor.h @@ -59,6 +59,9 @@ class KeyEditor : public WavesDialog WavesButton& unbind_button; WavesButton& reset_button; + static const char* blacklist_filename; + static const char* whitelist_filename; + void unbind (WavesButton*); bool can_bind;