Banshee.Sources.PrimarySource.AddSelectedTracks C# (CSharp) Method

AddSelectedTracks() public method

public AddSelectedTracks ( Source source, Selection selection ) : bool
source Source
selection Selection
return bool
        public override bool AddSelectedTracks (Source source, Selection selection)
        {
            if (!AcceptsInputFromSource (source))
                return false;

            DatabaseTrackListModel model = (source as ITrackModelSource).TrackModel as DatabaseTrackListModel;

            // Store a snapshot of the current selection
            CachedList<DatabaseTrackInfo> cached_list = CachedList<DatabaseTrackInfo>.CreateFromModelAndSelection (model, selection);
            if (ThreadAssist.InMainThread) {
                System.Threading.ThreadPool.QueueUserWorkItem (AddTrackList, cached_list);
            } else {
                AddTrackList (cached_list);
            }
            return true;
        }