From: Ben Loftis Date: Sun, 6 Jul 2014 18:53:56 +0000 (-0500) Subject: remove some cruft with previous commits. remove option link-region-and-track-selecti... X-Git-Tag: 4.0-rc1~1601^2~617 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=6d97d72999bd8a3283eb09ebae3e55a1c9500d86;p=ardour.git remove some cruft with previous commits. remove option link-region-and-track-selection since they are now exclusive, and rename select-all-regions to select-all-objects to match the implementation --- diff --git a/gtk2_ardour/ardour-sae.menus b/gtk2_ardour/ardour-sae.menus index 16fcd8f5df..66f3d1caf3 100644 --- a/gtk2_ardour/ardour-sae.menus +++ b/gtk2_ardour/ardour-sae.menus @@ -297,9 +297,6 @@ - - - diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in index 85383e2b02..98e2174164 100644 --- a/gtk2_ardour/ardour.menus.in +++ b/gtk2_ardour/ardour.menus.in @@ -154,7 +154,7 @@ - + diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 8a39a8fac1..02095f8954 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1836,7 +1836,7 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items) select_menu->set_name ("ArdourContextMenu"); select_items.push_back (MenuElem (_("Select All in Track"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_in_track), Selection::Set))); - select_items.push_back (MenuElem (_("Select All Regions"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_regions), Selection::Set))); + select_items.push_back (MenuElem (_("Select All Objects"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_objects), Selection::Set))); select_items.push_back (MenuElem (_("Invert Selection in Track"), sigc::mem_fun(*this, &Editor::invert_selection_in_track))); select_items.push_back (MenuElem (_("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection))); select_items.push_back (SeparatorElem()); @@ -1913,7 +1913,7 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items) select_menu->set_name ("ArdourContextMenu"); select_items.push_back (MenuElem (_("Select All in Track"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_in_track), Selection::Set))); - select_items.push_back (MenuElem (_("Select All Regions"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_regions), Selection::Set))); + select_items.push_back (MenuElem (_("Select All Objects"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_objects), Selection::Set))); select_items.push_back (MenuElem (_("Invert Selection in Track"), sigc::mem_fun(*this, &Editor::invert_selection_in_track))); select_items.push_back (MenuElem (_("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection))); select_items.push_back (SeparatorElem()); diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 76006194b9..9faaa4ded3 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -251,7 +251,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void maybe_locate_with_edit_preroll (framepos_t); void play_with_preroll (); void select_all_in_track (Selection::Operation op); - void select_all_regions (Selection::Operation op); + void select_all_objects (Selection::Operation op); void invert_selection_in_track (); void invert_selection (); void deselect_all (); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 96b9bc05ae..229a8ad39f 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -191,7 +191,7 @@ Editor::register_actions () reg_sens (editor_actions, "playhead-to-range-start", _("Playhead to Range Start"), sigc::bind (sigc::mem_fun(*this, &Editor::cursor_to_selection_start), playhead_cursor)); reg_sens (editor_actions, "playhead-to-range-end", _("Playhead to Range End"), sigc::bind (sigc::mem_fun(*this, &Editor::cursor_to_selection_end), playhead_cursor)); - reg_sens (editor_actions, "select-all-regions", _("Select All Regions"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_regions), Selection::Set)); + reg_sens (editor_actions, "select-all-objects", _("Select All Objects"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_objects), Selection::Set)); reg_sens (editor_actions, "select-all-tracks", _("Select All Tracks"), sigc::mem_fun(*this, &Editor::select_all_tracks)); reg_sens (editor_actions, "deselect-all", _("Deselect All"), sigc::mem_fun(*this, &Editor::deselect_all)); reg_sens (editor_actions, "invert-selection", _("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection)); diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 6f65b27345..9c05c9f924 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1370,7 +1370,7 @@ Editor::select_all_internal_edit (Selection::Operation) } void -Editor::select_all_regions (Selection::Operation op) +Editor::select_all_objects (Selection::Operation op) { list touched; diff --git a/gtk2_ardour/mnemonic-us.bindings.in b/gtk2_ardour/mnemonic-us.bindings.in index 3f30b20657..0820614a3f 100644 --- a/gtk2_ardour/mnemonic-us.bindings.in +++ b/gtk2_ardour/mnemonic-us.bindings.in @@ -174,7 +174,7 @@ This mode provides many different operations on both regions and control points, ;; MIDDLE ROW @aep|Region/align-regions-sync-relative|a|align sync points (relative) -@select|Editor/select-all-regions|<@PRIMARY@>a|select all regions +@select|Editor/select-all-objects|<@PRIMARY@>a|select all objects @aep|Region/align-regions-end|<@SECONDARY@>a|align end(s) @aep|Region/align-regions-sync|<@TERTIARY@>a|align sync points @aep|Region/align-regions-start|<@PRIMARY@><@LEVEL4@>a|align start(s) diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 240b094474..9efe9a9440 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -1548,14 +1548,6 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::set_draggable_playhead) )); - add_option (_("Editor"), - new BoolOption ( - "link-region-and-track-selection", - _("Link selection of regions and tracks"), - sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_region_and_track_selection), - sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_region_and_track_selection) - )); - add_option (_("Editor"), new BoolOption ( "automation-follows-regions", diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index c279502d83..4f79724ae9 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -160,9 +160,6 @@ Selection::clear_regions () if (!regions.empty()) { regions.clear_all (); RegionsChanged(); - if (Config->get_link_region_and_track_selection()) { - clear_tracks (); - } } } @@ -463,9 +460,6 @@ Selection::add (vector& v) for (vector::iterator i = v.begin(); i != v.end(); ++i) { if (find (regions.begin(), regions.end(), (*i)) == regions.end()) { changed = regions.add ((*i)); - if (Config->get_link_region_and_track_selection() && changed) { - add (&(*i)->get_time_axis_view()); - } } } @@ -488,9 +482,6 @@ Selection::add (const RegionSelection& rs) for (RegionSelection::const_iterator i = rs.begin(); i != rs.end(); ++i) { if (find (regions.begin(), regions.end(), (*i)) == regions.end()) { changed = regions.add ((*i)); - if (Config->get_link_region_and_track_selection() && changed) { - add (&(*i)->get_time_axis_view()); - } } } @@ -507,12 +498,9 @@ Selection::add (RegionView* r) if (find (regions.begin(), regions.end(), r) == regions.end()) { bool changed = regions.add (r); - if (Config->get_link_region_and_track_selection() && changed) { - add (&r->get_time_axis_view()); - } - if (changed) { - RegionsChanged (); - } + if (changed) { + RegionsChanged (); + } } } @@ -525,11 +513,6 @@ Selection::add (MidiRegionView* mrv) if (find (midi_regions.begin(), midi_regions.end(), mrv) == midi_regions.end()) { midi_regions.push_back (mrv); /* XXX should we do this? */ -#if 0 - if (Config->get_link_region_and_track_selection()) { - add (&mrv->get_time_axis_view()); - } -#endif MidiRegionsChanged (); } } @@ -720,10 +703,6 @@ Selection::remove (RegionView* r) if (regions.remove (r)) { RegionsChanged (); } - - if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_time_axis_view())) { - remove (&r->get_time_axis_view()); - } } void @@ -735,13 +714,6 @@ Selection::remove (MidiRegionView* mrv) midi_regions.erase (x); MidiRegionsChanged (); } - -#if 0 - /* XXX fix this up ? */ - if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_time_axis_view())) { - remove (&r->get_time_axis_view()); - } -#endif } @@ -839,17 +811,11 @@ Selection::set (MidiRegionView* mrv) } void -Selection::set (RegionView* r, bool also_clear_tracks) +Selection::set (RegionView* r, bool /*also_clear_tracks*/) { clear_time(); //enforce region/object exclusivity clear_tracks(); //enforce object/track exclusivity clear_objects (); - if (also_clear_tracks && !Config->get_link_region_and_track_selection()) { - /* clear_regions() will have done this if the link preference - * is enabled - */ - clear_tracks (); - } add (r); } @@ -862,18 +828,6 @@ Selection::set (vector& v) clear_tracks(); //enforce object/track exclusivity clear_objects(); - if (Config->get_link_region_and_track_selection()) { - if (had_regions) { - /* there were regions before, so we're changing the - * region selection (likely), thus link region/track - * selection. relevant tracks will get selected - * as we ::add() below. - */ - clear_tracks (); - // make sure to deselect any automation selections - clear_points(); - } - } add (v); } @@ -1067,10 +1021,6 @@ Selection::set (list const & selectables) clear_tracks(); //enforce object/track exclusivity clear_objects (); - if (Config->get_link_region_and_track_selection ()) { - clear_tracks (); - } - add (selectables); } diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index 85c5a35ab5..1a1da34db5 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -83,7 +83,7 @@ CONFIG_VARIABLE (bool, use_osc, "use-osc", false) /* editing related */ CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide) -CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false) +CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false) // DEPRECATED CONFIG_VARIABLE (bool, link_editor_and_mixer_selection, "link-editor-and-mixer-selection", false) CONFIG_VARIABLE (std::string, keyboard_layout_name, "keyboard-layout-name", "ansi") CONFIG_VARIABLE (bool, automation_follows_regions, "automation-follows-regions", true)