aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-21 02:49:12 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-21 02:49:12 +0800
commit15dda78fbc8c5fa6e942b8e6098689678914b7c5 (patch)
tree7822e355ba7f728601913ef0c28bb847e2f1d9af /libempathy
parentbaa418e11bf914a99a5ce40d12c964cb394e0e63 (diff)
downloadgsoc2013-empathy-15dda78fbc8c5fa6e942b8e6098689678914b7c5.tar
gsoc2013-empathy-15dda78fbc8c5fa6e942b8e6098689678914b7c5.tar.gz
gsoc2013-empathy-15dda78fbc8c5fa6e942b8e6098689678914b7c5.tar.bz2
gsoc2013-empathy-15dda78fbc8c5fa6e942b8e6098689678914b7c5.tar.lz
gsoc2013-empathy-15dda78fbc8c5fa6e942b8e6098689678914b7c5.tar.xz
gsoc2013-empathy-15dda78fbc8c5fa6e942b8e6098689678914b7c5.tar.zst
gsoc2013-empathy-15dda78fbc8c5fa6e942b8e6098689678914b7c5.zip
When getting an account for an unknown path automagically create the new account object
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-account-manager.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index bd27fae54..83de26c67 100644
--- a/libempathy/empathy-account-manager.c
+++ b/libempathy/empathy-account-manager.c
@@ -332,8 +332,8 @@ account_manager_account_ready_cb (GObject *obj,
empathy_account_manager_check_ready (manager);
}
-static EmpathyAccount *
-account_manager_add_account (EmpathyAccountManager *manager,
+EmpathyAccount *
+empathy_account_manager_get_account (EmpathyAccountManager *manager,
const gchar *path)
{
EmpathyAccountManagerPriv *priv = GET_PRIV (manager);
@@ -376,7 +376,7 @@ account_manager_got_all_cb (TpProxy *proxy,
{
gchar *name = g_ptr_array_index (accounts, i);
- account_manager_add_account (manager, name);
+ empathy_account_manager_get_account (manager, name);
}
empathy_account_manager_check_ready (manager);
@@ -394,7 +394,7 @@ account_validity_changed_cb (TpAccountManager *proxy,
if (!valid)
return;
- account_manager_add_account (manager, path);
+ empathy_account_manager_get_account (manager, path);
}
static void
@@ -757,15 +757,6 @@ empathy_account_manager_get_account_for_connection (
return NULL;
}
-EmpathyAccount *
-empathy_account_manager_get_account (EmpathyAccountManager *manager,
- const gchar *unique_name)
-{
- EmpathyAccountManagerPriv *priv = GET_PRIV (manager);
-
- return g_hash_table_lookup (priv->accounts, unique_name);
-}
-
GList *
empathy_account_manager_dup_accounts (EmpathyAccountManager *manager)
{
@@ -915,7 +906,7 @@ empathy_account_manager_created_cb (TpAccountManager *proxy,
return;
}
- account = account_manager_add_account (manager, account_path);
+ account = empathy_account_manager_get_account (manager, account_path);
g_hash_table_insert (priv->create_results, account, my_res);
}