+ /* Dim the outgoing username and password when no secure authentication is used, as per the UI spec: */
+ g_signal_connect (G_OBJECT (self->combo_outgoing_auth), "changed", (GCallback)on_combo_outgoing_auth_changed, self);
+
+ /* The username widgets: */
+ self->entry_outgoing_username = GTK_WIDGET (easysetup_validating_entry_new ());
+ self->caption_outgoing_username = create_caption_new_with_asterix (self, sizegroup, _("mail_fi_username"),
+ self->entry_outgoing_username, NULL, HILDON_CAPTION_MANDATORY);
+ gtk_widget_show (self->entry_outgoing_username);
+ gtk_box_pack_start (GTK_BOX (box), self->caption_outgoing_username, FALSE, FALSE, 2);
+ gtk_widget_show (self->caption_outgoing_username);
+
+ /* Prevent the use of some characters in the username,
+ * as required by our UI specification: */
+ easysetup_validating_entry_set_unallowed_characters_whitespace (
+ EASYSETUP_VALIDATING_ENTRY (self->entry_outgoing_username));
+
+ /* Set max length as in the UI spec:
+ * TODO: The UI spec seems to want us to show a dialog if we hit the maximum. */
+ gtk_entry_set_max_length (GTK_ENTRY (self->entry_outgoing_username), 64);
+
+ /* The password widgets: */
+ self->entry_outgoing_password = gtk_entry_new ();
+ gtk_entry_set_visibility (GTK_ENTRY (self->entry_outgoing_password), FALSE);
+ /* gtk_entry_set_invisible_char (GTK_ENTRY (self->entry_outgoing_password), '*'); */
+ self->caption_outgoing_password = create_caption_new_with_asterix (self, sizegroup,
+ _("mail_fi_password"), self->entry_outgoing_password, NULL, HILDON_CAPTION_OPTIONAL);
+ gtk_widget_show (self->entry_outgoing_password);
+ gtk_box_pack_start (GTK_BOX (box), self->caption_outgoing_password, FALSE, FALSE, 2);
+ gtk_widget_show (self->caption_outgoing_password);
+
+ /* The secure connection widgets: */
+ /* This will be filled and set with easysetup_serversecurity_combo_box_fill()
+ * and easysetup_serversecurity_combo_box_set_active_serversecurity().
+ */
+ if (!self->combo_outgoing_security)
+ self->combo_outgoing_security = GTK_WIDGET (easysetup_serversecurity_combo_box_new ());
+ caption = hildon_caption_new (sizegroup, _("mcen_li_emailsetup_secure_connection"),
+ self->combo_outgoing_security, NULL, HILDON_CAPTION_OPTIONAL);
+ gtk_widget_show (self->combo_outgoing_security);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_widget_show (caption);
+
+ /* The port widgets: */
+ if (!self->entry_outgoing_port)
+ self->entry_outgoing_port = GTK_WIDGET (gtk_entry_new ());
+ caption = hildon_caption_new (sizegroup, _("mcen_fi_emailsetup_port"),
+ self->entry_outgoing_port, NULL, HILDON_CAPTION_OPTIONAL);
+ gtk_widget_show (self->entry_outgoing_port);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_widget_show (caption);
+