diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-07-22 02:02:37 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-07-22 02:02:37 +0800 |
commit | 067e77dceb1e0c01f33ce4c743e88c7214403b8a (patch) | |
tree | 67af09c0c3cfc0f5754549ee5e1bc4ad637a8f01 /libempathy/empathy-account-manager.c | |
parent | 08c068fc1b90777c3a2b9c313e282f93f24b3f71 (diff) | |
download | gsoc2013-empathy-067e77dceb1e0c01f33ce4c743e88c7214403b8a.tar gsoc2013-empathy-067e77dceb1e0c01f33ce4c743e88c7214403b8a.tar.gz gsoc2013-empathy-067e77dceb1e0c01f33ce4c743e88c7214403b8a.tar.bz2 gsoc2013-empathy-067e77dceb1e0c01f33ce4c743e88c7214403b8a.tar.lz gsoc2013-empathy-067e77dceb1e0c01f33ce4c743e88c7214403b8a.tar.xz gsoc2013-empathy-067e77dceb1e0c01f33ce4c743e88c7214403b8a.tar.zst gsoc2013-empathy-067e77dceb1e0c01f33ce4c743e88c7214403b8a.zip |
Add removed signal on EmpathyAccount
Diffstat (limited to 'libempathy/empathy-account-manager.c')
-rw-r--r-- | libempathy/empathy-account-manager.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c index 5d1363fce..7339acb9f 100644 --- a/libempathy/empathy-account-manager.c +++ b/libempathy/empathy-account-manager.c @@ -221,6 +221,20 @@ signal: } static void +emp_account_removed_cb (EmpathyAccount *account, gpointer user_data) +{ + EmpathyAccountManager *manager = EMPATHY_ACCOUNT_MANAGER (user_data); + EmpathyAccountManagerPriv *priv = GET_PRIV (manager); + + g_object_ref (account); + g_hash_table_remove (priv->accounts, + empathy_account_get_unique_name (account)); + + g_signal_emit (manager, signals[ACCOUNT_DELETED], 0, account); + g_object_unref (account); +} + +static void empathy_account_manager_check_ready (EmpathyAccountManager *manager) { EmpathyAccountManagerPriv *priv = GET_PRIV (manager); @@ -272,6 +286,9 @@ emp_account_ready_cb (GObject *obj, GParamSpec *spec, gpointer user_data) g_signal_connect (account, "presence-changed", G_CALLBACK (emp_account_presence_changed_cb), manager); + g_signal_connect (account, "removed", + G_CALLBACK (emp_account_removed_cb), manager); + empathy_account_manager_check_ready (manager); } |