summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_markers.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-09-18 18:04:25 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-09-28 17:42:11 -0400
commitebb43508f1ab75b7d7467e0e95cdd1c816cf3183 (patch)
tree7c94c5715fa54a70cc769292d8a27fac140e7323 /gtk2_ardour/editor_markers.cc
parent25011161e0a0ad77b77db787af35e24bdf10a040 (diff)
add new action and loop marker menu item for setting up loop record
Diffstat (limited to 'gtk2_ardour/editor_markers.cc')
-rw-r--r--gtk2_ardour/editor_markers.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index a8663edf6f..8eac1ddcc3 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -834,7 +834,7 @@ Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
if (loc == transport_loop_location() || loc == transport_punch_location() || loc->is_session_range ()) {
if (transport_marker_menu == 0) {
- build_range_marker_menu (loc == transport_loop_location() || loc == transport_punch_location(), loc->is_session_range());
+ build_range_marker_menu (loc == transport_loop_location(), loc == transport_punch_location(), loc->is_session_range());
}
marker_menu_item = item;
@@ -864,7 +864,7 @@ Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
} else if (loc->is_range_marker()) {
if (range_marker_menu == 0) {
- build_range_marker_menu (false, false);
+ build_range_marker_menu (false, false, false);
}
marker_menu_item = item;
range_marker_menu->popup (1, ev->time);
@@ -922,11 +922,11 @@ Editor::build_marker_menu (Location* loc)
}
void
-Editor::build_range_marker_menu (bool loop_or_punch, bool session)
+Editor::build_range_marker_menu (bool loop, bool punch, bool session)
{
using namespace Menu_Helpers;
- bool const loop_or_punch_or_session = loop_or_punch | session;
+ bool const loop_or_punch_or_session = loop | punch | session;
Menu *markerMenu = new Menu;
if (loop_or_punch_or_session) {
@@ -940,7 +940,12 @@ Editor::build_range_marker_menu (bool loop_or_punch, bool session)
items.push_back (MenuElem (_("Play Range"), sigc::mem_fun(*this, &Editor::marker_menu_play_range)));
items.push_back (MenuElem (_("Locate to Marker"), sigc::mem_fun(*this, &Editor::marker_menu_set_playhead)));
items.push_back (MenuElem (_("Play from Marker"), sigc::mem_fun(*this, &Editor::marker_menu_play_from)));
- items.push_back (MenuElem (_("Loop Range"), sigc::mem_fun(*this, &Editor::marker_menu_loop_range)));
+
+ if (!loop) {
+ items.push_back (MenuElem (_("Loop Range"), sigc::mem_fun(*this, &Editor::marker_menu_loop_range)));
+ } else {
+ items.push_back (MenuElem (_("Setup Loop Record"), sigc::mem_fun(*this, &Editor::setup_loop_record)));
+ }
items.push_back (MenuElem (_("Set Marker from Playhead"), sigc::mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
if (!Profile->get_sae()) {