예제 #1
0
        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;
                }
            };
        }
예제 #2
0
 public virtual bool ContainsChildSource(Source child)
 {
     lock (Children) {
         return(child_sources.Contains(child));
     }
 }
예제 #3
0
 public virtual void SetParentSource(Source parent)
 {
     this.parent = parent;
 }
예제 #4
0
 public virtual void MergeSourceInput(Source source, SourceMergeType mergeType)
 {
     Log.ErrorFormat("MergeSourceInput not implemented by {0}", this);
 }
예제 #5
0
 public virtual bool AcceptsUserInputFromSource(Source source)
 {
     return(AcceptsInputFromSource(source));
 }
예제 #6
0
 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);
 }