#include "modest-runtime.h" /* For modest_runtime_get_account_mgr(). */
#include "maemo/modest-connection-specific-smtp-window.h"
#include "widgets/modest-ui-constants.h"
-#include "maemo/modest-account-settings-dialog.h"
+#include "widgets/modest-account-settings-dialog.h"
#include "maemo/modest-maemo-utils.h"
#include "modest-utils.h"
#include <gconf/gconf-client.h>
}
static void
+on_incoming_security_changed(GtkWidget* widget, ModestEasysetupWizardDialog* wizard)
+{
+ ModestEasysetupWizardDialogPrivate* priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE(wizard);
+ ModestConnectionProtocol protocol_security_incoming;
+
+ g_return_if_fail (priv != NULL);
+ protocol_security_incoming = modest_serversecurity_combo_box_get_active_serversecurity (
+ MODEST_SERVERSECURITY_COMBO_BOX (priv->combo_incoming_security));
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->checkbox_incoming_auth), modest_protocol_info_is_secure (protocol_security_incoming));
+ gtk_widget_set_sensitive (priv->checkbox_incoming_auth, !modest_protocol_info_is_secure (protocol_security_incoming));
+
+ on_easysetup_changed (widget, wizard);
+}
+
+static void
modest_easysetup_wizard_dialog_get_property (GObject *object, guint property_id,
GValue *value, GParamSpec *pspec)
{
if(error == NULL || error->domain != modest_utils_get_supported_secure_authentication_error_quark() ||
error->code != MODEST_UTILS_GET_SUPPORTED_SECURE_AUTHENTICATION_ERROR_CANCELED)
{
- show_error (GTK_WIDGET(self), _("Could not discover supported secure authentication methods."));
+ show_error (GTK_WIDGET(self), _("mcen_ib_unableto_discover_auth_methods"));
}
if(error != NULL)
show_error (GTK_WIDGET (self), _CS("ckdg_ib_maximum_characters_reached"));
}
-static void
-on_entry_invalid_character (ModestValidatingEntry *self, const gchar* character, gpointer user_data)
-{
- /* ModestEasysetupWizardDialog *dialog = MODEST_EASYSETUP_WIZARD_DIALOG (user_data); */
-
- 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"), show_char);
- show_error (GTK_WIDGET (self), message);
-}
-
static gint
get_default_country_code(void)
{
g_list_free (list_prevent);
list_prevent = NULL;
modest_validating_entry_set_func(MODEST_VALIDATING_ENTRY(priv->entry_account_title),
- on_entry_invalid_character, self);
+ modest_maemo_utils_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. */
modest_validating_entry_set_unallowed_characters (
MODEST_VALIDATING_ENTRY (priv->entry_user_name), list_prevent);
modest_validating_entry_set_func(MODEST_VALIDATING_ENTRY(priv->entry_user_name),
- on_entry_invalid_character, self);
+ modest_maemo_utils_on_entry_invalid_character, self);
g_list_free (list_prevent);
/* The username widgets: */
modest_validating_entry_set_unallowed_characters_whitespace (
MODEST_VALIDATING_ENTRY (priv->entry_user_username));
modest_validating_entry_set_func(MODEST_VALIDATING_ENTRY(priv->entry_user_username),
- on_entry_invalid_character, self);
+ modest_maemo_utils_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. */
caption = hildon_caption_new (sizegroup, _("mcen_li_emailsetup_secure_connection"),
priv->combo_incoming_security, NULL, HILDON_CAPTION_OPTIONAL);
g_signal_connect (G_OBJECT (priv->combo_incoming_security), "changed",
- G_CALLBACK (on_easysetup_changed), self);
+ G_CALLBACK (on_incoming_security_changed), self);
gtk_widget_show (priv->combo_incoming_security);
gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
priv->page_welcome = create_page_welcome (self);
priv->page_account_details = create_page_account_details (self);
priv->page_user_details = create_page_user_details (self);
- priv->page_account_details = NULL;
- priv->combo_account_country = NULL;
- priv->combo_account_serviceprovider = NULL;
- priv->entry_account_title = NULL;
- priv->entry_user_name = NULL;
- priv->entry_user_username = NULL;
- priv->entry_user_password = NULL;
- priv->entry_user_email = NULL;
priv->page_complete_easysetup = NULL;
priv->page_custom_incoming = NULL;
priv->combo_incoming_servertype = NULL;