* unitialize modest-window-mgr before the other singletons, so
[modest] / src / maemo / modest-account-settings-dialog.c
index 0aa7f85..82ce5dd 100644 (file)
@@ -171,21 +171,32 @@ on_modified_checkbox_toggled (GtkToggleButton *togglebutton, gpointer user_data)
        self->modified = TRUE;
 }
 
+static void
+on_modified_number_editor_changed (HildonNumberEditor *number_editor, gint new_value, gpointer user_data)
+{
+       ModestAccountSettingsDialog *self = MODEST_ACCOUNT_SETTINGS_DIALOG (user_data);
+       self->modified = TRUE;
+}
+
 /* Set a modified boolean whenever the widget is changed, 
  * so we can check for it later.
  */
 static void
 connect_for_modified (ModestAccountSettingsDialog *self, GtkWidget *widget)
 {
-       if (GTK_IS_ENTRY (widget)) {
-         g_signal_connect (G_OBJECT (widget), "changed",
-               G_CALLBACK (on_modified_entry_changed), self);  
+       if (HILDON_IS_NUMBER_EDITOR (widget)) {
+               g_signal_connect (G_OBJECT (widget), "notify::value",
+                       G_CALLBACK (on_modified_number_editor_changed), self);
+       }
+       else if (GTK_IS_ENTRY (widget)) {
+               g_signal_connect (G_OBJECT (widget), "changed",
+                       G_CALLBACK (on_modified_entry_changed), self);
        } else if (GTK_IS_COMBO_BOX (widget)) {
                g_signal_connect (G_OBJECT (widget), "changed",
-               G_CALLBACK (on_modified_combobox_changed), self);       
+                       G_CALLBACK (on_modified_combobox_changed), self);       
        } else if (GTK_IS_TOGGLE_BUTTON (widget)) {
                g_signal_connect (G_OBJECT (widget), "toggled",
-               G_CALLBACK (on_modified_checkbox_toggled), self);
+                       G_CALLBACK (on_modified_checkbox_toggled), self);
        }
 }
 
@@ -835,7 +846,7 @@ check_data (ModestAccountSettingsDialog *self)
        if ((!email_address) || (strlen(email_address) == 0))
                return FALSE;
                        
-       if (!modest_text_utils_validate_email_address (email_address)) {
+       if (!modest_text_utils_validate_email_address (email_address, NULL)) {
                /* Warn the user via a dialog: */
                /*show_error (GTK_WINDOW (self), _("mcen_ib_invalid_email"));*/
                hildon_banner_show_information (NULL, NULL, _("mcen_ib_invalid_email"));
@@ -902,7 +913,7 @@ check_data (ModestAccountSettingsDialog *self)
                        }
                }
        }
-       
+
        /* TODO: The UI Spec wants us to check that the servernames are valid, 
         * but does not specify how.
         */
@@ -920,7 +931,7 @@ on_response (GtkDialog *wizard_dialog,
        enable_buttons (self);
        
        gboolean prevent_response = FALSE;
-       
+
        /* Warn about unsaved changes: */
        if (response_id == GTK_RESPONSE_CANCEL && self->modified) {
                GtkDialog *dialog = GTK_DIALOG (hildon_note_new_confirmation (GTK_WINDOW (self),