diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-06 05:38:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-06 05:38:24 +0000 |
commit | 4728e1ec1f8e118c0e28a2a353e308170d1b6448 (patch) | |
tree | 75f7e23d3491ab39470927f42f7c3f158534b2bf /gtk2_ardour/editor_ops.cc | |
parent | 734eb6e6eceb7b162e6d420fd4c8ddfe568a9238 (diff) |
now with extra-yummy key-release binding semantics, specially for visual state stuff, but potentially useful for momentary actions etc. Remove ~/.ardour2/ardour.bindings to see the effect for visual-state
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3318 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 407947d90b..76ad82cd9f 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -5926,7 +5926,7 @@ Editor::save_visual_state (uint32_t n) void Editor::goto_visual_state (uint32_t n) { - if (visual_states.size() < n) { + if (visual_states.size() <= n) { return; } @@ -5941,25 +5941,31 @@ void Editor::start_visual_state_op (uint32_t n) { if (visual_state_op_connection.empty()) { - visual_state_op_connection = Glib::signal_timeout().connect (bind (mem_fun (*this, &Editor::end_visual_state_op), n), 2000); - } else { - cancel_visual_state_op (n); + cerr << "START pending op, for " << n << endl; + visual_state_op_connection = Glib::signal_timeout().connect (bind (mem_fun (*this, &Editor::end_visual_state_op), n), 1000); } } void Editor::cancel_visual_state_op (uint32_t n) { - - visual_state_op_connection.disconnect(); - goto_visual_state (n); + if (!visual_state_op_connection.empty()) { + cerr << "CANCEL pending op, and goto " << n << endl; + visual_state_op_connection.disconnect(); + goto_visual_state (n); + } else { + cerr << "NOTHING TO DO\n"; + } } bool Editor::end_visual_state_op (uint32_t n) { + cerr << "TIMEOUT HIT, saveing visual state " << n << endl; visual_state_op_connection.disconnect(); save_visual_state (n); + cerr << "vsop empty ? " << visual_state_op_connection.empty() << endl; + // FLASH SCREEN OR SOMETHING return false; // do not call again } |