From c9ef23052d2e5007e6120dcc881d6c382fcf48d3 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Thu, 30 Jul 2009 17:35:38 +0200 Subject: Chang the API of AccountManager to have the get lookup the account by name EmpathyAccountManager used to have a _lookup function that looked up accounts by name and a _get function that lookup up accounts by connection. This is confusing, as looking up an account for a connection is less common rename have the _get_account be the same _lookup (but without returning a ref) and add a _get_account_for_connection function lookup by account --- libempathy-gtk/empathy-chat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libempathy-gtk/empathy-chat.c') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 0358b0ada..d52d7af93 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -203,7 +203,8 @@ chat_new_connection_cb (EmpathyAccountManager *manager, EmpathyChatPriv *priv = GET_PRIV (chat); EmpathyAccount *account; - account = empathy_account_manager_get_account (manager, connection); + account = empathy_account_manager_get_account_for_connection (manager, + connection); if (!priv->tp_chat && account == priv->account && priv->handle_type != TP_HANDLE_TYPE_NONE && !EMP_STR_EMPTY (priv->id)) { @@ -1766,7 +1767,8 @@ empathy_chat_set_tp_chat (EmpathyChat *chat, priv->tp_chat = g_object_ref (tp_chat); connection = empathy_tp_chat_get_connection (priv->tp_chat); - priv->account = empathy_account_manager_get_account (priv->account_manager, + priv->account = empathy_account_manager_get_account_for_connection ( + priv->account_manager, connection); g_object_ref (priv->account); -- cgit v1.2.3