on_entry_invalid_character (ModestValidatingEntry *self, const gchar* character, gpointer user_data)
{
/* ModestEasysetupWizardDialog *dialog = MODEST_EASYSETUP_WIZARD_DIALOG (user_data); */
- /* We could add a special case for whitespace here
- if (character == NULL) ...
- */
+
+ const gchar *show_char = NULL;
+ if (character)
+ show_char = character;
+ else {
+ /* TODO: We need a logical ID for this: */
+ show_char = _("whitespace");
+ }
+
/* TODO: Should this show just this one bad character or all the not-allowed characters? */
- gchar *message = g_strdup_printf (_CS("ckdg_ib_illegal_characters_entered"), character);
+ gchar *message = g_strdup_printf (_CS("ckdg_ib_illegal_characters_entered"), show_char);
show_error (GTK_WIDGET (self), message);
}
* We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
GtkSizeGroup* sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- /* The name widgets: */
+ /* The name widgets: (use auto cap) */
self->entry_user_name = GTK_WIDGET (modest_validating_entry_new ());
- /* Auto-capitalization is the default, so let's turn it off: */
- hildon_gtk_entry_set_input_mode (GTK_ENTRY (self->entry_user_name), HILDON_GTK_INPUT_MODE_FULL);
+ hildon_gtk_entry_set_input_mode (GTK_ENTRY (self->entry_user_name),
+ HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_AUTOCAP);
+
/* Set max length as in the UI spec:
* 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_user_name), 64);
modest_validating_entry_set_unallowed_characters (
MODEST_VALIDATING_ENTRY (self->entry_user_name), list_prevent);
modest_validating_entry_set_func(MODEST_VALIDATING_ENTRY(self->entry_user_name),
- on_entry_invalid_character, self);
+ on_entry_invalid_character, self);
g_list_free (list_prevent);
/* The username widgets: */
modest_validating_entry_set_unallowed_characters_whitespace (
MODEST_VALIDATING_ENTRY (self->entry_user_username));
modest_validating_entry_set_func(MODEST_VALIDATING_ENTRY(self->entry_user_username),
- on_entry_invalid_character, self);
+ on_entry_invalid_character, self);
/* Set max length as in the UI spec:
* The UI spec seems to want us to show a dialog if we hit the maximum. */
/* Remove any temporarily-saved account that will not actually be needed: */
if (self->saved_account_name) {
modest_account_mgr_remove_account (self->account_manager,
- self->saved_account_name, FALSE);
+ self->saved_account_name);
}
}
static void
show_error (GtkWidget *parent_widget, const gchar* text)
{
+ //TODO: Apparently this doesn't show anything in Maemo Bora:
hildon_banner_show_information(parent_widget, NULL, text);
#if 0
modest_presets_get_info_server_security (priv->presets, provider_id,
FALSE /* incoming */);
- /* TODO: There is no SMTP authentication enum for presets,
- so we should probably check what the server supports. */
+ /* TODO: The secure-smtp information in the presets data is currently wrong,
+ * so we choose a reasonable default. Remove this when the presets data is corrected: */
+ security_outgoing = security_outgoing & MODEST_PRESETS_SECURITY_SECURE_SMTP;
+
protocol_security_outgoing = MODEST_PROTOCOL_CONNECTION_NORMAL;
if (security_outgoing & MODEST_PRESETS_SECURITY_SECURE_SMTP) {
/* printf("DEBUG: %s: using secure SMTP\n", __FUNCTION__); */