/* check if mailto defines a from */
if (mailto && *mailto != '\0') {
- scan_mailto_url(mailto, &mailto_from, NULL, NULL, NULL, NULL, NULL, NULL);
+ scan_mailto_url(mailto, &mailto_from, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
/* mailto defines a from, check if we can get account prefs from it,
if not, the account prefs will be guessed using other ways, but we'll keep
the from anyway */
mfield = compose_entries_set(compose, mailto, COMPOSE_TO);
} else if (item && FOLDER_CLASS(item->folder) == news_get_class()) {
compose_entry_append(compose, item->path, COMPOSE_NEWSGROUPS, PREF_FOLDER);
+ mfield = TO_FIELD_PRESENT;
}
/*
* CLAWS: just don't allow return receipt request, even if the user
compose->modified = FALSE;
compose_set_title(compose);
+
+ hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose);
+
return compose;
}
return NULL;
}
END_TIMING();
+
return compose;
}
return NULL;
}
+ hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose);
+
return compose;
}
return NULL;
}
+ hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose);
+
return compose;
}
}
if (folder_has_parent_of_type(msginfo->folder, F_QUEUE) ||
- folder_has_parent_of_type(msginfo->folder, F_DRAFT)) {
+ folder_has_parent_of_type(msginfo->folder, F_DRAFT) ||
+ folder_has_parent_of_type(msginfo->folder, F_OUTBOX)) {
gchar queueheader_buf[BUFFSIZE];
gint id, param;
compose_extract_original_charset(compose);
if (folder_has_parent_of_type(msginfo->folder, F_QUEUE) ||
- folder_has_parent_of_type(msginfo->folder, F_DRAFT)) {
+ folder_has_parent_of_type(msginfo->folder, F_DRAFT) ||
+ folder_has_parent_of_type(msginfo->folder, F_OUTBOX)) {
gchar queueheader_buf[BUFFSIZE];
/* Set message save folder */
compose->sig_str = account_get_signature_str(compose->account);
+ hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose);
+
return compose;
}
return NULL;
}
+ hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose);
+
return compose;
}
case COMPOSE_FOLLOWUPTO:
header = N_( "Followup-To:");
break;
+ case COMPOSE_INREPLYTO:
+ header = N_( "In-Reply-To:");
+ break;
case COMPOSE_TO:
default:
header = N_("To:");
gchar *temp = NULL;
gsize len = 0;
gchar **attach = NULL;
+ gchar *inreplyto = NULL;
MailField mfield = NO_FIELD_PRESENT;
/* get mailto parts but skip from */
- scan_mailto_url(mailto, NULL, &to, &cc, &bcc, &subject, &body, &attach);
+ scan_mailto_url(mailto, NULL, &to, &cc, &bcc, &subject, &body, &attach, &inreplyto);
if (to) {
compose_entry_append(compose, to, to_type, PREF_MAILTO);
g_free(warn_files);
}
}
+ if (inreplyto)
+ compose_entry_append(compose, inreplyto, COMPOSE_INREPLYTO, PREF_MAILTO);
+
g_free(to);
g_free(cc);
g_free(bcc);
g_free(subject);
g_free(body);
g_strfreev(attach);
+ g_free(inreplyto);
return mfield;
}
start = strstr(hentry[H_LIST_POST].body, "mailto:");
scan_mailto_url(start ? start : hentry[H_LIST_POST].body,
- NULL, &to, NULL, NULL, NULL, NULL, NULL);
+ NULL, &to, NULL, NULL, NULL, NULL, NULL, NULL);
if (to) {
g_free(compose->ml_post);
SET_ADDRESS(COMPOSE_REPLYTO, compose->replyto);
SET_ADDRESS(COMPOSE_NEWSGROUPS, compose->newsgroups);
SET_ADDRESS(COMPOSE_FOLLOWUPTO, compose->followup_to);
+ SET_ADDRESS(COMPOSE_INREPLYTO, compose->inreplyto);
compose_update_priority_menu_item(compose);
compose_update_privacy_system_menu_item(compose, FALSE);
compose_add_headerfield_from_headerlist(compose, header, "Cc", ", ");
/* Bcc */
- compose_add_headerfield_from_headerlist(compose, header, "Bcc", ", ");
+ /*
+ * If this account is a NNTP account remove Bcc header from
+ * message body since it otherwise will be publicly shown
+ */
+ if (compose->account->protocol != A_NNTP)
+ compose_add_headerfield_from_headerlist(compose, header, "Bcc", ", ");
/* Subject */
str = gtk_editable_get_chars(GTK_EDITABLE(compose->subject_entry), 0, -1);
return;
}
- combobox_select_by_text(GTK_COMBO_BOX(last_header->combo), header);
+ if (!strcmp(header, prefs_common_translated_header_name("In-Reply-To:")))
+ gtk_entry_set_text(GTK_ENTRY(
+ gtk_bin_get_child(GTK_BIN(last_header->combo))), header);
+ else
+ combobox_select_by_text(GTK_COMBO_BOX(last_header->combo), header);
gtk_entry_set_text(GTK_ENTRY(last_header->entry), text);
last_header->type = pref_type;
static void compose_send_cb(GtkAction *action, gpointer data)
{
Compose *compose = (Compose *)data;
-
+
if (prefs_common.work_offline &&
!inc_offline_should_override(TRUE,
_("Claws Mail needs network access in order "
}
g_free(s_system);
g_free(body);
+ hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose);
}
void compose_reply_from_messageview(MessageView *msgview, GSList *msginfo_list,