[gnome-software/gnome-3-22] Revert "Fix weirdness when de-duplicating applications"
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] Revert "Fix weirdness when de-duplicating applications"
- Date: Wed, 12 Oct 2016 08:17:58 +0000 (UTC)
commit 5e1a6a1f3243a8ee2b5ecddb076a6ae0b1030fe0
Author: Kalev Lember <klember redhat com>
Date: Wed Oct 12 07:52:50 2016 +0200
Revert "Fix weirdness when de-duplicating applications"
This caused packagekit and flatpak apps to get merged together when
de-duplicating popular/featured apps, making packagekit installed
popular/featured apps impossible to remove. Revert this commit for now
to get 3.22.1 release out.
This reverts commit 73fed63fc55482603dda31ecf67224c89abe0d31.
src/gs-app-list.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-app-list.c b/src/gs-app-list.c
index 6919eb8..fd5b425 100644
--- a/src/gs-app-list.c
+++ b/src/gs-app-list.c
@@ -102,7 +102,7 @@ gs_app_list_add_safe (GsAppList *list, GsApp *app)
/* just use the ref */
g_ptr_array_add (list->array, g_object_ref (app));
- g_hash_table_insert (list->hash_by_id, g_strdup (id), g_object_ref (app));
+ g_hash_table_insert (list->hash_by_id, (gpointer) id, (gpointer) app);
}
/**
@@ -434,10 +434,8 @@ gs_app_list_init (GsAppList *list)
g_mutex_init (&list->mutex);
list->array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
#if AS_CHECK_VERSION(0,6,2)
- list->hash_by_id = g_hash_table_new_full ((GHashFunc) as_utils_unique_id_hash,
- (GEqualFunc) as_utils_unique_id_equal,
- g_free,
- (GDestroyNotify) g_object_unref);
+ list->hash_by_id = g_hash_table_new ((GHashFunc) as_utils_unique_id_hash,
+ (GEqualFunc) as_utils_unique_id_equal);
#else
list->hash_by_id = g_hash_table_new (g_str_hash, g_str_equal);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]