diff options
author | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-04-30 04:57:05 +0800 |
---|---|---|
committer | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-06-07 00:30:52 +0800 |
commit | d4989c9be7b3c6fa016d703e2a32774d5f74f836 (patch) | |
tree | 7ca8d3925a8955a702c14624eaad66f9a9becdb7 /libempathy | |
parent | 202af99a8fe154b9d03c2d569287fa01f70c0bc6 (diff) | |
download | gsoc2013-empathy-d4989c9be7b3c6fa016d703e2a32774d5f74f836.tar gsoc2013-empathy-d4989c9be7b3c6fa016d703e2a32774d5f74f836.tar.gz gsoc2013-empathy-d4989c9be7b3c6fa016d703e2a32774d5f74f836.tar.bz2 gsoc2013-empathy-d4989c9be7b3c6fa016d703e2a32774d5f74f836.tar.lz gsoc2013-empathy-d4989c9be7b3c6fa016d703e2a32774d5f74f836.tar.xz gsoc2013-empathy-d4989c9be7b3c6fa016d703e2a32774d5f74f836.tar.zst gsoc2013-empathy-d4989c9be7b3c6fa016d703e2a32774d5f74f836.zip |
Adapt to API change in folks_backend_get_persona_stores().
Helps: bgo#648822 - Port Empathy to Folks 0.5.1
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-individual-manager.c | 6 | ||||
-rw-r--r-- | libempathy/empathy-utils.c | 15 |
2 files changed, 11 insertions, 10 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c index 00e685c68..69e62f1a7 100644 --- a/libempathy/empathy-individual-manager.c +++ b/libempathy/empathy-individual-manager.c @@ -388,7 +388,8 @@ empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self, FolksBackendStore *backend_store; FolksBackend *backend; FolksPersonaStore *persona_store; - GHashTable* details, *persona_stores; + GHashTable* details; + GeeMap *persona_stores; TpAccount *account; const gchar *store_id; @@ -420,7 +421,7 @@ empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self, } persona_stores = folks_backend_get_persona_stores (backend); - persona_store = g_hash_table_lookup (persona_stores, store_id); + persona_store = gee_map_get (persona_stores, store_id); if (persona_store == NULL) { @@ -438,6 +439,7 @@ empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self, aggregator_add_persona_from_details_cb, contact); g_hash_table_destroy (details); + g_object_unref (persona_store); finish: tp_clear_object (&backend); diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index bdec98833..4d6506b6e 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -858,14 +858,14 @@ empathy_dup_persona_store_for_connection (TpConnection *connection) "telepathy"); if (backend != NULL) { - GHashTable *stores_hash; - GList *stores, *l; + GeeMap *stores_map; + GeeMapIterator *iter; - stores_hash = folks_backend_get_persona_stores (backend); - stores = g_hash_table_get_values (stores_hash); - for (l = stores; l != NULL && result == NULL; l = l->next) + stores_map = folks_backend_get_persona_stores (backend); + iter = gee_map_map_iterator (stores_map); + while (gee_map_iterator_next (iter)) { - TpfPersonaStore *persona_store = TPF_PERSONA_STORE (l->data); + TpfPersonaStore *persona_store = gee_map_iterator_get_value (iter); TpAccount *account; TpConnection *conn_cur; @@ -874,8 +874,7 @@ empathy_dup_persona_store_for_connection (TpConnection *connection) if (conn_cur == connection) result = persona_store; } - - g_list_free (stores); + g_clear_object (&iter); } g_object_unref (backend); |