diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-14 01:59:28 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-14 01:59:28 +0000 |
commit | 26bffbce44cfb10286aa5bc353c4e02e95f6f839 (patch) | |
tree | c1945974bea592cc03a1dab2efbc52dfebd826d4 /gtk2_ardour/ardour_ui_dependents.cc | |
parent | 3e50efd13323a000af70bb2639927685fc4f1ba9 (diff) |
dynamic discovery & loading of keybindings
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3055 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui_dependents.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_dependents.cc | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 8b0f582ec9..7d623ac58e 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -23,8 +23,6 @@ #include <cstdio> -#include <gtkmm/accelmap.h> - #include <pbd/error.h> #include "ardour_ui.h" @@ -33,6 +31,7 @@ #include "keyboard.h" #include "splash.h" #include "route_params_ui.h" +#include "opts.h" #include "i18n.h" using namespace sigc; @@ -61,42 +60,12 @@ ARDOUR_UI::shutdown () void ARDOUR_UI::we_have_dependents () { - setup_keybindings (); - editor->UpdateAllTransportClocks.connect (mem_fun (*this, &ARDOUR_UI::update_transport_clocks)); -} - -static void -accel_map_changed (GtkAccelMap* map, - gchar* path, - guint key, - GdkModifierType mod, - gpointer arg) -{ - static_cast<ARDOUR_UI*>(arg)->save_keybindings (); -} - -void -ARDOUR_UI::setup_keybindings () -{ install_actions (); RedirectBox::register_actions (); - - cerr << "loading bindings from " << keybindings_path << endl; - - try { - AccelMap::load (keybindings_path); - } catch (...) { - error << string_compose (_("Ardour key bindings file not found at \"%1\" or contains errors."), keybindings_path) - << endmsg; - } - /* catch changes */ - - GtkAccelMap* accelmap = gtk_accel_map_get(); - g_signal_connect (accelmap, "changed", (GCallback) accel_map_changed, this); - - + Keyboard::setup_keybindings (); + editor->UpdateAllTransportClocks.connect (mem_fun (*this, &ARDOUR_UI::update_transport_clocks)); } void |