diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-02-15 19:50:51 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-02-15 20:07:49 +0100 |
commit | d463720b6d36789de48d8e3cf0f91771fcc586ea (patch) | |
tree | 47d2b3d31453c24cdedce226211a5855b1c69a0a | |
parent | 3d3f2a79f619ef9725f113a48c1de4fcf9d33ac7 (diff) |
simplify arguments to Editor::sensitize_the_right_region_actions()
-rw-r--r-- | gtk2_ardour/editor.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/editor_selection.cc | 8 |
4 files changed, 9 insertions, 11 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index b13e2517c3..8e186e3c04 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1698,7 +1698,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, /* When the region menu is opened, we setup the actions so that they look right in the menu. */ - sensitize_the_right_region_actions (true, false); + sensitize_the_right_region_actions (false); _last_region_menu_was_main = false; menu->signal_hide().connect (sigc::bind (sigc::mem_fun (*this, &Editor::sensitize_all_region_actions), true)); diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index fbf050bd87..0efacd98eb 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1845,7 +1845,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void region_selection_changed (); sigc::connection editor_regions_selection_changed_connection; void sensitize_all_region_actions (bool); - void sensitize_the_right_region_actions (bool from_context_menu, bool from_outside_canvas); + void sensitize_the_right_region_actions (bool because_canvas_crossing); bool _all_region_actions_sensitized; /** Flag to block region action handlers from doing what they normally do; * I tried Gtk::Action::block_activate() but this doesn't work (ie it doesn't diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 0799645ed9..ff7a667554 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -821,9 +821,9 @@ Editor::left_track_canvas (GdkEventCrossing* ev) if (ev->detail == GDK_NOTIFY_NONLINEAR || ev->detail == GDK_NOTIFY_NONLINEAR_VIRTUAL) { /* context menu or something similar */ - sensitize_the_right_region_actions (true, false); + sensitize_the_right_region_actions (false); } else { - sensitize_the_right_region_actions (false, true); + sensitize_the_right_region_actions (true); } } @@ -841,9 +841,9 @@ Editor::entered_track_canvas (GdkEventCrossing* ev) if (ev->detail == GDK_NOTIFY_NONLINEAR || ev->detail == GDK_NOTIFY_NONLINEAR_VIRTUAL) { /* context menu or something similar */ - sensitize_the_right_region_actions (true, false); + sensitize_the_right_region_actions (false); } else { - sensitize_the_right_region_actions (false, true); + sensitize_the_right_region_actions (true); } } diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index a6a035798e..c4657ed917 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1093,7 +1093,7 @@ Editor::sensitize_all_region_actions (bool s) * Editor::{entered,left}_track_canvas() for details there. */ void -Editor::sensitize_the_right_region_actions (bool from_context_menu, bool from_canvas_crossing) +Editor::sensitize_the_right_region_actions (bool because_canvas_crossing) { bool have_selection = false; bool have_entered = false; @@ -1116,7 +1116,7 @@ Editor::sensitize_the_right_region_actions (bool from_context_menu, bool from_ca * here depends on the context in which we are called */ - if (from_canvas_crossing) { + if (because_canvas_crossing) { if (!within_track_canvas && _edit_point == EditAtMouse) { have_edit_point = false; } else { @@ -1130,8 +1130,6 @@ Editor::sensitize_the_right_region_actions (bool from_context_menu, bool from_ca rs.insert (rs.end(), at_edit_point.begin(), at_edit_point.end()); } } - } else if (from_context_menu) { - /* we have a context click event */ } } @@ -1430,7 +1428,7 @@ Editor::region_selection_changed () _regions->block_change_connection (false); editor_regions_selection_changed_connection.block(false); - sensitize_the_right_region_actions (false, false); + sensitize_the_right_region_actions (false); /* propagate into backend */ |