From 6e9c9986ac569a4e759f2102ec87e7614c8c00cc Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 5 Jan 2011 17:42:04 +0100 Subject: Bug #637906 - Don't ask again when sending to non-mail recipients --- mail/em-composer-utils.c | 5 +++-- mail/evolution-mail.schemas.in | 12 ++++++++++++ mail/mail-config.ui | 15 +++++++++++++++ modules/mail/e-mail-shell-settings.c | 4 ++++ modules/mail/em-composer-prefs.c | 7 +++++++ 5 files changed, 41 insertions(+), 2 deletions(-) diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index fa55a89060..5dfa1ffa05 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -309,12 +309,13 @@ composer_presend_check_recipients (EMsgComposer *composer) } if (invalid_addrs) { - if (e_alert_run_dialog_for_args ( + if (!em_utils_prompt_user ( GTK_WINDOW (composer), + "/apps/evolution/mail/prompts/send_invalid_recip", strstr (invalid_addrs->str, ", ") ? "mail:ask-send-invalid-recip-multi" : "mail:ask-send-invalid-recip-one", - invalid_addrs->str, NULL) == GTK_RESPONSE_CANCEL) { + invalid_addrs->str, NULL)) { g_string_free (invalid_addrs, TRUE); goto finished; } diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in index e6a3daa5d8..3a75ad26a6 100644 --- a/mail/evolution-mail.schemas.in +++ b/mail/evolution-mail.schemas.in @@ -1224,6 +1224,18 @@ + + /schemas/apps/evolution/mail/prompts/send_invalid_recip + /apps/evolution/mail/prompts/send_invalid_recip + evolution-mail + bool + true + + Prompt before sending to recipients not entered as mail addresses + It disables/enables the repeated prompts to warn that you are trying to send a message to recipients not entered as mail addresses + + + diff --git a/mail/mail-config.ui b/mail/mail-config.ui index bfa365ed9a..a38a0bfabe 100644 --- a/mail/mail-config.ui +++ b/mail/mail-config.ui @@ -4487,6 +4487,21 @@ For example: "Work" or "Personal" 4 + + + Sending a message with _recipients not entered as mail addresses + True + True + False + True + True + + + False + False + 5 + + diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c index 18e8407bba..9f024696dd 100644 --- a/modules/mail/e-mail-shell-settings.c +++ b/modules/mail/e-mail-shell-settings.c @@ -288,6 +288,10 @@ e_mail_shell_settings_init (EShellBackend *shell_backend) "composer-prompt-empty-subject", "/apps/evolution/mail/prompts/empty_subject"); + e_shell_settings_install_property_for_key ( + "composer-prompt-send-invalid-recip", + "/apps/evolution/mail/prompts/send_invalid_recip"); + e_shell_settings_install_property_for_key ( "composer-reply-start-bottom", "/apps/evolution/mail/composer/reply_start_bottom"); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index b4d0513edb..e0dd2f17fd 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -411,6 +411,13 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); + widget = e_builder_get_widget (prefs->builder, "chkPromptSendInvalidRecip"); + g_object_bind_property ( + shell_settings, "composer-prompt-send-invalid-recip", + widget, "active", + G_BINDING_BIDIRECTIONAL | + G_BINDING_SYNC_CREATE); + widget = e_builder_get_widget (prefs->builder, "chkAutoSmileys"); g_object_bind_property ( shell_settings, "composer-magic-smileys", -- cgit v1.2.3