remove method and inline its contents. Nothing gained by wrapping this up
[ardour.git] / gtk2_ardour / playlist_selector.cc
index 35a64f38dd79b4fb485ead5e4d082246e152cf67..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;
@@ -119,23 +119,11 @@ PlaylistSelector::show_for (RouteUI* ruix)
 
                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 ();
        }