/* Don't let the dialog close */
g_signal_stop_emission_by_name (wizard_dialog, "response");
return;
+ } else {
+ modest_tny_account_store_set_send_mail_blocked (modest_runtime_get_account_store (), FALSE);
}
if (response_id == GTK_RESPONSE_OK) {
store_account_name = modest_server_account_settings_get_account_name (store_settings);
transport_account_name = modest_server_account_settings_get_account_name (transport_settings);
+ modest_mail_operation_queue_cancel_all (modest_runtime_get_mail_operation_queue());
if (store_account_name) {
modest_account_mgr_notify_account_update (self->account_manager,
store_account_name);
g_object_unref (store_settings);
g_object_unref (transport_settings);
- if (!self->save_password)
- hildon_banner_show_information(NULL, NULL, _("mcen_ib_advsetup_settings_saved"));
+ hildon_banner_show_information(NULL, NULL, _("mcen_ib_advsetup_settings_saved"));
}
} else {
hildon_banner_show_information (NULL, NULL, _("mail_ib_setting_failed"));
G_CALLBACK (on_response), self);
self->modified = FALSE;
- self->save_password = FALSE;
/* When this window is shown, hibernation should not be possible,
* because there is no sensible way to save the state: */
modest_window_mgr_prevent_hibernation_while_window_is_shown (
modest_runtime_get_window_mgr (), GTK_WINDOW (self));
+ /* Prevent sending mails while editing an account, to avoid hangs on unprotected locks
+ * while sending messages causes an error dialog and we have a lock */
+ modest_tny_account_store_set_send_mail_blocked (modest_runtime_get_account_store (), TRUE);
+
hildon_help_dialog_help_enable (GTK_DIALOG(self), "applications_email_accountsettings",
modest_maemo_utils_get_osso_context());
}
}
-void
-modest_account_settings_dialog_save_password (ModestAccountSettingsDialog *dialog)
-{
- g_return_if_fail (MODEST_IS_ACCOUNT_SETTINGS_DIALOG (dialog));
-
- dialog->save_password = TRUE;
- dialog->modified = TRUE;
-}
-
-
static void
modest_account_settings_dialog_class_init (ModestAccountSettingsDialogClass *klass)
{