13
0

Update GUI, use Session::playlists() getter (2/2)

This commit is contained in:
Robin Gareus 2019-03-19 05:14:40 +01:00
parent cf11e11fc5
commit c09c7bab52
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
5 changed files with 12 additions and 12 deletions

View File

@ -4369,7 +4369,7 @@ Editor::new_playlists (TimeAxisView* v)
{ {
begin_reversible_command (_("new playlists")); begin_reversible_command (_("new playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > 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); mapover_tracks (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), playlists), v, ARDOUR::Properties::group_select.property_id);
commit_reversible_command (); commit_reversible_command ();
} }
@ -4385,7 +4385,7 @@ Editor::copy_playlists (TimeAxisView* v)
{ {
begin_reversible_command (_("copy playlists")); begin_reversible_command (_("copy playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > 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); mapover_tracks (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_copy_playlist), playlists), v, ARDOUR::Properties::group_select.property_id);
commit_reversible_command (); commit_reversible_command ();
} }
@ -4400,7 +4400,7 @@ Editor::clear_playlists (TimeAxisView* v)
{ {
begin_reversible_command (_("clear playlists")); begin_reversible_command (_("clear playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > 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); mapover_tracks (sigc::mem_fun (*this, &Editor::mapped_clear_playlist), v, ARDOUR::Properties::group_select.property_id);
commit_reversible_command (); commit_reversible_command ();
} }

View File

@ -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 */ /* a MRV start trim may change the source length. ensure we cover all playlists here */
if (mrv && _operation == StartTrim) { if (mrv && _operation == StartTrim) {
vector<boost::shared_ptr<Playlist> > all_playlists; vector<boost::shared_ptr<Playlist> > all_playlists;
_editor->session()->playlists->get (all_playlists); _editor->session()->playlists()->get (all_playlists);
for (vector<boost::shared_ptr<Playlist> >::iterator x = all_playlists.begin(); x != all_playlists.end(); ++x) { for (vector<boost::shared_ptr<Playlist> >::iterator x = all_playlists.begin(); x != all_playlists.end(); ++x) {
if ((*x)->uses_source (rv->region()->source(0))) { if ((*x)->uses_source (rv->region()->source(0))) {

View File

@ -7696,7 +7696,7 @@ Editor::insert_time (
if (all_playlists) { if (all_playlists) {
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x); RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
if (rtav && rtav->track ()) { if (rtav && rtav->track ()) {
vector<boost::shared_ptr<Playlist> > all = _session->playlists->playlists_for_track (rtav->track ()); vector<boost::shared_ptr<Playlist> > all = _session->playlists()->playlists_for_track (rtav->track ());
for (vector<boost::shared_ptr<Playlist> >::iterator p = all.begin(); p != all.end(); ++p) { for (vector<boost::shared_ptr<Playlist> >::iterator p = all.begin(); p != all.end(); ++p) {
pl.insert (*p); pl.insert (*p);
} }

View File

@ -105,7 +105,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
model->clear (); model->clear ();
_session->playlists->foreach (this, &PlaylistSelector::add_playlist_to_map); _session->playlists()->foreach (this, &PlaylistSelector::add_playlist_to_map);
boost::shared_ptr<Track> this_track = rui->track(); boost::shared_ptr<Track> this_track = rui->track();
@ -171,7 +171,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
// Add unassigned (imported) playlists to the list // Add unassigned (imported) playlists to the list
list<boost::shared_ptr<Playlist> > unassigned; list<boost::shared_ptr<Playlist> > unassigned;
_session->playlists->unassigned (unassigned); _session->playlists()->unassigned (unassigned);
TreeModel::Row row; TreeModel::Row row;
TreeModel::Row selected_row; TreeModel::Row selected_row;

View File

@ -1075,7 +1075,7 @@ RouteTimeAxisView::rename_current_playlist ()
} }
prompter.get_result (name); prompter.get_result (name);
if (name.length()) { if (name.length()) {
if (_session->playlists->by_name (name)) { if (_session->playlists()->by_name (name)) {
MessageDialog msg (_("Given playlist name is not unique.")); MessageDialog msg (_("Given playlist name is not unique."));
msg.run (); msg.run ();
prompter.set_initial_text (Playlist::bump_name (name, *_session)); prompter.set_initial_text (Playlist::bump_name (name, *_session));
@ -1143,7 +1143,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl
name = resolve_new_group_playlist_name(name,playlists_before_op); name = resolve_new_group_playlist_name(name,playlists_before_op);
} }
while (_session->playlists->by_name(name)) { while (_session->playlists()->by_name(name)) {
name = Playlist::bump_name (name, *_session); name = Playlist::bump_name (name, *_session);
} }
@ -1171,7 +1171,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl
} }
prompter.get_result (name); prompter.get_result (name);
if (name.length()) { if (name.length()) {
if (_session->playlists->by_name (name)) { if (_session->playlists()->by_name (name)) {
MessageDialog msg (_("Given playlist name is not unique.")); MessageDialog msg (_("Given playlist name is not unique."));
msg.run (); msg.run ();
prompter.set_initial_text (Playlist::bump_name (name, *_session)); prompter.set_initial_text (Playlist::bump_name (name, *_session));
@ -1551,7 +1551,7 @@ RouteTimeAxisView::build_playlist_menu ()
RadioMenuItem::Group playlist_group; RadioMenuItem::Group playlist_group;
boost::shared_ptr<Track> tr = track (); boost::shared_ptr<Track> tr = track ();
vector<boost::shared_ptr<Playlist> > playlists_tr = _session->playlists->playlists_for_track (tr); vector<boost::shared_ptr<Playlist> > playlists_tr = _session->playlists()->playlists_for_track (tr);
/* sort the playlists */ /* sort the playlists */
PlaylistSorter cmp; PlaylistSorter cmp;
@ -1646,7 +1646,7 @@ RouteTimeAxisView::use_playlist (RadioMenuItem *item, boost::weak_ptr<Playlist>
continue; continue;
} }
boost::shared_ptr<Playlist> ipl = session()->playlists->by_name(playlist_name); boost::shared_ptr<Playlist> ipl = session()->playlists()->by_name(playlist_name);
if (!ipl) { if (!ipl) {
// No playlist for this track for this take yet, make it // No playlist for this track for this take yet, make it
track->use_default_new_playlist(); track->use_default_new_playlist();