#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace std;
using namespace Gtk;
using namespace PBD;
/* set up the per-user bindings path */
- strs.push_back (Glib::get_home_dir());
- strs.push_back (".ardour3");
- strs.push_back ("ardour.bindings");
-
- user_keybindings_path = Glib::build_filename (strs);
+ user_keybindings_path = Glib::build_filename (user_config_directory(), "ardour.bindings");
if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
std::pair<string,string> newpair;
if (!Glib::path_is_absolute (keybindings_path)) {
/* not absolute - look in the usual places */
- sys::path keybindings_file;
-
- SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
+ std::string keybindings_file;
- if ( ! find_file_in_search_path (spath, keybindings_path, keybindings_file)) {
+ if ( ! find_file_in_search_path (ardour_config_search_path(), keybindings_path, keybindings_file)) {
if (keybindings_path == default_bindings) {
error << string_compose (_("Default keybindings not found - %1 will be hard to use!"), PROGRAM_NAME) << endmsg;
/* use it */
- keybindings_path = keybindings_file.to_string();
+ keybindings_path = keybindings_file;
break;
}