remove method and inline its contents. Nothing gained by wrapping this up
[ardour.git] / gtk2_ardour / playlist_selector.cc
index cdc144d1b7c7cde680a5acef4ad778da5d4c77ca..e58b69a818e22bb651be2221eb634c68ecd36446 100644 (file)
@@ -31,7 +31,7 @@
 #include "route_ui.h"
 #include "gui_thread.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace Gtk;
@@ -118,24 +118,12 @@ PlaylistSelector::show_for (RouteUI* ruix)
        for (TrackPlaylistMap::iterator x = trpl_map.begin(); x != trpl_map.end(); ++x) {
 
                boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (_session->route_by_id (x->first));
-               
-               /* legacy sessions stored the diskstream ID as the original
-                * playlist owner. so try there instead.
-                */
-
-               if (tr == 0) {
-                       tr = _session->track_by_diskstream_id (x->first);
-               }
-
-               if (tr == 0) {
-                       continue;
-               }
 
                /* add a node for the track */
 
                string nodename;
 
-               if (tr->name().empty()) {
+               if (!tr || tr->name().empty()) {
                        nodename = _("unassigned");
                } else {
                        nodename = tr->name().c_str();
@@ -272,7 +260,7 @@ PlaylistSelector::selection_changed ()
                        return;
                }
 
-               at->use_playlist (apl);
+               at->use_playlist (DataType::AUDIO, apl);
 
                hide ();
        }