diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-06 20:22:27 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-06 20:22:27 +0000 |
commit | 15d6871c02b5daa518910807263a1c18a46c7870 (patch) | |
tree | 76e7a49cdf8a0d8ec9fa11d902f05504acbf39c3 /gtk2_ardour | |
parent | 63b54649baf92cfcea7d124077464f1465613d4b (diff) |
logic rearrangement for visual state save
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3324 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 48 | ||||
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/mnemonic-us.bindings.in | 50 |
3 files changed, 53 insertions, 49 deletions
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 8f770c7cd5..d7611eb350 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -193,53 +193,53 @@ Editor::register_actions () ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-1", _("Save View 1"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 0)); + act = ActionManager::register_action (editor_actions, "save-visual-state-1", _("Save View 1"), bind (mem_fun (*this, &Editor::start_visual_state_op), 0)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-1", _("Goto View 1"), bind (mem_fun (*this, &Editor::start_visual_state_op), 0)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-1", _("Goto View 1"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 0)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-2", _("Save View 2"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 1)); + act = ActionManager::register_action (editor_actions, "save-visual-state-2", _("Save View 2"), bind (mem_fun (*this, &Editor::start_visual_state_op), 1)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-2", _("Goto View 2"), bind (mem_fun (*this, &Editor::start_visual_state_op), 1)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-2", _("Goto View 2"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 1)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-3", _("Save View 3"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 2)); + act = ActionManager::register_action (editor_actions, "save-visual-state-3", _("Save View 3"), bind (mem_fun (*this, &Editor::start_visual_state_op), 2)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-3", _("Goto View 3"), bind (mem_fun (*this, &Editor::start_visual_state_op), 2)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-3", _("Goto View 3"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 2)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-4", _("Save View 4"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 3)); + act = ActionManager::register_action (editor_actions, "save-visual-state-4", _("Save View 4"), bind (mem_fun (*this, &Editor::start_visual_state_op), 3)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-4", _("Goto View 4"), bind (mem_fun (*this, &Editor::start_visual_state_op), 3)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-4", _("Goto View 4"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 3)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-5", _("Save View 5"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 4)); + act = ActionManager::register_action (editor_actions, "save-visual-state-5", _("Save View 5"), bind (mem_fun (*this, &Editor::start_visual_state_op), 4)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-5", _("Goto View 5"), bind (mem_fun (*this, &Editor::start_visual_state_op), 4)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-5", _("Goto View 5"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 4)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-6", _("Save View 6"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 5)); + act = ActionManager::register_action (editor_actions, "save-visual-state-6", _("Save View 6"), bind (mem_fun (*this, &Editor::start_visual_state_op), 5)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-6", _("Goto View 6"), bind (mem_fun (*this, &Editor::start_visual_state_op), 5)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-6", _("Goto View 6"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 5)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-7", _("Save View 7"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 6)); + act = ActionManager::register_action (editor_actions, "save-visual-state-7", _("Save View 7"), bind (mem_fun (*this, &Editor::start_visual_state_op), 6)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-7", _("Goto View 7"), bind (mem_fun (*this, &Editor::start_visual_state_op), 6)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-7", _("Goto View 7"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 6)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-8", _("Save View 8"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 7)); + act = ActionManager::register_action (editor_actions, "save-visual-state-8", _("Save View 8"), bind (mem_fun (*this, &Editor::start_visual_state_op), 7)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-8", _("Goto View 8"), bind (mem_fun (*this, &Editor::start_visual_state_op), 7)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-8", _("Goto View 8"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 7)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-9", _("Save View 9"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 8)); + act = ActionManager::register_action (editor_actions, "save-visual-state-9", _("Save View 9"), bind (mem_fun (*this, &Editor::start_visual_state_op), 8)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-9", _("Goto View 9"), bind (mem_fun (*this, &Editor::start_visual_state_op), 8)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-9", _("Goto View 9"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 8)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-10", _("Save View 10"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 9)); + act = ActionManager::register_action (editor_actions, "save-visual-state-10", _("Save View 10"), bind (mem_fun (*this, &Editor::start_visual_state_op), 9)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-10", _("Goto View 10"), bind (mem_fun (*this, &Editor::start_visual_state_op), 9)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-10", _("Goto View 10"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 9)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-11", _("Save View 11"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 10)); + act = ActionManager::register_action (editor_actions, "save-visual-state-11", _("Save View 11"), bind (mem_fun (*this, &Editor::start_visual_state_op), 10)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-11", _("Goto View 11"), bind (mem_fun (*this, &Editor::start_visual_state_op), 10)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-11", _("Goto View 11"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 10)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-12", _("Save View 12"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 11)); + act = ActionManager::register_action (editor_actions, "save-visual-state-12", _("Save View 12"), bind (mem_fun (*this, &Editor::start_visual_state_op), 11)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-12", _("Goto View 12"), bind (mem_fun (*this, &Editor::start_visual_state_op), 11)); + act = ActionManager::register_action (editor_actions, "goto-visual-state-12", _("Goto View 12"), bind (mem_fun (*this, &Editor::cancel_visual_state_op), 11)); ActionManager::session_sensitive_actions.push_back (act); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 8aecfeb41b..6874059aef 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -5942,7 +5942,9 @@ Editor::goto_visual_state (uint32_t n) void Editor::start_visual_state_op (uint32_t n) { + cerr << "Start\n"; if (visual_state_op_connection.empty()) { + cerr << "\tqueue\n"; visual_state_op_connection = Glib::signal_timeout().connect (bind (mem_fun (*this, &Editor::end_visual_state_op), n), 1000); } } @@ -5950,7 +5952,9 @@ Editor::start_visual_state_op (uint32_t n) void Editor::cancel_visual_state_op (uint32_t n) { + cerr << "Cancel\n"; if (!visual_state_op_connection.empty()) { + cerr << "\tgoto\n"; visual_state_op_connection.disconnect(); goto_visual_state (n); } diff --git a/gtk2_ardour/mnemonic-us.bindings.in b/gtk2_ardour/mnemonic-us.bindings.in index 4fb546f0a3..ce704d1159 100644 --- a/gtk2_ardour/mnemonic-us.bindings.in +++ b/gtk2_ardour/mnemonic-us.bindings.in @@ -179,31 +179,31 @@ (gtk_accel_path "<Actions>/Editor/select-range-between-cursors" "F6") (gtk_accel_path "<Actions>/Common/ToggleMaximalEditor" "F11") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-1" "<%PRIMARY%>F1") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-2" "<%PRIMARY%>F2") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-3" "<%PRIMARY%>F3") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-4" "<%PRIMARY%>F4") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-5" "<%PRIMARY%>F5") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-6" "<%PRIMARY%>F6") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-7" "<%PRIMARY%>F7") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-8" "<%PRIMARY%>F8") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-9" "<%PRIMARY%>F9") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-10" "<%PRIMARY%>F10") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-11" "<%PRIMARY%>F11") -(gtk_accel_path "<Actions>/Editor/goto-visual-state-12" "<%PRIMARY%>F12") - -(gtk_accel_path "<Actions>/Editor/save-visual-state-1" "<release><%PRIMARY%>F1") -(gtk_accel_path "<Actions>/Editor/save-visual-state-2" "<release><%PRIMARY%>F2") -(gtk_accel_path "<Actions>/Editor/save-visual-state-3" "<release><%PRIMARY%>F3") -(gtk_accel_path "<Actions>/Editor/save-visual-state-4" "<release><%PRIMARY%>F4") -(gtk_accel_path "<Actions>/Editor/save-visual-state-5" "<release><%PRIMARY%>F5") -(gtk_accel_path "<Actions>/Editor/save-visual-state-6" "<release><%PRIMARY%>F6") -(gtk_accel_path "<Actions>/Editor/save-visual-state-7" "<release><%PRIMARY%>F7") -(gtk_accel_path "<Actions>/Editor/save-visual-state-8" "<release><%PRIMARY%>F8") -(gtk_accel_path "<Actions>/Editor/save-visual-state-9" "<release><%PRIMARY%>F9") -(gtk_accel_path "<Actions>/Editor/save-visual-state-10" "<release><%PRIMARY%>F10") -(gtk_accel_path "<Actions>/Editor/save-visual-state-11" "<release><%PRIMARY%>F11") -(gtk_accel_path "<Actions>/Editor/save-visual-state-12" "<release><%PRIMARY%>F12") +(gtk_accel_path "<Actions>/Editor/save-visual-state-1" "<%PRIMARY%>F1") +(gtk_accel_path "<Actions>/Editor/save-visual-state-2" "<%PRIMARY%>F2") +(gtk_accel_path "<Actions>/Editor/save-visual-state-3" "<%PRIMARY%>F3") +(gtk_accel_path "<Actions>/Editor/save-visual-state-4" "<%PRIMARY%>F4") +(gtk_accel_path "<Actions>/Editor/save-visual-state-5" "<%PRIMARY%>F5") +(gtk_accel_path "<Actions>/Editor/save-visual-state-6" "<%PRIMARY%>F6") +(gtk_accel_path "<Actions>/Editor/save-visual-state-7" "<%PRIMARY%>F7") +(gtk_accel_path "<Actions>/Editor/save-visual-state-8" "<%PRIMARY%>F8") +(gtk_accel_path "<Actions>/Editor/save-visual-state-9" "<%PRIMARY%>F9") +(gtk_accel_path "<Actions>/Editor/save-visual-state-10" "<%PRIMARY%>F10") +(gtk_accel_path "<Actions>/Editor/save-visual-state-11" "<%PRIMARY%>F11") +(gtk_accel_path "<Actions>/Editor/save-visual-state-12" "<%PRIMARY%>F12") + +(gtk_accel_path "<Actions>/Editor/goto-visual-state-1" "<release><%PRIMARY%>F1") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-2" "<release><%PRIMARY%>F2") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-3" "<release><%PRIMARY%>F3") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-4" "<release><%PRIMARY%>F4") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-5" "<release><%PRIMARY%>F5") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-6" "<release><%PRIMARY%>F6") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-7" "<release><%PRIMARY%>F7") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-8" "<release><%PRIMARY%>F8") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-9" "<release><%PRIMARY%>F9") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-10" "<release><%PRIMARY%>F10") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-11" "<release><%PRIMARY%>F11") +(gtk_accel_path "<Actions>/Editor/goto-visual-state-12" "<release><%PRIMARY%>F12") ;; numbers |