* Fixes NB@63545
[modest] / src / maemo / modest-account-settings-dialog.c
index 34f183f..12656cb 100644 (file)
@@ -260,19 +260,30 @@ static GtkWidget* create_caption_new_with_asterisk(ModestAccountSettingsDialog *
 static void
 on_entry_invalid_account_title_character (ModestValidatingEntry *self, const gchar* character, gpointer user_data)
 {
 static void
 on_entry_invalid_account_title_character (ModestValidatingEntry *self, const gchar* character, gpointer user_data)
 {
-       gchar *message = g_strdup_printf (_CS("ckdg_ib_illegal_characters_entered"),
-                                         "\\ / : * ? \" < > | ^");
-       show_error (GTK_WIDGET (self), message);
+       gchar *tmp, *msg;
+                       
+       tmp = g_strndup (account_title_forbidden_chars, ACCOUNT_TITLE_FORBIDDEN_CHARS_LENGTH);
+       msg = g_strdup_printf (_CS("ckdg_ib_illegal_characters_entered"), tmp);
+
+       show_error (GTK_WIDGET (self), msg);
+
+       g_free (msg);
+       g_free (tmp);
 }
 
 static void
 on_entry_invalid_fullname_character (ModestValidatingEntry *self, const gchar* character, gpointer user_data)
 {
 }
 
 static void
 on_entry_invalid_fullname_character (ModestValidatingEntry *self, const gchar* character, gpointer user_data)
 {
-       gchar *message = g_strdup_printf (_CS("ckdg_ib_illegal_characters_entered"),
-                                         "< >");
-       show_error (GTK_WIDGET (self), message);
-}
+       gchar *tmp, *msg;
+                       
+       tmp = g_strndup (user_name_forbidden_chars, USER_NAME_FORBIDDEN_CHARS_LENGTH);
+       msg = g_strdup_printf (_CS("ckdg_ib_illegal_characters_entered"), tmp);
+
+       show_error (GTK_WIDGET (self), msg);
 
 
+       g_free (msg);
+       g_free (tmp);
+}
 
 
 static void
 
 
 static void
@@ -1368,7 +1379,7 @@ void modest_account_settings_dialog_set_account_name (ModestAccountSettingsDialo
                }
                
                const gboolean has_specific = 
                }
                
                const gboolean has_specific = 
-                       modest_account_mgr_get_has_connection_specific_smtp (
+                       modest_account_mgr_get_use_connection_specific_smtp (
                                dialog->account_manager, 
                                account_name);
                gtk_toggle_button_set_active (
                                dialog->account_manager, 
                                account_name);
                gtk_toggle_button_set_active (
@@ -1560,6 +1571,8 @@ save_configuration (ModestAccountSettingsDialog *dialog)
        account_title = NULL;
        
        /* Save connection-specific SMTP server accounts: */
        account_title = NULL;
        
        /* Save connection-specific SMTP server accounts: */
+        modest_account_mgr_set_use_connection_specific_smtp(dialog->account_manager, account_name,
+               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->checkbox_outgoing_smtp_specific)));
        if (dialog->specific_window) {
                return modest_connection_specific_smtp_window_save_server_accounts (
                        MODEST_CONNECTION_SPECIFIC_SMTP_WINDOW (dialog->specific_window), account_name);
        if (dialog->specific_window) {
                return modest_connection_specific_smtp_window_save_server_accounts (
                        MODEST_CONNECTION_SPECIFIC_SMTP_WINDOW (dialog->specific_window), account_name);