+on_mandatory_entry_changed (GtkWidget* widget, ModestConnectionSpecificSmtpEditWindow *self)
+{
+ const gchar *text;
+ gboolean sensitive = TRUE;
+ ModestConnectionSpecificSmtpEditWindowPrivate *priv;
+ ModestProtocolType auth_proto;
+
+ priv = CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW_GET_PRIVATE (self);
+
+ /* Check all mandatory entries */
+ on_change (widget, self);
+
+ auth_proto = modest_secureauth_picker_get_active_secureauth (MODEST_SECUREAUTH_PICKER (priv->outgoing_auth_picker));
+ if (modest_protocol_registry_protocol_type_is_secure (modest_runtime_get_protocol_registry (),
+ auth_proto)) {
+ text = hildon_entry_get_text (HILDON_ENTRY (priv->entry_user_username));
+ if (!text || (strlen(text) == 0))
+ sensitive = FALSE;
+ }
+
+ text = hildon_entry_get_text (HILDON_ENTRY (priv->entry_outgoingserver));
+ if (!text || (strlen(text) == 0))
+ sensitive = FALSE;
+
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (self), GTK_RESPONSE_OK, sensitive);
+}
+
+
+static void