summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-10-16 21:58:29 +0000
committerCarl Hetherington <carl@carlh.net>2011-10-16 21:58:29 +0000
commit5f2690ac65487d3ac3c61ca1608889ad9c06b979 (patch)
tree893e608dda9bf4e4bf658a2bebf697627e5fef76 /gtk2_ardour
parentec05e8cd755ba51763ad621fc3f8f12f94ae1239 (diff)
Remove unused method transport_marker_context_menu(). Allow
loop / punch markers to be removed (#4379). git-svn-id: svn://localhost/ardour2/branches/3.0@10210 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.h3
-rw-r--r--gtk2_ardour/editor_markers.cc26
2 files changed, 13 insertions, 16 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index ffc9534809..d2c626cb78 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1482,9 +1482,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void new_transport_marker_menu_popdown ();
void marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
void tempo_or_meter_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
- void transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
- void build_range_marker_menu (bool);
+ void build_range_marker_menu (bool, bool);
void build_marker_menu (ARDOUR::Location *);
void build_tempo_or_meter_marker_menu (bool);
void build_new_transport_marker_menu ();
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index c1f06a18c1..58a65fad53 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -765,7 +765,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 (true);
+ build_range_marker_menu (loc == transport_loop_location() || loc == transport_punch_location(), loc->is_session_range());
}
marker_menu_item = item;
@@ -795,7 +795,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);
+ build_range_marker_menu (false, false);
}
marker_menu_item = item;
range_marker_menu->popup (1, ev->time);
@@ -814,16 +814,6 @@ Editor::new_transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Ite
}
void
-Editor::transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item*)
-{
- if (transport_marker_menu == 0) {
- build_range_marker_menu (true);
- }
-
- transport_marker_menu->popup (1, ev->time);
-}
-
-void
Editor::build_marker_menu (Location* loc)
{
using namespace Menu_Helpers;
@@ -863,10 +853,12 @@ Editor::build_marker_menu (Location* loc)
}
void
-Editor::build_range_marker_menu (bool loop_or_punch_or_session)
+Editor::build_range_marker_menu (bool loop_or_punch, bool session)
{
using namespace Menu_Helpers;
+ bool const loop_or_punch_or_session = loop_or_punch | session;
+
Menu *markerMenu = new Menu;
if (loop_or_punch_or_session) {
transport_marker_menu = markerMenu;
@@ -894,10 +886,16 @@ Editor::build_range_marker_menu (bool loop_or_punch_or_session)
if (!loop_or_punch_or_session) {
items.push_back (MenuElem (_("Hide Range"), sigc::mem_fun(*this, &Editor::marker_menu_hide)));
items.push_back (MenuElem (_("Rename Range"), sigc::mem_fun(*this, &Editor::marker_menu_rename)));
+ }
+
+ if (!session) {
items.push_back (MenuElem (_("Remove Range"), sigc::mem_fun(*this, &Editor::marker_menu_remove)));
- items.push_back (SeparatorElem());
}
+ if (loop_or_punch_or_session) {
+ items.push_back (SeparatorElem());
+ }
+
items.push_back (MenuElem (_("Separate Regions in Range"), sigc::mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
items.push_back (MenuElem (_("Select All in Range"), sigc::mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
if (!Profile->get_sae()) {