From: Sergio Villar Senin Date: Tue, 14 Apr 2009 15:31:57 +0000 (+0000) Subject: Fixes NB#110813, check incoming/outgoing servernames in easysetup wizard dialog X-Git-Tag: git_migration_finished~84 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=f7f85348890c0e7febf88c118a675fd38cc68830 Fixes NB#110813, check incoming/outgoing servernames in easysetup wizard dialog pmo-trunk-r8787 --- diff --git a/src/hildon2/modest-easysetup-wizard-dialog.c b/src/hildon2/modest-easysetup-wizard-dialog.c index 37ef5aa..5db6e4c 100644 --- a/src/hildon2/modest-easysetup-wizard-dialog.c +++ b/src/hildon2/modest-easysetup-wizard-dialog.c @@ -1843,6 +1843,25 @@ on_before_next (ModestWizardDialog *dialog, GtkWidget *current_page, GtkWidget * return FALSE; } + } else if (current_page == priv->page_custom_incoming || + current_page == priv->page_custom_outgoing) { + + const gchar *hostname; + GtkWidget *entry = (current_page == priv->page_custom_incoming) ? + priv->entry_incomingserver : + priv->entry_outgoingserver; + + hostname = gtk_entry_get_text (GTK_ENTRY (entry)); + if (!modest_text_utils_validate_domain_name (hostname)) { + /* Show error */ + modest_platform_information_banner (NULL, NULL, _("mcen_ib_invalid_servername")); + + /* Return focus to the email address entry: */ + gtk_widget_grab_focus (entry); + gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1); + + return FALSE; + } } if (next_page == priv->page_custom_incoming) {