GtkWidget *button_outgoing_smtp_servers;
GtkWidget *page_complete_customsetup;
-
- GtkWidget *specific_window;
};
static void save_to_settings (ModestEasysetupWizardDialog *self);
if (priv->presets)
modest_presets_destroy (priv->presets);
-
- if (priv->specific_window)
- gtk_widget_destroy (priv->specific_window);
if (priv->settings)
g_object_unref (priv->settings);
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. */
_("mail_fi_emailtype_imap") );
- /* Note that this produces a compiler warning,
- * because the compiler does not know that the translated string will have a %s in it.
- * I do not see a way to avoid the warning while still using these Logical IDs. murrayc. */
gchar* incomingserver_title = g_strdup_printf(_("mcen_li_emailsetup_servertype"), type);
g_object_set (G_OBJECT (priv->caption_incoming), "label", incomingserver_title, NULL);
g_free(incomingserver_title);
{
ModestEasysetupWizardDialog * self = MODEST_EASYSETUP_WIZARD_DIALOG (user_data);
ModestEasysetupWizardDialogPrivate* priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE(self);
+ GtkWidget *specific_window;
/* We set dirty here because setting it depending on the connection specific dialog
seems overkill */
priv->dirty = TRUE;
/* Create the window, if necessary: */
- if (!(priv->specific_window)) {
- priv->specific_window = GTK_WIDGET (modest_connection_specific_smtp_window_new ());
- modest_connection_specific_smtp_window_fill_with_connections (
- MODEST_CONNECTION_SPECIFIC_SMTP_WINDOW (priv->specific_window), priv->account_manager);
- }
+ specific_window = (GtkWidget *) modest_connection_specific_smtp_window_new ();
+ modest_connection_specific_smtp_window_fill_with_connections (MODEST_CONNECTION_SPECIFIC_SMTP_WINDOW (specific_window), priv->account_manager);
- /* Show the window: */
- gtk_window_set_transient_for (GTK_WINDOW (priv->specific_window), GTK_WINDOW (self));
- gtk_window_set_modal (GTK_WINDOW (priv->specific_window), TRUE);
- gtk_widget_show (priv->specific_window);
+ /* Show the window */
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (specific_window));
+ gtk_widget_show (specific_window);
}
static void
priv->checkbox_outgoing_smtp_specific = NULL;
priv->button_outgoing_smtp_servers = NULL;
priv->page_complete_customsetup = NULL;
- priv->specific_window = NULL;
/* Add the common pages: */
gtk_notebook_append_page (notebook, priv->page_welcome,
display_name = get_entered_account_title (self);
modest_account_settings_set_display_name (priv->settings, display_name);
g_free (display_name);
-
- if (priv->specific_window)
- modest_connection_specific_smtp_window_save_server_accounts (
- MODEST_CONNECTION_SPECIFIC_SMTP_WINDOW (priv->specific_window));
}