[empathy] Don't need to set back if it is the same hashtable



commit 5bdfd49c15348d8d9ae3ca7f24ab942e052e3a3f
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date:   Tue May 26 16:09:37 2009 -0400

    Don't need to set back if it is the same hashtable
    
    This code was ugly, by removing the ref, unref and the set call,
    the code is much simpler.  The other objects will still be notified
    of the changes.
---
 src/empathy-map-view.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index 8c6dc54..17d73d6 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -216,11 +216,7 @@ map_view_geocode_cb (GeoclueGeocode *geocode,
 
   /* Don't change the accuracy as we used an address to get this position */
 
-  /* Ref the location hash table as it will be unref'd in set_location, 
-   * and we are only updating it */
-  g_hash_table_ref (location);
-  empathy_contact_set_location (EMPATHY_CONTACT (userdata), location);
-  g_hash_table_unref (location);
+  g_object_notify (userdata, "location");
 }
 #endif
 



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