private void FindNowPlaying() { foreach (var src in ServiceManager.SourceManager.Sources) { if (src.UniqueId.Contains("now-playing")) { now_playing = src; break; } } if (now_playing != null) { return; } Banshee.ServiceStack.ServiceManager.SourceManager.SourceAdded += (args) => { if (now_playing == null && args.Source.UniqueId.Contains("now-playing")) { now_playing = args.Source; } }; }
public virtual bool ContainsChildSource(Source child) { lock (Children) { return(child_sources.Contains(child)); } }
public virtual void SetParentSource(Source parent) { this.parent = parent; }
public virtual void MergeSourceInput(Source source, SourceMergeType mergeType) { Log.ErrorFormat("MergeSourceInput not implemented by {0}", this); }
public virtual bool AcceptsUserInputFromSource(Source source) { return(AcceptsInputFromSource(source)); }
public virtual bool AcceptsInputFromSource(Source source) { return(false); }
protected virtual void HandleTracksDeleted(Source sender, TrackEventArgs args) { }
public DatabaseSource(string generic_name, string name, string id, int order, Source parent) : base(generic_name, name, order, id) { if (parent != null) { SetParentSource(parent); } DatabaseSourceInitialize(); }
public bool AddSelectedTracks(Source source) { var track_src = source as ITrackModelSource; return(AddSelectedTracks(source, track_src == null ? null : track_src.TrackModel.Selection)); }
public override bool AcceptsUserInputFromSource(Source source) { return(base.AcceptsUserInputFromSource(source) && CanAddTracks); }
public override bool AcceptsInputFromSource(Source source) { return(CanAddTracks && source != this); }