diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in index 9548667914..aa4d789fd8 100644 --- a/gtk2_ardour/ardour.menus.in +++ b/gtk2_ardour/ardour.menus.in @@ -406,7 +406,6 @@ - @@ -904,7 +903,6 @@ - diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 1f216b6fbc..d3a0919e2e 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1343,7 +1343,6 @@ private: void toggle_solo (); void toggle_solo_isolate (); void toggle_mute (); - void toggle_region_lock_style (); void play_solo_selection (bool restart); @@ -1409,11 +1408,11 @@ private: void fork_regions_from_unselected (); void do_insert_time (); - void insert_time (Temporal::timepos_t const &, Temporal::timecnt_t const &, Editing::InsertTimeOption, bool, bool, bool, bool, bool, bool); + void insert_time (Temporal::timepos_t const &, Temporal::timecnt_t const &, Editing::InsertTimeOption, bool, bool, bool, bool); void do_remove_time (); - void remove_time (Temporal::timepos_t const & pos, Temporal::timecnt_t const & distance, Editing::InsertTimeOption opt, bool ignore_music_glue, bool markers_too, - bool glued_markers_too, bool locked_markers_too, bool tempo_too); + void remove_time (Temporal::timepos_t const & pos, Temporal::timecnt_t const & distance, Editing::InsertTimeOption opt, bool markers_too, + bool locked_markers_too, bool tempo_too); void tab_to_transient (bool forward); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 3314b4ecf8..e5fb04fcd7 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -1865,7 +1865,6 @@ Editor::register_region_actions () /* Toggle `locked' status of selected regions */ register_toggle_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "toggle-region-lock", _("Lock"), sigc::mem_fun(*this, &Editor::toggle_region_lock)); register_toggle_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "toggle-region-video-lock", _("Lock to Video"), sigc::mem_fun(*this, &Editor::toggle_region_video_lock)); - register_toggle_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "toggle-region-lock-style", _("Glue to Bars and Beats"), sigc::mem_fun (*this, &Editor::toggle_region_lock_style)); /* Remove sync points from selected regions */ register_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "remove-region-sync", _("Remove Sync"), sigc::mem_fun(*this, &Editor::remove_region_sync)); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index a4fb0446e7..60258de2b8 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -6667,37 +6667,6 @@ Editor::toggle_region_video_lock () commit_reversible_command (); } -void -Editor::toggle_region_lock_style () -{ - if (_ignore_region_action) { - return; - } - - RegionSelection rs = get_regions_from_selection_and_entered (); - - if (!_session || rs.empty()) { - return; - } - - Glib::RefPtr a = Glib::RefPtr::cast_dynamic (_region_actions->get_action("toggle-region-lock-style")); - vector proxies = a->get_proxies(); - Gtk::CheckMenuItem* cmi = dynamic_cast (proxies.front()); - - assert (cmi); - - begin_reversible_command (_("toggle region lock style")); - - for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) { - (*i)->region()->clear_changes (); - Temporal::TimeDomain const td = ((*i)->region()->position_time_domain() == Temporal::AudioTime && !cmi->get_inconsistent()) ? Temporal::BeatTime : Temporal::AudioTime; - (*i)->region()->set_position_time_domain (td); - _session->add_command (new StatefulDiffCommand ((*i)->region())); - } - - commit_reversible_command (); -} - void Editor::toggle_opaque_region () { @@ -8483,9 +8452,7 @@ Editor::do_insert_time () d.distance(), d.intersected_region_action (), d.all_playlists(), - d.move_glued(), d.move_markers(), - d.move_glued_markers(), d.move_locked_markers(), d.move_tempos() ); @@ -8494,7 +8461,7 @@ Editor::do_insert_time () void Editor::insert_time ( timepos_t const & pos, timecnt_t const & samples, InsertTimeOption opt, - bool all_playlists, bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too + bool all_playlists, bool markers_too, bool locked_markers_too, bool tempo_too ) { @@ -8546,7 +8513,7 @@ Editor::insert_time ( (*i)->split (pos); } - (*i)->shift (pos, samples, (opt == MoveIntersected), ignore_music_glue); + (*i)->shift (pos, samples, (opt == MoveIntersected), true); vector cmds; (*i)->rdiff (cmds); @@ -8576,7 +8543,7 @@ Editor::insert_time ( Locations::LocationList::const_iterator tmp; - if ((*i)->position_time_domain() == Temporal::AudioTime || glued_markers_too) { + if ((*i)->position_time_domain() == Temporal::AudioTime) { bool const was_locked = (*i)->locked (); if (locked_markers_too) { (*i)->unlock (); @@ -8662,9 +8629,7 @@ Editor::do_remove_time () d.position(), distance, SplitIntersected, - d.move_glued(), d.move_markers(), - d.move_glued_markers(), d.move_locked_markers(), d.move_tempos() ); @@ -8672,7 +8637,7 @@ Editor::do_remove_time () void Editor::remove_time (timepos_t const & pos, timecnt_t const & duration, InsertTimeOption opt, - bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too) + bool markers_too, bool locked_markers_too, bool tempo_too) { if (Config->get_edit_mode() == Lock) { error << (_("Cannot insert or delete time when in Lock edit.")) << endmsg; @@ -8697,7 +8662,7 @@ Editor::remove_time (timepos_t const & pos, timecnt_t const & duration, InsertTi TimelineRange ar(pos, pos+duration, 0); rl.push_back(ar); pl->cut (rl); - pl->shift (pos, -duration, true, ignore_music_glue); + pl->shift (pos, -duration, true, true); XMLNode &after = pl->get_state(); @@ -8724,7 +8689,7 @@ Editor::remove_time (timepos_t const & pos, timecnt_t const & duration, InsertTi Locations::LocationList copy (_session->locations()->list()); for (Locations::LocationList::iterator i = copy.begin(); i != copy.end(); ++i) { - if ((*i)->position_time_domain() == Temporal::AudioTime || glued_markers_too) { + if ((*i)->position_time_domain() == Temporal::AudioTime) { bool const was_locked = (*i)->locked (); if (locked_markers_too) { diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc index 7d8121aef6..21d6c10ac0 100644 --- a/gtk2_ardour/editor_regions.cc +++ b/gtk2_ardour/editor_regions.cc @@ -83,10 +83,6 @@ EditorRegions::init () setup_col (tvc, -1, ALIGN_CENTER, S_("Lock|L"), _("Region position locked?")); setup_toggle (tvc, sigc::mem_fun (*this, &EditorRegions::locked_changed)); - tvc = append_col (_columns.glued, cb_width); - setup_col (tvc, -1, ALIGN_CENTER, S_("Glued|G"), _("Region position glued to Bars|Beats time?")); - setup_toggle (tvc, sigc::mem_fun (*this, &EditorRegions::glued_changed)); - tvc = append_col (_columns.muted, cb_width); setup_col (tvc, -1, ALIGN_CENTER, S_("Mute|M"), _("Region muted?")); setup_toggle (tvc, sigc::mem_fun (*this, &EditorRegions::muted_changed)); diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index ec8ae320d7..b6d2649bee 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1439,8 +1439,6 @@ Editor::sensitize_the_right_region_actions (bool because_canvas_crossing) bool have_unlocked = false; bool have_video_locked = false; bool have_video_unlocked = false; - bool have_position_lock_style_audio = false; - bool have_position_lock_style_music = false; bool have_muted = false; bool have_unmuted = false; bool have_opaque = false; @@ -1490,12 +1488,6 @@ Editor::sensitize_the_right_region_actions (bool because_canvas_crossing) have_video_unlocked = true; } - if (r->position_time_domain() == Temporal::BeatTime) { - have_position_lock_style_music = true; - } else { - have_position_lock_style_audio = true; - } - if (r->muted()) { have_muted = true; } else { @@ -1637,17 +1629,6 @@ Editor::sensitize_the_right_region_actions (bool because_canvas_crossing) // a->set_inconsistent (); } - a = Glib::RefPtr::cast_dynamic (_region_actions->get_action("toggle-region-lock-style")); - a->set_active (have_position_lock_style_music && !have_position_lock_style_audio); - - vector proxies = a->get_proxies(); - for (vector::iterator p = proxies.begin(); p != proxies.end(); ++p) { - Gtk::CheckMenuItem* cmi = dynamic_cast (*p); - if (cmi) { - cmi->set_inconsistent (have_position_lock_style_music && have_position_lock_style_audio); - } - } - a = Glib::RefPtr::cast_dynamic (_region_actions->get_action("toggle-region-mute")); a->set_active (have_muted && !have_unmuted); if (have_muted && have_unmuted) { diff --git a/gtk2_ardour/insert_remove_time_dialog.cc b/gtk2_ardour/insert_remove_time_dialog.cc index 80ff93db68..c9f8aa39f1 100644 --- a/gtk2_ardour/insert_remove_time_dialog.cc +++ b/gtk2_ardour/insert_remove_time_dialog.cc @@ -98,21 +98,11 @@ InsertRemoveTimeDialog::InsertRemoveTimeDialog (PublicEditor& e, bool remove) _all_playlists.set_label (_("Apply to all playlists of the selected track(s)")); get_vbox()->pack_start (_all_playlists); - _move_glued.set_label (_("Move glued-to-musical-time regions (MIDI regions)")); - _move_glued.set_active(); - get_vbox()->pack_start (_move_glued); _move_markers.set_label (_("Move markers")); get_vbox()->pack_start (_move_markers); _move_markers.signal_toggled().connect (sigc::mem_fun (*this, &InsertRemoveTimeDialog::move_markers_toggled)); - _move_glued_markers.set_label (_("Move glued-to-musical-time markers")); - _move_glued_markers.set_active(); Alignment* indent = manage (new Alignment); indent->set_padding (0, 0, 12, 0); - indent->add (_move_glued_markers); - get_vbox()->pack_start (*indent); - _move_locked_markers.set_label (_("Move locked markers")); - indent = manage (new Alignment); - indent->set_padding (0, 0, 12, 0); indent->add (_move_locked_markers); get_vbox()->pack_start (*indent); tempo_label.set_markup (_("Move tempo and time signature changes\n(may cause oddities in the tempo map)")); @@ -158,12 +148,6 @@ InsertRemoveTimeDialog::all_playlists () const return _all_playlists.get_active (); } -bool -InsertRemoveTimeDialog::move_glued () const -{ - return _move_glued.get_active (); -} - bool InsertRemoveTimeDialog::move_tempos () const { @@ -176,12 +160,6 @@ InsertRemoveTimeDialog::move_markers () const return _move_markers.get_active (); } -bool -InsertRemoveTimeDialog::move_glued_markers () const -{ - return _move_glued_markers.get_active (); -} - bool InsertRemoveTimeDialog::move_locked_markers () const { @@ -214,6 +192,5 @@ InsertRemoveTimeDialog::doit () void InsertRemoveTimeDialog::move_markers_toggled () { - _move_glued_markers.set_sensitive (_move_markers.get_active ()); _move_locked_markers.set_sensitive (_move_markers.get_active ()); } diff --git a/gtk2_ardour/insert_remove_time_dialog.h b/gtk2_ardour/insert_remove_time_dialog.h index af9c3721bf..dfb88dd0eb 100644 --- a/gtk2_ardour/insert_remove_time_dialog.h +++ b/gtk2_ardour/insert_remove_time_dialog.h @@ -28,9 +28,7 @@ public: Editing::InsertTimeOption intersected_region_action (); bool all_playlists () const; - bool move_glued () const; bool move_markers () const; - bool move_glued_markers () const; bool move_locked_markers () const; bool move_tempos () const; Temporal::timepos_t position () const; @@ -43,9 +41,7 @@ private: PublicEditor& _editor; Gtk::ComboBoxText _intersected_combo; Gtk::CheckButton _all_playlists; - Gtk::CheckButton _move_glued; Gtk::CheckButton _move_markers; - Gtk::CheckButton _move_glued_markers; Gtk::CheckButton _move_locked_markers; Gtk::CheckButton _move_tempos; Gtk::Label tempo_label; diff --git a/gtk2_ardour/region_list_base.cc b/gtk2_ardour/region_list_base.cc index 2e0285b143..919bf79896 100644 --- a/gtk2_ardour/region_list_base.cc +++ b/gtk2_ardour/region_list_base.cc @@ -482,9 +482,6 @@ RegionListBase::populate_row (std::shared_ptr region, TreeModel::Row con if (all || what_changed.contains (Properties::locked)) { populate_row_locked (region, row); } - if (all || what_changed.contains (Properties::time_domain)) { - populate_row_glued (region, row); - } if (all || what_changed.contains (Properties::muted)) { populate_row_muted (region, row); } @@ -601,16 +598,6 @@ RegionListBase::populate_row_locked (std::shared_ptr region, TreeModel:: row[_columns.locked] = region->locked (); } -void -RegionListBase::populate_row_glued (std::shared_ptr region, TreeModel::Row const& row) -{ - if (region->position_time_domain () == Temporal::BeatTime) { - row[_columns.glued] = true; - } else { - row[_columns.glued] = false; - } -} - void RegionListBase::populate_row_muted (std::shared_ptr region, TreeModel::Row const& row) { @@ -862,19 +849,6 @@ RegionListBase::locked_changed (std::string const& path) } } -void -RegionListBase::glued_changed (std::string const& path) -{ - TreeIter i = _model->get_iter (path); - if (i) { - std::shared_ptr region = (*i)[_columns.region]; - if (region) { - /* `glued' means MusicTime, and we're toggling here */ - region->set_position_time_domain ((*i)[_columns.glued] ? Temporal::AudioTime : Temporal::BeatTime); - } - } -} - void RegionListBase::muted_changed (std::string const& path) { diff --git a/gtk2_ardour/region_list_base.h b/gtk2_ardour/region_list_base.h index 735944abe6..fa48bc7e92 100644 --- a/gtk2_ardour/region_list_base.h +++ b/gtk2_ardour/region_list_base.h @@ -100,7 +100,6 @@ protected: add (fadein); // 7 add (fadeout); // 8 add (locked); // 9 - add (glued); // 10 add (muted); // 11 add (opaque); // 12 add (path); // 13 @@ -126,7 +125,6 @@ protected: Gtk::TreeModelColumn fadein; Gtk::TreeModelColumn fadeout; Gtk::TreeModelColumn locked; - Gtk::TreeModelColumn glued; Gtk::TreeModelColumn muted; Gtk::TreeModelColumn opaque; Gtk::TreeModelColumn path; @@ -179,7 +177,6 @@ protected: virtual void tag_edit (const std::string&, const std::string&); void locked_changed (std::string const&); - void glued_changed (std::string const&); void muted_changed (std::string const&); void opaque_changed (std::string const&); @@ -208,7 +205,6 @@ protected: void populate_row_fade_out (std::shared_ptr region, Gtk::TreeModel::Row const& row, std::shared_ptr); void populate_row_locked (std::shared_ptr region, Gtk::TreeModel::Row const& row); void populate_row_muted (std::shared_ptr region, Gtk::TreeModel::Row const& row); - void populate_row_glued (std::shared_ptr region, Gtk::TreeModel::Row const& row); void populate_row_opaque (std::shared_ptr region, Gtk::TreeModel::Row const& row); void populate_row_length (std::shared_ptr region, Gtk::TreeModel::Row const& row); void populate_row_name (std::shared_ptr region, Gtk::TreeModel::Row const& row);