From f7f85348890c0e7febf88c118a675fd38cc68830 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Tue, 14 Apr 2009 15:31:57 +0000 Subject: [PATCH] Fixes NB#110813, check incoming/outgoing servernames in easysetup wizard dialog pmo-trunk-r8787 --- src/hildon2/modest-easysetup-wizard-dialog.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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) { -- 1.7.9.5