/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
gtk_widget_grab_focus(compose->header_last->entry);
- filename = procmsg_get_message_file(msginfo);
+ filename = procmsg_get_message_file_path(msginfo);
if (filename == NULL)
return NULL;
menu_set_sensitive(ifactory, "/Message/Attach file", FALSE);
menu_set_sensitive(ifactory, "/Message/Insert signature", FALSE);
menu_set_sensitive(ifactory, "/Edit", FALSE);
- menu_set_sensitive(ifactory, "/Options/Sign", FALSE);
- menu_set_sensitive(ifactory, "/Options/Encrypt", FALSE);
- menu_set_sensitive(ifactory, "/Options/Priority", FALSE);
- menu_set_sensitive(ifactory, "/Options/Request Return Receipt", FALSE);
+ menu_set_sensitive(ifactory, "/Options", FALSE);
menu_set_sensitive(ifactory, "/Tools/Show ruler", FALSE);
menu_set_sensitive(ifactory, "/Tools/Actions", FALSE);
#endif
- if (account->default_sign)
+ if (account->default_sign && compose->mode != COMPOSE_REDIRECT)
menu_set_active(ifactory, "/Options/Sign", TRUE);
else
menu_set_active(ifactory, "/Options/Sign", FALSE);
- if (account->default_encrypt)
+ if (account->default_encrypt && compose->mode != COMPOSE_REDIRECT)
menu_set_active(ifactory, "/Options/Encrypt", TRUE);
else
menu_set_active(ifactory, "/Options/Encrypt", FALSE);
if (action == COMPOSE_WRITE_FOR_SEND) {
buf = conv_codeset_strdup(chars, src_codeset, out_codeset);
+
if (!buf) {
AlertValue aval;
gchar *msg;
}
g_free(chars);
+ if (encoding == ENC_8BIT || encoding == ENC_7BIT) {
+ if (!strncmp(buf, "From ", strlen("From ")) ||
+ strstr(buf, "\nFrom ") != NULL) {
+ encoding = ENC_QUOTED_PRINTABLE;
+ }
+ }
+
mimetext = procmime_mimeinfo_new();
mimetext->content = MIMECONTENT_MEM;
mimetext->data.mem = buf;
/* protect trailing spaces when signing message */
if (action == COMPOSE_WRITE_FOR_SEND && compose->use_signing &&
privacy_system_can_sign(compose->privacy_system))
- encoding = ENC_QUOTED_PRINTABLE;
+ if (encoding == ENC_7BIT)
+ encoding = ENC_QUOTED_PRINTABLE;
+ else if (encoding == ENC_8BIT)
+ encoding = ENC_BASE64;
if (encoding != ENC_UNKNOWN)
procmime_encode_content(mimetext, encoding);
{
gchar *body;
GSList *new_msglist = NULL;
-
+ MsgInfo *tmp_msginfo = NULL;
+
g_return_if_fail(msgview != NULL);
g_return_if_fail(msginfo_list != NULL);
MsgInfo *orig_msginfo = (MsgInfo *)msginfo_list->data;
if (mimeinfo != NULL && mimeinfo->type == MIMETYPE_MESSAGE &&
- !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822")) {
+ !g_strcasecmp(mimeinfo->subtype, "rfc822")) {
- MsgInfo *tmp_msginfo = procmsg_msginfo_new_from_mimeinfo(
+ tmp_msginfo = procmsg_msginfo_new_from_mimeinfo(
orig_msginfo, mimeinfo);
if (tmp_msginfo != NULL) {
new_msglist = g_slist_append(NULL, tmp_msginfo);
if (new_msglist) {
compose_reply_mode((ComposeMode)action, new_msglist, body);
+ procmsg_msginfo_free(tmp_msginfo);
g_slist_free(new_msglist);
} else
compose_reply_mode((ComposeMode)action, msginfo_list, body);