diff options
Diffstat (limited to 'libempathy-gtk/empathy-individual-dialogs.c')
-rw-r--r-- | libempathy-gtk/empathy-individual-dialogs.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-individual-dialogs.c b/libempathy-gtk/empathy-individual-dialogs.c index edfb3fd48..f262772c6 100644 --- a/libempathy-gtk/empathy-individual-dialogs.c +++ b/libempathy-gtk/empathy-individual-dialogs.c @@ -43,8 +43,10 @@ static GtkWidget *new_individual_dialog = NULL; * New contact dialog */ -static gboolean +static void can_add_contact_to_account (TpAccount *account, + EmpathyAccountChooserFilterResultCallback callback, + gpointer callback_data, gpointer user_data) { EmpathyIndividualManager *individual_manager; @@ -53,14 +55,17 @@ can_add_contact_to_account (TpAccount *account, connection = tp_account_get_connection (account); if (connection == NULL) - return FALSE; + { + callback (FALSE, callback_data); + return; + } individual_manager = empathy_individual_manager_dup_singleton (); result = empathy_individual_manager_get_flags_for_connection ( individual_manager, connection) & EMPATHY_INDIVIDUAL_MANAGER_CAN_ADD; g_object_unref (individual_manager); - return result; + callback (result, callback_data); } static void |