- if (!folder_store) {
-
- /* We promise to instantly perform the callback, so ... */
- if (callback) {
- callback (FALSE, NULL, parent_window, NULL, user_data);
- }
- return;
-
- /* Original comment: Maybe it is something local. */
- /* PVH's comment: maybe we should KNOW this in stead of assuming? */
-
- }
-
- if (TNY_IS_FOLDER (folder_store)) {
- /* Get the folder's parent account: */
- TnyAccount *account = tny_folder_get_account(TNY_FOLDER (folder_store));
- if (account != NULL) {
- modest_platform_connect_and_perform_if_network_account (NULL, account, callback, user_data);
- g_object_unref (account);
- }
- } else if (TNY_IS_ACCOUNT (folder_store)) {
- /* Use the folder store as an account: */
- modest_platform_connect_and_perform_if_network_account (NULL, TNY_ACCOUNT (folder_store), callback, user_data);
- }
-
- return;
+ DoubleConnectionInfo *info = (DoubleConnectionInfo *) user_data;
+
+ if (canceled || err) {
+ /* If there was any error call the user callback */
+ info->callback (canceled, err, parent_window, src_account, info->data);
+ } else {
+ /* Connect the destination account */
+ modest_platform_connect_if_remote_and_perform (parent_window, TRUE,
+ TNY_FOLDER_STORE (info->dst_account),
+ info->callback, info->data);
+ }
+
+ /* Free the info object */
+ g_object_unref (info->dst_account);
+ g_slice_free (DoubleConnectionInfo, info);
+}
+
+
+void
+modest_platform_double_connect_and_perform (GtkWindow *parent_window,
+ gboolean force,
+ TnyFolderStore *folder_store,
+ DoubleConnectionInfo *connect_info)
+{
+ modest_platform_connect_if_remote_and_perform(parent_window,
+ force,
+ folder_store,
+ src_account_connect_performer,
+ connect_info);
+}
+
+GtkWidget *
+modest_platform_get_account_settings_dialog (ModestAccountSettings *settings)
+{
+ ModestAccountSettingsDialog *dialog = modest_account_settings_dialog_new ();
+
+ modest_account_settings_dialog_set_account (dialog, settings);
+ return GTK_WIDGET (dialog);
+}
+
+GtkWidget *
+modest_platform_get_account_settings_wizard ()
+{
+ ModestEasysetupWizardDialog *dialog = modest_easysetup_wizard_dialog_new ();
+
+ return GTK_WIDGET (dialog);