diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-07-30 23:35:38 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-07-30 23:35:38 +0800 |
commit | c9ef23052d2e5007e6120dcc881d6c382fcf48d3 (patch) | |
tree | 04092618e0d66d391e2f0b8cf6c190e4b45fb84e /libempathy-gtk | |
parent | 237c4ac2d8d1b008a0c34aa24fc63eb3a1c0c91d (diff) | |
download | gsoc2013-empathy-c9ef23052d2e5007e6120dcc881d6c382fcf48d3.tar gsoc2013-empathy-c9ef23052d2e5007e6120dcc881d6c382fcf48d3.tar.gz gsoc2013-empathy-c9ef23052d2e5007e6120dcc881d6c382fcf48d3.tar.bz2 gsoc2013-empathy-c9ef23052d2e5007e6120dcc881d6c382fcf48d3.tar.lz gsoc2013-empathy-c9ef23052d2e5007e6120dcc881d6c382fcf48d3.tar.xz gsoc2013-empathy-c9ef23052d2e5007e6120dcc881d6c382fcf48d3.tar.zst gsoc2013-empathy-c9ef23052d2e5007e6120dcc881d6c382fcf48d3.zip |
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
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 6 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 2 |
2 files changed, 5 insertions, 3 deletions
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); diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 783d986d0..2ff27b130 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -302,7 +302,7 @@ contact_list_view_drag_data_received (GtkWidget *view, account_id = strv[0]; contact_id = strv[1]; account_manager = empathy_account_manager_dup_singleton (); - account = empathy_account_manager_lookup (account_manager, account_id); + account = empathy_account_manager_get_account (account_manager, account_id); if (account) { TpConnection *connection; |