From c09c7bab525a63eda1d8a05228160f56b1c94683 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 19 Mar 2019 05:14:40 +0100 Subject: [PATCH] Update GUI, use Session::playlists() getter (2/2) --- gtk2_ardour/editor.cc | 6 +++--- gtk2_ardour/editor_drag.cc | 2 +- gtk2_ardour/editor_ops.cc | 2 +- gtk2_ardour/playlist_selector.cc | 4 ++-- gtk2_ardour/route_time_axis.cc | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 6db1cb7a3a..377ea851da 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4369,7 +4369,7 @@ Editor::new_playlists (TimeAxisView* v) { begin_reversible_command (_("new playlists")); vector > playlists; - _session->playlists->get (playlists); + _session->playlists()->get (playlists); mapover_tracks (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), playlists), v, ARDOUR::Properties::group_select.property_id); commit_reversible_command (); } @@ -4385,7 +4385,7 @@ Editor::copy_playlists (TimeAxisView* v) { begin_reversible_command (_("copy playlists")); vector > playlists; - _session->playlists->get (playlists); + _session->playlists()->get (playlists); mapover_tracks (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_copy_playlist), playlists), v, ARDOUR::Properties::group_select.property_id); commit_reversible_command (); } @@ -4400,7 +4400,7 @@ Editor::clear_playlists (TimeAxisView* v) { begin_reversible_command (_("clear playlists")); vector > playlists; - _session->playlists->get (playlists); + _session->playlists()->get (playlists); mapover_tracks (sigc::mem_fun (*this, &Editor::mapped_clear_playlist), v, ARDOUR::Properties::group_select.property_id); commit_reversible_command (); } diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 2449bb5752..ebc5d97bb7 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -2986,7 +2986,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move) /* a MRV start trim may change the source length. ensure we cover all playlists here */ if (mrv && _operation == StartTrim) { vector > all_playlists; - _editor->session()->playlists->get (all_playlists); + _editor->session()->playlists()->get (all_playlists); for (vector >::iterator x = all_playlists.begin(); x != all_playlists.end(); ++x) { if ((*x)->uses_source (rv->region()->source(0))) { diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 01647a8d5a..2bc607149f 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -7696,7 +7696,7 @@ Editor::insert_time ( if (all_playlists) { RouteTimeAxisView* rtav = dynamic_cast (*x); if (rtav && rtav->track ()) { - vector > all = _session->playlists->playlists_for_track (rtav->track ()); + vector > all = _session->playlists()->playlists_for_track (rtav->track ()); for (vector >::iterator p = all.begin(); p != all.end(); ++p) { pl.insert (*p); } diff --git a/gtk2_ardour/playlist_selector.cc b/gtk2_ardour/playlist_selector.cc index e58b69a818..8f31a26368 100644 --- a/gtk2_ardour/playlist_selector.cc +++ b/gtk2_ardour/playlist_selector.cc @@ -105,7 +105,7 @@ PlaylistSelector::show_for (RouteUI* ruix) model->clear (); - _session->playlists->foreach (this, &PlaylistSelector::add_playlist_to_map); + _session->playlists()->foreach (this, &PlaylistSelector::add_playlist_to_map); boost::shared_ptr this_track = rui->track(); @@ -171,7 +171,7 @@ PlaylistSelector::show_for (RouteUI* ruix) // Add unassigned (imported) playlists to the list list > unassigned; - _session->playlists->unassigned (unassigned); + _session->playlists()->unassigned (unassigned); TreeModel::Row row; TreeModel::Row selected_row; diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 4092263dda..4d74f0cc7f 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -1075,7 +1075,7 @@ RouteTimeAxisView::rename_current_playlist () } prompter.get_result (name); if (name.length()) { - if (_session->playlists->by_name (name)) { + if (_session->playlists()->by_name (name)) { MessageDialog msg (_("Given playlist name is not unique.")); msg.run (); prompter.set_initial_text (Playlist::bump_name (name, *_session)); @@ -1143,7 +1143,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vectorplaylists->by_name(name)) { + while (_session->playlists()->by_name(name)) { name = Playlist::bump_name (name, *_session); } @@ -1171,7 +1171,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vectorplaylists->by_name (name)) { + if (_session->playlists()->by_name (name)) { MessageDialog msg (_("Given playlist name is not unique.")); msg.run (); prompter.set_initial_text (Playlist::bump_name (name, *_session)); @@ -1551,7 +1551,7 @@ RouteTimeAxisView::build_playlist_menu () RadioMenuItem::Group playlist_group; boost::shared_ptr tr = track (); - vector > playlists_tr = _session->playlists->playlists_for_track (tr); + vector > playlists_tr = _session->playlists()->playlists_for_track (tr); /* sort the playlists */ PlaylistSorter cmp; @@ -1646,7 +1646,7 @@ RouteTimeAxisView::use_playlist (RadioMenuItem *item, boost::weak_ptr continue; } - boost::shared_ptr ipl = session()->playlists->by_name(playlist_name); + boost::shared_ptr ipl = session()->playlists()->by_name(playlist_name); if (!ipl) { // No playlist for this track for this take yet, make it track->use_default_new_playlist();