empathy r757 - trunk/libempathy-gtk



Author: xclaesse
Date: Tue Mar 11 12:22:41 2008
New Revision: 757
URL: http://svn.gnome.org/viewvc/empathy?rev=757&view=rev

Log:
Remove useless empathy_contact_run_until_ready and use tp_strdiff instead of strcmp


Modified:
   trunk/libempathy-gtk/empathy-private-chat.c

Modified: trunk/libempathy-gtk/empathy-private-chat.c
==============================================================================
--- trunk/libempathy-gtk/empathy-private-chat.c	(original)
+++ trunk/libempathy-gtk/empathy-private-chat.c	Tue Mar 11 12:22:41 2008
@@ -34,6 +34,7 @@
 #include <glib/gi18n.h>
 
 #include <libmissioncontrol/mission-control.h>
+#include <telepathy-glib/util.h>
 
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-tp-chat.h>
@@ -105,10 +106,6 @@
 	priv->contact = empathy_contact_factory_get_from_handle (priv->factory,
 								 account,
 								 tp_chan->handle);
-	empathy_contact_run_until_ready (priv->contact,
-					 EMPATHY_CONTACT_READY_ID |
-					 EMPATHY_CONTACT_READY_NAME,
-					 NULL);
 
 	priv->name = g_strdup (empathy_contact_get_name (priv->contact));
 
@@ -271,7 +268,7 @@
 
 	priv = GET_PRIV (chat);
 
-	if (strcmp (priv->name, empathy_contact_get_name (contact)) != 0) {
+	if (tp_strdiff (priv->name, empathy_contact_get_name (contact))) {
 		g_free (priv->name);
 		priv->name = g_strdup (empathy_contact_get_name (contact));
 		g_signal_emit_by_name (chat, "name-changed", priv->name);



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