aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-30 23:35:38 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-30 23:35:38 +0800
commitc9ef23052d2e5007e6120dcc881d6c382fcf48d3 (patch)
tree04092618e0d66d391e2f0b8cf6c190e4b45fb84e /src
parent237c4ac2d8d1b008a0c34aa24fc63eb3a1c0c91d (diff)
downloadgsoc2013-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 'src')
-rw-r--r--src/empathy-chat-window.c4
-rw-r--r--src/empathy.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 9694a653c..47ef37c42 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1269,7 +1269,7 @@ chat_window_drag_data_received (GtkWidget *widget,
strv = g_strsplit (id, "/", 2);
account_id = strv[0];
contact_id = strv[1];
- account = empathy_account_manager_lookup (account_manager, account_id);
+ account = empathy_account_manager_get_account (account_manager, account_id);
chat = empathy_chat_window_find_chat (account, contact_id);
if (!chat) {
@@ -1282,11 +1282,9 @@ chat_window_drag_data_received (GtkWidget *widget,
connection, contact_id, NULL, NULL);
}
- g_object_unref (account);
g_strfreev (strv);
return;
}
- g_object_unref (account);
g_object_unref (account_manager);
g_strfreev (strv);
diff --git a/src/empathy.c b/src/empathy.c
index 4e824bcb4..956b05e5f 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -113,7 +113,7 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
manager = empathy_account_manager_dup_singleton ();
connection = empathy_tp_chat_get_connection (tp_chat);
- account = empathy_account_manager_get_account (manager,
+ account = empathy_account_manager_get_account_for_connection (manager,
connection);
chat = empathy_chat_window_find_chat (account, id);
g_object_unref (manager);