diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-30 15:29:53 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-30 15:29:53 +0000 |
commit | 96ae97ddcb743cde5876b38446d2d0dbf9fb2f73 (patch) | |
tree | 4e8b5ed59a8395ca1ef72421bf97e605a5bd06d1 /gtk2_ardour/editor_actions.cc | |
parent | 51138ef75b4c59ea5a0c35c23906a093c1e34b2c (diff) |
preparations for using ardour's own keybinding system for the editor (not actually used)
git-svn-id: svn://localhost/ardour2/branches/3.0@10841 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_actions.cc')
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 0d5534a055..a149dba796 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -20,9 +20,15 @@ #include <gio/gio.h> #include <gtk/gtkiconfactory.h> + +#include "pbd/filesystem.h" +#include "pbd/file_utils.h" +#include "pbd/search_path.h" + #include "gtkmm2ext/tearoff.h" #include "ardour/ardour.h" +#include "ardour/filesystem_paths.h" #include "ardour/profile.h" #include "ardour/session.h" @@ -617,6 +623,24 @@ Editor::register_actions () } void +Editor::load_bindings () +{ + /* XXX move this to a better place */ + + key_bindings.set_action_map (editor_action_map); + + sys::path binding_file; + SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path(); + + if (find_file_in_search_path (spath, "editor.bindings", binding_file)) { + key_bindings.load (binding_file.to_string()); + info << string_compose (_("Loaded editor bindings from %1"), binding_file.to_string()) << endmsg; + } else { + error << string_compose (_("Could not find editor.bindings in search path %1"), spath.to_string()) << endmsg; + } +} + +void Editor::toggle_ruler_visibility (RulerType rt) { const char* action = 0; |