X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fardour%2Fplaylist_factory.cc;h=554c36df172552be8470addb4befd06fe9c8a789;hb=33da74c8e353ac56194956cae8e2b7d74ec1a1b0;hp=a801bae76c76d58a1e5e31961b7a8990c66d4579;hpb=449aab3c465bbbf66d221fac3d7ea559f1720357;p=ardour.git diff --git a/libs/ardour/playlist_factory.cc b/libs/ardour/playlist_factory.cc index a801bae76c..554c36df17 100644 --- a/libs/ardour/playlist_factory.cc +++ b/libs/ardour/playlist_factory.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2006 Paul Davis + Copyright (C) 2000-2006 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,22 +17,24 @@ */ -#include +#include "pbd/error.h" +#include "pbd/xml++.h" -#include -#include -#include -#include +#include "ardour/playlist.h" +#include "ardour/audioplaylist.h" +#include "ardour/midi_playlist.h" +#include "ardour/playlist_factory.h" #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; -sigc::signal > PlaylistFactory::PlaylistCreated; +sigc::signal, bool> PlaylistFactory::PlaylistCreated; -boost::shared_ptr -PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden) +boost::shared_ptr +PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden, bool unused) { const XMLProperty* type = node.property("type"); @@ -46,13 +48,13 @@ PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden) pl->set_region_ownership (); if (pl && !hidden) { - PlaylistCreated (pl); + PlaylistCreated (pl, unused); } return pl; } -boost::shared_ptr -PlaylistFactory::create (DataType type, Session& s, string name, bool hidden) +boost::shared_ptr +PlaylistFactory::create (DataType type, Session& s, string name, bool hidden) { boost::shared_ptr pl; @@ -62,14 +64,14 @@ PlaylistFactory::create (DataType type, Session& s, string name, bool hidden) pl = boost::shared_ptr (new MidiPlaylist (s, name, hidden)); if (pl && !hidden) { - PlaylistCreated (pl); + PlaylistCreated (pl, false); } return pl; } -boost::shared_ptr -PlaylistFactory::create (boost::shared_ptr old, string name, bool hidden) +boost::shared_ptr +PlaylistFactory::create (boost::shared_ptr old, string name, bool hidden) { boost::shared_ptr pl; boost::shared_ptr apl; @@ -84,19 +86,19 @@ PlaylistFactory::create (boost::shared_ptr old, string name, boo } if (pl && !hidden) { - PlaylistCreated (pl); + PlaylistCreated (pl, false); } return pl; } -boost::shared_ptr -PlaylistFactory::create (boost::shared_ptr old, nframes_t start, nframes_t cnt, string name, bool hidden) +boost::shared_ptr +PlaylistFactory::create (boost::shared_ptr old, nframes_t start, nframes_t cnt, string name, bool hidden) { boost::shared_ptr pl; boost::shared_ptr apl; boost::shared_ptr mpl; - + if ((apl = boost::dynamic_pointer_cast (old)) != 0) { pl = boost::shared_ptr (new AudioPlaylist (apl, start, cnt, name, hidden)); pl->set_region_ownership ();