[empathy] compare accounts using their object paths rather than their TpAccount



commit faa8d609e0c6bcb70a61f1e78ea97d0557a98942
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Aug 12 11:12:34 2010 +0200

    compare accounts using their object paths rather than their TpAccount
    
    It's safer and we could have 2 proxies for the same Account.

 libempathy-gtk/empathy-log-window.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index ed2f140..5e67099 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -821,7 +821,9 @@ log_manager_got_chats_cb (GObject *manager,
 					COL_CHAT_IS_CHATROOM, hit->is_chatroom,
 					-1);
 
-			select_account = (hit->account == window->selected_account);
+			if (!tp_strdiff (tp_proxy_get_object_path (hit->account),
+			    tp_proxy_get_object_path (window->selected_account)))
+				select_account = TRUE;
 
 			/* FIXME: Update COL_CHAT_ICON/NAME */
 			if (hit->is_chatroom) {



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