aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog26
-rw-r--r--mail/mail-callbacks.c44
2 files changed, 63 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9c4a45d856..91f46fa083 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2001-08-22 Jon Trowbridge <trow@ximian.com>
+
+ * mail-callbacks.c (ask_confirm_for_only_bcc): Provide alternative
+ text for this dialog for the case when a message has only Bcc
+ recipients because of a hidden contact list's addresses being
+ moved from To/Cc to Bcc.
+ (composer_get_message): Try to detect when our message has only
+ Bcc recipients because of moving addresses around due to a hidden
+ contact list, and show the dialog with the revised wording in this
+ case.
+
2001-08-22 Jeffrey Stedfast <fejj@ximian.com>
* component-factory.c (create_view): Don't blindly make all vtrash
@@ -291,8 +302,8 @@
* subscribe-dialog.c (fe_got_children): Sort the nodes here...
(fe_sort_folder): ... using this function.
- * folder-browser-ui.c (folder_browser_ui_message_loaded): Check for uic
- == NULL. I'm not sure how this could happen, but...
+ * folder-browser-ui.c (folder_browser_ui_message_loaded): Check
+ for uic == NULL. I'm not sure how this could happen, but...
2001-08-16 Peter Williams <peterw@ximian.com>
@@ -307,6 +318,17 @@
generate the the shell path of this item. Don't need to escape the
URL, and handle cases when dir_sep != '/'
(fe_done_subscribing): Use fe_node_to_shell_path instead of the
+ CamelURL. Third time's the charm... * folder-browser-ui.c
+ (folder_browser_ui_set_selection_state): Disable "Search Message"
+ when more or less than exactly one message is selected.
+
+ * subscribe-dialog.c (fe_done_subscribing): Instead of hackfully
+ getting the path, use a CamelURL so that escaping is
+ handled. Silly me. -- See below --
+ (fe_node_to_shell_path): Use node->name and node->full_name to
+ generate the the shell path of this item. Don't need to escape the
+ URL, and handle cases when dir_sep != '/'
+ (fe_done_subscribing): Use fe_node_to_shell_path instead of the
CamelURL. Third time's the charm...
2001-08-15 Jeffrey Stedfast <fejj@ximian.com>
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 167ac0af55..12ec4d945f 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -235,7 +235,7 @@ ask_confirm_for_empty_subject (EMsgComposer *composer)
}
static gboolean
-ask_confirm_for_only_bcc (EMsgComposer *composer)
+ask_confirm_for_only_bcc (EMsgComposer *composer, gboolean hidden_list_case)
{
/* FIXME: EMessageBox should really handle this stuff
automagically. What Miguel thinks would be nice is to pass
@@ -246,13 +246,31 @@ ask_confirm_for_only_bcc (EMsgComposer *composer)
gboolean show_again = TRUE;
GtkWidget *mbox;
int button;
+ const gchar *first_text;
+ gchar *message_text;
if (!mail_config_get_prompt_only_bcc ())
return TRUE;
+
+ /* If the user is mailing a hidden contact list, it is possible for
+ them to create a message with only Bcc recipients without really
+ realizing it. To try to avoid being totally confusing, I've changed
+ this dialog to provide slightly different text in that case, to
+ better explain what the hell is going on. */
+
+ if (hidden_list_case) {
+ first_text = _("Since the contact list you are sending to "
+ "is configured to hide the list's addresses, "
+ "this message will contain only Bcc recipients.");
+ } else {
+ first_text = _("This message contains only Bcc recipients.");
+ }
+
+ message_text = g_strdup_printf ("%s\n%s", first_text,
+ _("It is possible that the mail server may reveal the recipients "
+ "by adding an Apparently-To header.\nSend anyway?"));
- mbox = e_message_box_new (_("This message contains only Bcc recipients.\nIt is "
- "possible that the mail server may reveal the recipients "
- "by adding an Apparently-To header.\nSend anyway?"),
+ mbox = e_message_box_new (message_text,
E_MESSAGE_BOX_QUESTION,
GNOME_STOCK_BUTTON_YES,
GNOME_STOCK_BUTTON_NO,
@@ -264,6 +282,8 @@ ask_confirm_for_only_bcc (EMsgComposer *composer)
button = gnome_dialog_run_and_close (GNOME_DIALOG (mbox));
mail_config_set_prompt_only_bcc (show_again);
+
+ g_free (message_text);
if (button == 0)
return TRUE;
@@ -350,7 +370,21 @@ composer_get_message (EMsgComposer *composer)
if (iaddr && num_addrs == camel_address_length (CAMEL_ADDRESS (iaddr))) {
/* this means that the only recipients are Bcc's */
- if (!ask_confirm_for_only_bcc (composer)) {
+
+ /* OK, this is an abusive hack. If someone sends a mail with a
+ hidden contact list on to to: line and no other recipients,
+ they will unknowingly create a message with only bcc: recipients.
+ We try to detect this and pass a flag to ask_confirm_for_only_bcc,
+ so that it can present the user with a dialog whose text has been
+ modified to reflect this situation. */
+
+ const gchar *to_header = camel_medium_get_header (CAMEL_MEDIUM (message), CAMEL_RECIPIENT_TYPE_TO);
+ gboolean hidden_list_case = FALSE;
+
+ if (to_header && !strcmp (to_header, "Undisclosed-Recipient:;"))
+ hidden_list_case = TRUE;
+
+ if (!ask_confirm_for_only_bcc (composer, hidden_list_case)) {
camel_object_unref (CAMEL_OBJECT (message));
return NULL;
}