diff options
author | Milan Crha <mcrha@redhat.com> | 2011-01-06 00:42:04 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-01-06 00:42:04 +0800 |
commit | 11d2490e5a1cb82e4fab263db199e666764840df (patch) | |
tree | 93b5aadcafa0ca93ae561994ca720a63e9d84e4b | |
parent | 931e783cee9054b6fbac4e5f8deb7c121bf15c1a (diff) | |
download | gsoc2013-evolution-11d2490e5a1cb82e4fab263db199e666764840df.tar.gz gsoc2013-evolution-11d2490e5a1cb82e4fab263db199e666764840df.tar.zst gsoc2013-evolution-11d2490e5a1cb82e4fab263db199e666764840df.zip |
Bug #637906 - Don't ask again when sending to non-mail recipients
-rw-r--r-- | mail/em-composer-utils.c | 5 | ||||
-rw-r--r-- | mail/evolution-mail.schemas.in | 12 | ||||
-rw-r--r-- | mail/mail-config.ui | 15 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-settings.c | 4 | ||||
-rw-r--r-- | 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 @@ </locale> </schema> + <schema> + <key>/schemas/apps/evolution/mail/prompts/send_invalid_recip</key> + <applyto>/apps/evolution/mail/prompts/send_invalid_recip</applyto> + <owner>evolution-mail</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Prompt before sending to recipients not entered as mail addresses</short> + <long>It disables/enables the repeated prompts to warn that you are trying to send a message to recipients not entered as mail addresses</long> + </locale> + </schema> + <!-- Trash settings --> <schema> 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"</property> <property name="position">4</property> </packing> </child> + <child> + <object class="GtkCheckButton" id="chkPromptSendInvalidRecip"> + <property name="label" translatable="yes" comments="This is in the context of: Ask for confirmation before...">Sending a message with _recipients not entered as mail addresses</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">5</property> + </packing> + </child> </object> </child> </object> 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 @@ -289,6 +289,10 @@ e_mail_shell_settings_init (EShellBackend *shell_backend) "/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", |