Remove plaintext_file member of struct MsgInfo.
authorAndrej Kacian <ticho@claws-mail.org>
Sun, 21 Jun 2015 20:22:12 +0000 (22:22 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Thu, 25 Jun 2015 11:02:05 +0000 (13:02 +0200)
It is no longer needed, as we no longer write unencrypted
version of an encrypted message anywhere.

src/imap.c
src/plugins/perl/perl_plugin.c
src/procmsg.c
src/procmsg.h

index 606da64..ea11e0b 100644 (file)
@@ -4649,7 +4649,6 @@ static MsgInfo *imap_parse_msg(const gchar *file, FolderItem *item)
        msginfo = procheader_parse_file(file, flags, FALSE, FALSE);
        if (!msginfo) return NULL;
        
-       msginfo->plaintext_file = g_strdup(file);
        msginfo->folder = item;
 
        return msginfo;
index 6db4c41..1a62615 100644 (file)
@@ -542,7 +542,7 @@ static XS(XS_ClawsMail_filter_init)
    *         14 references
    *         15 score
    *         16 not used anymore
-   *         17 plaintext_file
+   *         17 not used anymore
    *         18 not used anymore
    *         19 hidden
    *         20 message file path
@@ -607,9 +607,6 @@ static XS(XS_ClawsMail_filter_init)
     ii ? XSRETURN(ii) : XSRETURN_UNDEF;
   case 15:
     msginfo->score      ? XSRETURN_IV(msginfo->score)      : XSRETURN_UNDEF;
-  case 17:
-    msginfo->plaintext_file ?
-      XSRETURN_PV(msginfo->plaintext_file)                 : XSRETURN_UNDEF;
   case 19:
     msginfo->hidden     ? XSRETURN_IV(msginfo->hidden)     : XSRETURN_UNDEF;
   case 20:
@@ -1937,7 +1934,6 @@ static int perl_init(void)
 "                   ClawsMail::C::filter_init(13));\n"
 "    add_header_entries_(\"references\",ClawsMail::C::filter_init(14));\n"
 "    $msginfo{\"score\"}              = ClawsMail::C::filter_init(15);\n"
-"    $msginfo{\"plaintext_file\"}     = ClawsMail::C::filter_init(17);\n"
 "    $msginfo{\"hidden\"}             = ClawsMail::C::filter_init(19);\n"
 "    $msginfo{\"filepath\"}           = ClawsMail::C::filter_init(20);\n"
 "    $msginfo{\"partial_recv\"}       = ClawsMail::C::filter_init(21);\n"
index 5ff5f4d..a398b64 100644 (file)
@@ -402,17 +402,8 @@ next_folder:
 
 gchar *procmsg_get_message_file_path(MsgInfo *msginfo)
 {
-       gchar *file;
-
        cm_return_val_if_fail(msginfo != NULL, NULL);
-
-       if (msginfo->plaintext_file)
-               file = g_strdup(msginfo->plaintext_file);
-       else {
-               file = folder_item_fetch_msg(msginfo->folder, msginfo->msgnum);
-       }
-
-       return file;
+       return folder_item_fetch_msg(msginfo->folder, msginfo->msgnum);
 }
 
 gchar *procmsg_get_message_file(MsgInfo *msginfo)
@@ -1295,7 +1286,6 @@ MsgInfo *procmsg_msginfo_copy(MsgInfo *msginfo)
         newmsginfo->references = g_slist_reverse(newmsginfo->references);
 
        MEMBCOPY(score);
-       MEMBDUP(plaintext_file);
 
        return newmsginfo;
 }
@@ -1432,8 +1422,6 @@ void procmsg_msginfo_free(MsgInfo *msginfo)
        slist_free_strings_full(msginfo->references);
        g_slist_free(msginfo->tags);
 
-       g_free(msginfo->plaintext_file);
-
        g_free(msginfo);
 }
 
@@ -2351,7 +2339,6 @@ MsgInfo *procmsg_msginfo_new_from_mimeinfo(MsgInfo *src_msginfo, MimeInfo *mimei
        if (tmp_msginfo != NULL) {
                if (src_msginfo)
                        tmp_msginfo->folder = src_msginfo->folder;
-               tmp_msginfo->plaintext_file = g_strdup(tmpfile);
        } else {
                g_warning("procmsg_msginfo_new_from_mimeinfo(): Can't generate new msginfo");
        }
index 5152c05..e5e4bf2 100644 (file)
@@ -221,10 +221,7 @@ struct _MsgInfo
 
        gint score;
 
-       /* used only for encrypted messages */
-       gchar *plaintext_file;
-        
-        gint hidden;
+       gint hidden;
 
        /* used only for partially received messages */
        gint total_size;