* Fixes NB#92030
[modest] / src / maemo / modest-default-account-settings-dialog.c
index e4d8b51..0e14a4d 100644 (file)
@@ -507,7 +507,8 @@ on_button_signature (GtkButton *button, gpointer user_data)
 
        /* Show the window: */  
        modest_window_mgr_set_modal (modest_runtime_get_window_mgr (),
-                                    GTK_WINDOW (priv->signature_dialog));
+                                    GTK_WINDOW (priv->signature_dialog),
+                                    GTK_WINDOW (self));
 
        response = gtk_dialog_run (GTK_DIALOG (priv->signature_dialog));
        gtk_widget_hide (priv->signature_dialog);
@@ -776,7 +777,8 @@ on_button_outgoing_smtp_servers (GtkButton *button, gpointer user_data)
        modest_connection_specific_smtp_window_fill_with_connections (smtp_win, priv->account_manager);
 
        /* Show the window: */  
-       modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (smtp_win));
+       modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), 
+                                    GTK_WINDOW (smtp_win), GTK_WINDOW (self));
        gtk_widget_show (GTK_WIDGET (smtp_win));
        priv->modified = TRUE;
 }
@@ -1099,6 +1101,8 @@ on_response (GtkDialog *wizard_dialog,
                /* 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) {
@@ -1206,6 +1210,10 @@ modest_default_account_settings_dialog_init (ModestDefaultAccountSettingsDialog
     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());
 }