projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
distinguish global peak-reset button from meters:
[ardour.git]
/
gtk2_ardour
/
keyboard.cc
diff --git
a/gtk2_ardour/keyboard.cc
b/gtk2_ardour/keyboard.cc
index 41e6a088145676a0d906dc8deca313e47b090320..ca65a2b3f2ee5f10a2b45770609327a54fd4e0c9 100644
(file)
--- a/
gtk2_ardour/keyboard.cc
+++ b/
gtk2_ardour/keyboard.cc
@@
-17,12
+17,14
@@
*/
*/
+#include "pbd/convert.h"
#include "pbd/error.h"
#include "pbd/file_utils.h"
#include "ardour/filesystem_paths.h"
#include "ardour_ui.h"
#include "pbd/error.h"
#include "pbd/file_utils.h"
#include "ardour/filesystem_paths.h"
#include "ardour_ui.h"
+#include "public_editor.h"
#include "keyboard.h"
#include "opts.h"
#include "keyboard.h"
#include "opts.h"
@@
-59,10
+61,9
@@
ArdourKeyboard::setup_keybindings ()
/* set up the per-user bindings path */
/* set up the per-user bindings path */
- sys::path p (user_config_directory ());
- p /= "ardour.bindings";
+ string lowercase_program_name = downcase (PROGRAM_NAME);
- user_keybindings_path =
p.to_string (
);
+ user_keybindings_path =
Glib::build_filename (user_config_directory(), lowercase_program_name + ".bindings"
);
if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
std::pair<string,string> newpair;
if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
std::pair<string,string> newpair;
@@
-124,11
+125,9
@@
ArdourKeyboard::setup_keybindings ()
if (!Glib::path_is_absolute (keybindings_path)) {
/* not absolute - look in the usual places */
if (!Glib::path_is_absolute (keybindings_path)) {
/* not absolute - look in the usual places */
- s
ys::path
keybindings_file;
+ s
td::string
keybindings_file;
- SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
-
- if ( ! find_file_in_search_path (spath, keybindings_path, keybindings_file)) {
+ if ( ! find_file (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;
if (keybindings_path == default_bindings) {
error << string_compose (_("Default keybindings not found - %1 will be hard to use!"), PROGRAM_NAME) << endmsg;
@@
-144,7
+143,7
@@
ArdourKeyboard::setup_keybindings ()
/* use it */
/* use it */
- keybindings_path = keybindings_file
.to_string()
;
+ keybindings_path = keybindings_file;
break;
}
break;
}
@@
-158,9
+157,6
@@
ArdourKeyboard::setup_keybindings ()
error << string_compose (_("Default keybindings not found - %1 will be hard to use!"), PROGRAM_NAME) << endmsg;
return;
} else {
error << string_compose (_("Default keybindings not found - %1 will be hard to use!"), PROGRAM_NAME) << endmsg;
return;
} else {
- warning << string_compose (_("Key bindings file \"%1\" not found. Default bindings used instead"),
- keybindings_path)
- << endmsg;
keybindings_path = default_bindings;
}
keybindings_path = default_bindings;
}