[gnome-photos] embed: Special-case loading of collections



commit 1ff68c94771a46891071f67317e4f8d8ee43fd95
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Apr 8 15:24:31 2013 +0200

    embed: Special-case loading of collections
    
    Collections are not supposed to be loaded with photos_base_item_load.
    If an active item is a collection, then the call to get_where will
    take care of showing only items from that collection.

 src/photos-embed.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index 7df7561..7c841bc 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -139,9 +139,11 @@ photos_embed_active_changed (PhotosBaseManager *manager, GObject *object, gpoint
   if (object == NULL)
     return;
 
-  /* TODO: CollectionManager */
-
   photos_embed_clear_load_timer (self);
+
+  if (photos_base_item_is_collection (PHOTOS_BASE_ITEM (object)))
+    return;
+
   priv->load_show_id = g_timeout_add (400, photos_embed_load_show_timeout, g_object_ref (self));
 
   priv->loader_cancellable = g_cancellable_new ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]