diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-16 13:57:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-16 13:57:51 +0000 |
commit | cd44c8241c868b47c11ea8a669e5c37484fee25f (patch) | |
tree | 44fe6243c3e04fdfe983cb9a449bc4a09782888e /gtk2_ardour/keyboard.cc | |
parent | 5f61efff8f4d80c9576fb8524f37cb8905ba51a8 (diff) |
add GotoWallClock command; switch Editor class to use nframes64_t throughout; fix up some glitches in playhead/screen handling when locating ; never save keybindings to user's ~/.ardour2 dir unless the user changed them (well, nearly)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3361 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/keyboard.cc')
-rw-r--r-- | gtk2_ardour/keyboard.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc index 1ec1351266..c3d9122f17 100644 --- a/gtk2_ardour/keyboard.cc +++ b/gtk2_ardour/keyboard.cc @@ -76,6 +76,7 @@ bool Keyboard::_some_magic_widget_has_focus = false; std::string Keyboard::user_keybindings_path; bool Keyboard::can_save_keybindings = false; +bool Keyboard::bindings_changed_after_save_became_legal = false; map<string,string> Keyboard::binding_files; string Keyboard::_current_binding_name = _("Unknown"); map<AccelKey,pair<string,string>,Keyboard::AccelKeyLess> Keyboard::release_keys; @@ -421,6 +422,16 @@ accel_map_changed (GtkAccelMap* map, GdkModifierType mod, gpointer arg) { + Keyboard::keybindings_changed (); +} + +void +Keyboard::keybindings_changed () +{ + if (Keyboard::can_save_keybindings) { + Keyboard::bindings_changed_after_save_became_legal = true; + } + Keyboard::save_keybindings (); } @@ -433,7 +444,7 @@ Keyboard::set_can_save_keybindings (bool yn) void Keyboard::save_keybindings () { - if (can_save_keybindings) { + if (can_save_keybindings && bindings_changed_after_save_became_legal) { Gtk::AccelMap::save (user_keybindings_path); } } |