[gnome-photos] base-manager: Directly access the GHashTable in remove_object_by_id



commit b456d561755f520fcd5fe199e5c2e2f0074808ae
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Nov 8 09:53:14 2016 +0100

    base-manager: Directly access the GHashTable in remove_object_by_id
    
    Once we implement the GListModel interface, the GHashTable will have
    more than just the GObject, which we will need during removal.
    Therefore, photos_base_manager_get_object_by_id won't be enough.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774191

 src/photos-base-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-base-manager.c b/src/photos-base-manager.c
index 08220b3..777ce67 100644
--- a/src/photos-base-manager.c
+++ b/src/photos-base-manager.c
@@ -135,7 +135,7 @@ photos_base_manager_default_remove_object_by_id (PhotosBaseManager *self, const
 
   priv = photos_base_manager_get_instance_private (self);
 
-  object = photos_base_manager_get_object_by_id (self, id);
+  object = g_hash_table_lookup (priv->objects, id);
   if (object == NULL)
     return;
 


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