aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-02-08 09:16:15 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-02-08 09:16:15 +0800
commit3b38e04da561f15963156302cac923e22a895936 (patch)
treef26531e69c16e6ef3858aedc615fc388c2758735 /libempathy-gtk
parent02cc922c2b3b8c0a511c95c0da5f4536ed94142c (diff)
downloadgsoc2013-empathy-3b38e04da561f15963156302cac923e22a895936.tar
gsoc2013-empathy-3b38e04da561f15963156302cac923e22a895936.tar.gz
gsoc2013-empathy-3b38e04da561f15963156302cac923e22a895936.tar.bz2
gsoc2013-empathy-3b38e04da561f15963156302cac923e22a895936.tar.lz
gsoc2013-empathy-3b38e04da561f15963156302cac923e22a895936.tar.xz
gsoc2013-empathy-3b38e04da561f15963156302cac923e22a895936.tar.zst
gsoc2013-empathy-3b38e04da561f15963156302cac923e22a895936.zip
Don't need to prepare accounts separately
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-blocking-dialog.c41
1 files changed, 11 insertions, 30 deletions
diff --git a/libempathy-gtk/empathy-contact-blocking-dialog.c b/libempathy-gtk/empathy-contact-blocking-dialog.c
index 5cb3d4e76..c378db3f6 100644
--- a/libempathy-gtk/empathy-contact-blocking-dialog.c
+++ b/libempathy-gtk/empathy-contact-blocking-dialog.c
@@ -223,7 +223,7 @@ contact_blocking_dialog_deny_channel_members_changed (TpChannel *channel,
tp_intset_destroy (removed_set);
}
-DECLARE_CALLBACK (contact_blocking_dialog_account_prepared);
+DECLARE_CALLBACK (contact_blocking_dialog_connection_prepared);
static void
contact_blocking_dialog_am_prepared (GObject *am,
@@ -246,40 +246,21 @@ contact_blocking_dialog_am_prepared (GObject *am,
for (ptr = accounts; ptr != NULL; ptr = ptr->next)
{
TpAccount *account = ptr->data;
+ TpConnection *conn;
- tp_proxy_prepare_async (account, NULL,
- contact_blocking_dialog_account_prepared, self);
- }
-
- g_list_free (accounts);
-}
+ g_signal_connect (account, "status-changed",
+ G_CALLBACK (contact_blocking_dialog_connection_status_changed), self);
-static void
-contact_blocking_dialog_account_prepared (GObject *account,
- GAsyncResult *result,
- gpointer user_data)
-{
- EmpathyContactBlockingDialog *self = user_data;
- TpConnection *conn;
- GError *error = NULL;
+ conn = tp_account_get_connection (TP_ACCOUNT (account));
- if (!tp_proxy_prepare_finish (account, result, &error))
- {
- DEBUG ("Could not prepare Account: %s", error->message);
- g_error_free (error);
- return;
+ if (conn != NULL)
+ {
+ tp_proxy_prepare_async (conn, NULL,
+ contact_blocking_dialog_connection_prepared, self);
+ }
}
- g_signal_connect (account, "status-changed",
- G_CALLBACK (contact_blocking_dialog_connection_status_changed), self);
-
- conn = tp_account_get_connection (TP_ACCOUNT (account));
-
- if (conn != NULL)
- {
- tp_proxy_prepare_async (conn, NULL,
- contact_blocking_dialog_connection_prepared, self);
- }
+ g_list_free (accounts);
}
static void contact_blocking_dialog_got_deny_channel (TpConnection *,