public void Enqueue(ClutterFlowAlbum cover)
 {
     if (!cover.Enqueued) {
         cover.Enqueued = true;
         LookupQueue.Enqueue (cover);
         Start ();
     }
 }
 private void SetCoverToSurface(ClutterFlowAlbum cover, Cairo.ImageSurface surface)
 {
     cover.Enqueued = false;
         //cover.SwappedToDefault = false;
         ClutterFlowActor.MakeReflection (surface, cover.Cover);
 }
 private void HandleActorActivated(ClutterFlowAlbum actor, EventArgs e)
 {
     UpdateAlbum (actor);
 }
 public void UpdateAlbum(ClutterFlowAlbum actor)
 {
     ActiveAlbum = actor.Album;
     ActiveIndex = actor.Index;
     if (UpdatedAlbum!=null)	UpdatedAlbum (ActiveAlbum, EventArgs.Empty);
 }
 private ClutterFlowBaseActor AddActorToList(AlbumInfo generator, SortedList<AlbumInfo, ClutterFlowBaseActor> list, CoverManager cover_manager)
 {
     if (generator == null) {
         generator = new AlbumInfo (AlbumInfo.UnknownAlbumTitle);
     }
     string key = ClutterFlowAlbum.CreateCacheKey(generator);
     ClutterFlowBaseActor actor = null;
     if (!Cache.TryGetValue (key, out actor)) {
         actor = new ClutterFlowAlbum (generator, cover_manager);
         actor.Hide ();
         Cache.Add (key, actor);
     }
     actor.SortLabel = Comparer.GetSortLabel (generator);
     list[generator] = actor;
     actor.Index = list.Count;
     return actor;
 }
 private void LoadUnthreaded(ClutterFlowAlbum cover)
 {
     float size = cover.CoverManager.TextureSize;
     string cache_id = cover.PbId;
     Cairo.ImageSurface surface = artwork_manager.LookupScaleSurface(cache_id, (int) size);
     if (surface!=null) {
         SetCoverToSurface(cover, surface);
     }
 }
 public void Enqueue(ClutterFlowAlbum cover)
 {
     if (!cover.Enqueued) {
         cover.Enqueued = true;
         if (threaded) {
             LookupQueue.Enqueue (cover);
             Start ();
         } else
             LoadUnthreaded (cover);
     }
 }