From 56b6ad0e512f3b6bf881b48e8f24bca528cf2d9d Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Sun, 9 Sep 2001 04:11:15 +0000 Subject: Added. Shows a (hopefully) informative dialog warning you that some 2001-09-08 Jon Trowbridge * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Added. Shows a (hopefully) informative dialog warning you that some recipients might not want HTML mail (who are listed), and gives the option to cancel sending. (FIXME: The wording of this dialog could use some work.) (composer_get_message): Check if we are sending HTML to someone who might not want it, and raise the dialog if we are. Use our new destination-vector based api when talking to the composer. Touch our destinations here, boosting their use scores. This is the right place for this to happen --- closer to the end of the sending process, where incorrect/artificial use score inflation is less likely to occur. * mail-config.c (config_read): Added /Mail/Format/confirm_unwanted_html key. This flag determines whether or not we want to see the warning dialog when we send HTML mail to contacts who don't want it. Default is TRUE. (mail_config_write_on_exit): Write out the confirm_unwanted_html key. (mail_config_get_confirm_unwanted_html): Added. (mail_config_set_confirm_unwanted_html): Added. svn path=/trunk/; revision=12712 --- mail/mail-config.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'mail/mail-config.c') diff --git a/mail/mail-config.c b/mail/mail-config.c index 68b310daa0..fc8290948b 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -62,6 +62,7 @@ typedef struct { gboolean hide_deleted; gint paned_size; gboolean send_html; + gboolean confirm_unwanted_html; gboolean citation_highlight; guint32 citation_color; gboolean prompt_empty_subject; @@ -489,6 +490,10 @@ config_read (void) /* Format */ config->send_html = bonobo_config_get_boolean_with_default (config->db, "/Mail/Format/send_html", FALSE, NULL); + + /* Confirm Sending Unwanted HTML */ + config->confirm_unwanted_html = bonobo_config_get_boolean_with_default (config->db, + "/Mail/Format/confirm_unwanted_html", TRUE, NULL); /* Citation */ config->citation_highlight = bonobo_config_get_boolean_with_default ( @@ -798,6 +803,10 @@ mail_config_write_on_exit (void) /* Format */ bonobo_config_set_boolean (config->db, "/Mail/Format/send_html", config->send_html, NULL); + + /* Confirm Sending Unwanted HTML */ + bonobo_config_set_boolean (config->db, "/Mail/Format/confirm_unwanted_html", + config->confirm_unwanted_html, NULL); /* Citation */ bonobo_config_set_boolean (config->db, @@ -1095,6 +1104,18 @@ mail_config_set_send_html (gboolean send_html) config->send_html = send_html; } +gboolean +mail_config_get_confirm_unwanted_html (void) +{ + return config->confirm_unwanted_html; +} + +void +mail_config_set_confirm_unwanted_html (gboolean confirm) +{ + config->confirm_unwanted_html = confirm; +} + gboolean mail_config_get_citation_highlight (void) { -- cgit v1.2.3