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 --- megaphone/src/megaphone-applet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'megaphone') diff --git a/megaphone/src/megaphone-applet.c b/megaphone/src/megaphone-applet.c index 1ef88ebc1..c269c7c7d 100644 --- a/megaphone/src/megaphone-applet.c +++ b/megaphone/src/megaphone-applet.c @@ -443,7 +443,7 @@ megaphone_applet_set_contact (MegaphoneApplet *applet, /* Lookup the new contact */ if (str) { strv = g_strsplit (str, "/", 2); - priv->account = empathy_account_manager_lookup (priv->account_manager, + priv->account = empathy_account_manager_get_account (priv->account_manager, strv[0]); priv->id = strv[1]; g_free (strv[0]); @@ -451,6 +451,7 @@ megaphone_applet_set_contact (MegaphoneApplet *applet, } if (priv->account) { + g_object_ref (priv->account); connection = empathy_account_get_connection (priv->account); if (connection) { megaphone_applet_new_connection_cb (priv->account_manager, -- cgit v1.2.3