X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fplaylist_selector.cc;h=dd62240e44217688143fc6c435d61ae4e2e90d28;hb=a7f4f660956250cc98cc519321ad5b8e715f9d0f;hp=39abfe3dc1297631f4367c910084e664269ff6a2;hpb=cd9fdb935f08966cc8c7170a39870e8adcae69d8;p=ardour.git diff --git a/gtk2_ardour/playlist_selector.cc b/gtk2_ardour/playlist_selector.cc index 39abfe3dc1..dd62240e44 100644 --- a/gtk2_ardour/playlist_selector.cc +++ b/gtk2_ardour/playlist_selector.cc @@ -20,12 +20,12 @@ #include -#include -#include -#include -#include -#include -#include +#include "ardour/session_playlist.h" +#include "ardour/audio_diskstream.h" +#include "ardour/playlist.h" +#include "ardour/audio_track.h" +#include "ardour/audioplaylist.h" +#include "ardour/configuration.h" #include #include @@ -183,6 +183,35 @@ PlaylistSelector::show_for (RouteUI* ruix) } } + // Add unassigned (imported) playlists to the list + list > unassigned; + session->unassigned_playlists (unassigned); + + TreeModel::Row row; + TreeModel::Row* selected_row = 0; + TreePath this_path; + + row = *(model->append (others.children())); + row[columns.text] = _("Imported"); + proxy = row[columns.playlist]; + proxy.reset (); + + for (list >::iterator p = unassigned.begin(); p != unassigned.end(); ++p) { + TreeModel::Row child_row; + + child_row = *(model->append (row.children())); + child_row[columns.text] = (*p)->name(); + child_row[columns.playlist] = *p; + + if (*p == this_ds->playlist()) { + selected_row = &child_row; + } + + if (selected_row != 0) { + tree.get_selection()->select (*selected_row); + } + } + show_all (); select_connection = tree.get_selection()->signal_changed().connect (mem_fun(*this, &PlaylistSelector::selection_changed)); }