summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_actions.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-03-31 13:11:55 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-03-31 13:11:55 +0000
commit4c7b6e1b1bf9e33cf5df5e0a270ad763bb32aea3 (patch)
treee6bac9f8f4bab6866b49a83cb5438041c1c7f2a6 /gtk2_ardour/editor_actions.cc
parent0d266d57eb16eff46dfa6bd22d2e75b86fb42fda (diff)
minor mootcher fixes; change "Analyze .." to "Spectral Analysis" where applicable; make separate actions be appropriately sensitive to the edit point
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3198 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_actions.cc')
-rw-r--r--gtk2_ardour/editor_actions.cc21
1 files changed, 17 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index 3d50486b5a..520f5205c6 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -440,16 +440,16 @@ Editor::register_actions ()
act = ActionManager::register_action (editor_actions, "editor-separate", _("Separate"), mem_fun(*this, &Editor::separate_region_from_selection));
ActionManager::session_sensitive_actions.push_back (act);
- ActionManager::region_selection_sensitive_actions.push_back (act);
+ ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "separate-from-punch", _("Separate Using Punch Range"), mem_fun(*this, &Editor::separate_region_from_punch));
ActionManager::session_sensitive_actions.push_back (act);
- ActionManager::region_selection_sensitive_actions.push_back (act);
+ ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "separate-from-loop", _("Separate Using Loop Range"), mem_fun(*this, &Editor::separate_region_from_loop));
ActionManager::session_sensitive_actions.push_back (act);
- ActionManager::region_selection_sensitive_actions.push_back (act);
+ ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "editor-crop", _("Crop"), mem_fun(*this, &Editor::crop_region_to_selection));
ActionManager::session_sensitive_actions.push_back (act);
- ActionManager::region_selection_sensitive_actions.push_back (act);
+ ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "editor-cut", _("Cut"), mem_fun(*this, &Editor::cut));
ActionManager::session_sensitive_actions.push_back (act);
/* Note: for now, editor-delete does the exact same thing as editor-cut */
@@ -1656,3 +1656,16 @@ Editor::reset_focus ()
{
track_canvas->grab_focus();
}
+
+void
+Editor::reset_canvas_action_sensitivity (bool onoff)
+{
+ if (_edit_point != EditAtMouse) {
+ onoff = true;
+ }
+
+ for (vector<Glib::RefPtr<Action> >::iterator x = ActionManager::mouse_edit_point_requires_canvas_actions.begin();
+ x != ActionManager::mouse_edit_point_requires_canvas_actions.end(); ++x) {
+ (*x)->set_sensitive (onoff);
+ }
+}