[gnome-photos/wip/rishi/manager-model: 4/6] base-manager: Directly access the GHashTable in remove_object_by_id
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/manager-model: 4/6] base-manager: Directly access the GHashTable in remove_object_by_id
- Date: Thu, 10 Nov 2016 11:10:37 +0000 (UTC)
commit 53eed6bce6f5e5d5bd556396446af413d3abf202
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 31ce0be..ba0f5cb 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]