static void account_enabled_cb (GObject *source, GAsyncResult *result, gpointer user_data) { TpAccount *account = TP_ACCOUNT (source); GError *error = NULL; TpAccountManager *account_mgr; if (!tp_account_set_enabled_finish (account, result, &error)) { DEBUG ("Failed to enable account: %s", error->message); g_error_free (error); return; } account_mgr = tp_account_manager_dup (); tpaw_connect_new_account (account, account_mgr); g_object_unref (account_mgr); }
static void account_widget_account_enabled_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GError *error = NULL; TpAccount *account = TP_ACCOUNT (source_object); EmpathyAccountWidget *widget = EMPATHY_ACCOUNT_WIDGET (user_data); EmpathyAccountWidgetPriv *priv = GET_PRIV (widget); tp_account_set_enabled_finish (account, res, &error); if (error != NULL) { DEBUG ("Could not automatically enable new account: %s", error->message); g_error_free (error); } else { priv->account_created = TRUE; g_signal_emit (widget, signals[ACCOUNT_CREATED], 0); } }