0.9.3claws56
authorChristoph Hohmann <reboot@gmx.ch>
Sat, 26 Jul 2003 18:30:25 +0000 (18:30 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sat, 26 Jul 2003 18:30:25 +0000 (18:30 +0000)
* sync with 0.9.3cvs17
        see ChangeLog 2003-07-23

13 files changed:
ChangeLog.claws
configure.ac
src/compose.c
src/folder.c
src/folder.h
src/imap.c
src/inc.c
src/mbox.c
src/mbox_folder.c
src/messageview.c
src/mh.c
src/procmsg.c
src/procmsg.h

index 20b1096252cb876899f4cb2d2fe0e610ae7c76e4..9e16700165a39b42c5637af59891d4148e954a25 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-26 [christoph] 0.9.3claws56
+
+       * sync with 0.9.3cvs17
+               see ChangeLog 2003-07-23
+
 2003-07-26 [christoph] 0.9.3claws55
 
        * src/folder.[ch]
index d5f8d05a1041974a5bd2f96853fec3acac6fbe03..24db45281fde31ba99ec41995b68c6d9b868e927 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=54
+EXTRA_VERSION=56
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 0e639c39bfc1907effef6bd67c9413d2b885994e..0d9ab678e6fcafc54593f4f5940df1b470ebda62 100644 (file)
@@ -3870,7 +3870,7 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item,
                return -1;
        }
        folder_item_scan(queue);
-       if ((num = folder_item_add_msg(queue, tmp, TRUE)) < 0) {
+       if ((num = folder_item_add_msg(queue, tmp, NULL, TRUE)) < 0) {
                g_warning("can't queue the message\n");
                unlink(tmp);
                g_free(tmp);
@@ -6279,7 +6279,7 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
                return;
        }
 
-       if ((msgnum = folder_item_add_msg(draft, tmp, TRUE)) < 0) {
+       if ((msgnum = folder_item_add_msg(draft, tmp, NULL, TRUE)) < 0) {
                unlink(tmp);
                g_free(tmp);
                lock = FALSE;
index 565dbb32adb526d9a5fbce1dcd6b70fe92c21344..8d62acc47593835f2e94f55d62d412687234b395 100644 (file)
@@ -1653,15 +1653,18 @@ static void remove_msginfo_from_cache(FolderItem *item, MsgInfo *msginfo)
 }
 
 gint folder_item_add_msg(FolderItem *dest, const gchar *file,
-                        gboolean remove_source)
+                        MsgFlags *flags, gboolean remove_source)
 {
-       GSList file_list;
+        GSList file_list;
+        MsgFileInfo fileinfo;
 
        g_return_val_if_fail(dest != NULL, -1);
        g_return_val_if_fail(file != NULL, -1);
-
-       file_list.data = (gpointer) file;
-       file_list.next = NULL;
+        fileinfo.file = (gchar *)file;
+        fileinfo.flags = flags;
+        file_list.data = &fileinfo;
+        file_list.next = NULL;
 
        return folder_item_add_msgs(dest, &file_list, remove_source);
 }
@@ -1673,7 +1676,7 @@ gint folder_item_add_msgs(FolderItem *dest, GSList *file_list,
         gint ret, num, lastnum = -1;
        GSList *file_cur;
        MsgNumberList *newnum_list = NULL, *newnum_cur = NULL;
-       gchar *file = NULL;
+       MsgFileInfo *fileinfo = NULL;
        gboolean folderscan = FALSE;
 
         g_return_val_if_fail(dest != NULL, -1);
@@ -1690,9 +1693,9 @@ gint folder_item_add_msgs(FolderItem *dest, GSList *file_list,
                }
        } else {
                for (file_cur = file_list; file_cur != NULL; file_cur = g_slist_next(file_cur)) {
-                       file = (gchar *) file_cur->data;
+                       fileinfo = (MsgFileInfo *) file_cur->data;
 
-                       ret = folder->klass->add_msg(folder, dest, file);
+                       ret = folder->klass->add_msg(folder, dest, fileinfo->file, fileinfo->flags);
                        if (ret < 0) {
                                g_slist_free(newnum_list);
                                return ret;
@@ -1706,7 +1709,7 @@ gint folder_item_add_msgs(FolderItem *dest, GSList *file_list,
             newnum_cur = g_slist_next(newnum_cur), file_cur = g_slist_next(file_cur)) {
 
                num = GPOINTER_TO_INT(newnum_cur->data);
-               file = (gchar *) file_cur->data;
+               fileinfo = (MsgFileInfo *) file_cur->data;
 
                if (num >= 0) {
                        MsgInfo *newmsginfo;
@@ -1716,15 +1719,15 @@ gint folder_item_add_msgs(FolderItem *dest, GSList *file_list,
                                        folder_item_scan_full(dest, FALSE);
                                        folderscan = TRUE;
                                }
-                               num = folder_item_get_msg_num_by_file(dest, file);
+                               num = folder_item_get_msg_num_by_file(dest, fileinfo->file);
                        }
 
                        if (num > lastnum)
                                lastnum = num;
 
                        if (num >= 0 && remove_source) {
-                               if (unlink(file) < 0)
-                                       FILE_OP_ERROR(file, "unlink");
+                               if (unlink(fileinfo->file) < 0)
+                                       FILE_OP_ERROR(fileinfo->file, "unlink");
                        }
 
                        if (num == 0)
@@ -1952,11 +1955,18 @@ gint folder_item_move_msgs_with_dest(FolderItem *dest, GSList *msglist)
         * Copy messages to destination folder and 
         * store new message numbers in newmsgnums
         */
-       for (l = msglist ; l != NULL ; l = g_slist_next(l)) {
-               MsgInfo * msginfo = (MsgInfo *) l->data;
+       if (folder->klass->copy_msgs != NULL) {
+               if (folder->klass->copy_msgs(folder, dest, msglist, &newmsgnums) < 0) {
+                       g_slist_free(newmsgnums);
+                       return -1;
+               }
+       } else {
+               for (l = msglist ; l != NULL ; l = g_slist_next(l)) {
+                       MsgInfo * msginfo = (MsgInfo *) l->data;
 
-               num = folder->klass->copy_msg(folder, dest, msginfo);
-               newmsgnums = g_slist_append(newmsgnums, GINT_TO_POINTER(num));
+                       num = folder->klass->copy_msg(folder, dest, msginfo);
+                       newmsgnums = g_slist_append(newmsgnums, GINT_TO_POINTER(num));
+               }
        }
 
        /* Read cache for dest folder */
index e594a324d9dc205e66198deea84f9a0569c60bbe..29db16639d1ce0de6742ba70d5f1e3778b3054ed 100644 (file)
@@ -216,7 +216,8 @@ struct _FolderClass
                                                 gint            num);
        gint            (*add_msg)              (Folder         *folder,
                                                 FolderItem     *dest,
-                                                const gchar    *file);
+                                                const gchar    *file,
+                                                MsgFlags       *flags);
        gint            (*add_msgs)             (Folder         *folder,
                                                 FolderItem     *dest,
                                                 GSList         *file_list,
@@ -420,6 +421,7 @@ gchar *folder_item_fetch_msg                (FolderItem     *item,
                                         gint            num);
 gint   folder_item_add_msg             (FolderItem     *dest,
                                         const gchar    *file,
+                                        MsgFlags       *flags,
                                         gboolean        remove_source);
 gint   folder_item_add_msgs             (FolderItem     *dest,
                                          GSList         *file_list,
index 297da51d925f878b1283eaee13979418c96a2d82..093a09f2deb6b0147448ba48ae57e1bcd46ded51 100644 (file)
@@ -163,7 +163,10 @@ static void imap_session_destroy(Session * session);
 static gchar *imap_fetch_msg(Folder * folder, FolderItem * item, gint uid);
 static gint imap_add_msg(Folder * folder,
                         FolderItem * dest,
-                        const gchar * file);
+                        const gchar * file, MsgFlags * flags);
+static gint imap_add_msgs(Folder * folder, FolderItem * dest,
+                         GSList * file_list,
+                         MsgNumberList **newnum_list);
 
 static gint imap_copy_msg(Folder * folder,
                          FolderItem * dest, MsgInfo * msginfo);
@@ -245,9 +248,10 @@ static SockInfo *imap_init_sock(SockInfo *sock, SSLType    ssl_type);
 static SockInfo *imap_init_sock(SockInfo *sock);
 #endif
 
+static gchar *imap_get_flag_str                (IMAPFlags       flags);
 static gint imap_set_message_flags     (IMAPSession    *session,
                                         MsgNumberList  *numlist,
-                                        IMAPFlags       flag,
+                                        IMAPFlags       flags,
                                         gboolean        is_set);
 static gint imap_select                        (IMAPSession    *session,
                                         IMAPFolder     *folder,
@@ -344,6 +348,7 @@ static gint imap_cmd_fetch  (IMAPSession    *sock,
 static gint imap_cmd_append    (IMAPSession    *session,
                                 const gchar    *destfolder,
                                 const gchar    *file,
+                                IMAPFlags       flags,
                                 gint32         *newuid);
 static gint imap_cmd_copy      (IMAPSession    *session,
                                 gint32         msgnum,
@@ -431,7 +436,7 @@ FolderClass imap_class =
        imap_get_msginfos,
        imap_fetch_msg,
        imap_add_msg,
-       NULL,
+       imap_add_msgs,
        imap_copy_msg,
        NULL,
        imap_remove_msg,
@@ -779,29 +784,80 @@ gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint uid)
        return filename;
 }
 
-gint imap_add_msg(Folder *folder, FolderItem *dest, const gchar *file)
+gint imap_add_msg(Folder *folder, FolderItem *dest, const gchar *file, MsgFlags *flags)
+{
+       gint ret;
+       GSList file_list;
+       MsgFileInfo fileinfo;
+       MsgNumberList *msgnum_list = NULL;
+
+       g_return_val_if_fail(file != NULL, -1);
+
+       fileinfo.file = (gchar *)file;
+       fileinfo.flags = flags;
+       file_list.data = &fileinfo;
+       file_list.next = NULL;
+
+       ret = imap_add_msgs(folder, dest, &file_list, &msgnum_list);
+       g_slist_free(msgnum_list);
+       return ret;
+}
+
+gint imap_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list,
+                  MsgNumberList **newnum_list)
 {
        gchar *destdir;
        IMAPSession *session;
-       gint ok, newuid;
+       guint32 last_uid = 0;
+       GSList *cur;
+       MsgFileInfo *fileinfo;
+       gint ok, newnum;
 
        g_return_val_if_fail(folder != NULL, -1);
        g_return_val_if_fail(dest != NULL, -1);
-       g_return_val_if_fail(file != NULL, -1);
+       g_return_val_if_fail(file_list != NULL, -1);
 
        session = imap_session_get(folder);
        if (!session) return -1;
 
        destdir = imap_get_real_path(IMAP_FOLDER(folder), dest->path);
-       ok = imap_cmd_append(session, destdir, file, &newuid);
-       g_free(destdir);
 
-       if (ok != IMAP_SUCCESS) {
-               g_warning("can't append message %s\n", file);
-               return -1;
+       for (cur = file_list; cur != NULL; cur = cur->next) {
+               IMAPFlags iflags = 0;
+
+               fileinfo = (MsgFileInfo *)cur->data;
+
+               if (fileinfo->flags) {
+                       if (MSG_IS_MARKED(*fileinfo->flags))
+                               iflags |= IMAP_FLAG_FLAGGED;
+                       if (MSG_IS_REPLIED(*fileinfo->flags))
+                               iflags |= IMAP_FLAG_ANSWERED;
+                       if (!MSG_IS_UNREAD(*fileinfo->flags))
+                               iflags |= IMAP_FLAG_SEEN;
+               }
+
+               if (dest->stype == F_OUTBOX ||
+                   dest->stype == F_QUEUE  ||
+                   dest->stype == F_DRAFT  ||
+                   dest->stype == F_TRASH)
+                       iflags |= IMAP_FLAG_SEEN;
+
+               ok = imap_cmd_append(session, destdir, fileinfo->file, iflags, &newnum);
+
+               if (ok != IMAP_SUCCESS) {
+                       g_warning("can't append message %s\n", fileinfo->file);
+                       g_free(destdir);
+                       return -1;
+               }
+
+               *newnum_list = g_slist_append(*newnum_list, GINT_TO_POINTER(newnum));
+               if (newnum > last_uid)
+                       last_uid = newnum;
        }
 
-       return newuid;
+       g_free(destdir);
+
+       return last_uid;
 }
 
 static gint imap_do_copy(Folder *folder, FolderItem *dest, MsgInfo *msginfo,
@@ -879,7 +935,7 @@ gint imap_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo)
        srcfile = procmsg_get_message_file(msginfo);
        if (!srcfile) return -1;
 
-       ret = imap_add_msg(folder, dest, srcfile);
+       ret = imap_add_msg(folder, dest, srcfile, NULL);
 
        g_free(srcfile);
 
@@ -2101,35 +2157,49 @@ static MsgInfo *imap_parse_envelope(SockInfo *sock, FolderItem *item,
        return msginfo;
 }
 
+static gchar *imap_get_flag_str(IMAPFlags flags)
+{
+       GString *str;
+       gchar *ret;
+
+       str = g_string_new(NULL);
+
+       if (IMAP_IS_SEEN(flags))        g_string_append(str, "\\Seen ");
+       if (IMAP_IS_ANSWERED(flags))    g_string_append(str, "\\Answered ");
+       if (IMAP_IS_FLAGGED(flags))     g_string_append(str, "\\Flagged ");
+       if (IMAP_IS_DELETED(flags))     g_string_append(str, "\\Deleted ");
+       if (IMAP_IS_DRAFT(flags))       g_string_append(str, "\\Draft");
+
+       if (str->str[str->len - 1] == ' ')
+               g_string_truncate(str, str->len - 1);
+
+       ret = str->str;
+       g_string_free(str, FALSE);
+
+       return ret;
+}
+
 static gint imap_set_message_flags(IMAPSession *session,
                                   MsgNumberList *numlist,
                                   IMAPFlags flags,
                                   gboolean is_set)
 {
-       GString *buf;
+       gchar *cmd;
+       gchar *flag_str;
        gint ok;
        IMAPSet imapset;
 
-       buf = g_string_new(is_set ? "+FLAGS (" : "-FLAGS (");
-
-       if (IMAP_IS_SEEN(flags))        g_string_append(buf, "\\Seen ");
-       if (IMAP_IS_ANSWERED(flags))    g_string_append(buf, "\\Answered ");
-       if (IMAP_IS_FLAGGED(flags))     g_string_append(buf, "\\Flagged ");
-       if (IMAP_IS_DELETED(flags))     g_string_append(buf, "\\Deleted ");
-       if (IMAP_IS_DRAFT(flags))       g_string_append(buf, "\\Draft");
-
-       if (buf->str[buf->len - 1] == ' ')
-               g_string_truncate(buf, buf->len - 1);
-
-       g_string_append_c(buf, ')');
+       flag_str = imap_get_flag_str(flags);
+       cmd = g_strconcat(is_set ? "+FLAGS.SILENT (" : "-FLAGS.SILENT (",
+                         flag_str, ")", NULL);
+       g_free(flag_str);
 
        imapset = numberlist_to_imapset(numlist);
        while (imapset != NULL) {
-               ok = imap_cmd_store(session, imapset,
-                                   buf->str);
+               ok = imap_cmd_store(session, imapset, cmd);
                imapset = numberlist_to_imapset(NULL);
        }
-       g_string_free(buf, TRUE);
+       g_free(cmd);
 
        return ok;
 }
@@ -2695,11 +2765,12 @@ static gint imap_cmd_fetch(IMAPSession *session, guint32 uid, const gchar *filen
 }
 
 static gint imap_cmd_append(IMAPSession *session, const gchar *destfolder,
-                           const gchar *file, gint32 *new_uid)
+                           const gchar *file, IMAPFlags flags, gint32 *new_uid)
 {
        gint ok;
        gint size, newuid;
        gchar *destfolder_;
+       gchar *flag_str;
        gchar buf[BUFFSIZE], *imapbuf;
        FILE *fp;
        GPtrArray *reply;
@@ -2713,7 +2784,10 @@ static gint imap_cmd_append(IMAPSession *session, const gchar *destfolder,
                return -1;
        }
        QUOTE_IF_REQUIRED(destfolder_, destfolder);
-       imap_gen_send(session, "APPEND %s (\\Seen) {%d}", destfolder_, size);
+       flag_str = imap_get_flag_str(flags);
+       imap_gen_send(session, "APPEND %s (%s) {%d}", 
+                     destfolder_, flag_str, size);
+       g_free(flag_str);
 
        ok = imap_gen_recv(session, &imapbuf);
        if (ok != IMAP_SUCCESS || imapbuf[0] != '+' || imapbuf[1] != ' ') {
index 8ad34d99e78506a7d96b50d120c32fc64ef8a264..1f22dbb63980a02a959ed5fc905cfb38ae245816 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -968,7 +968,7 @@ gint inc_drop_message(const gchar *file, Pop3Session *session)
        dropfolder = folder_get_default_processing();
 
        /* add msg file to drop folder */
-       if ((msgnum = folder_item_add_msg(dropfolder, file, TRUE)) < 0) {
+       if ((msgnum = folder_item_add_msg(dropfolder, file, NULL, TRUE)) < 0) {
                unlink(file);
                return -1;
        }
index 19e94dec4e9e3723ec0e6929f6893806f9e4edac..db19a6099a80631a146c33dc8394320601ee0cea 100644 (file)
@@ -206,7 +206,7 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox)
 
                dropfolder = folder_get_default_processing();
                        
-               if ((msgnum = folder_item_add_msg(dropfolder, tmp_file, TRUE)) < 0) {
+               if ((msgnum = folder_item_add_msg(dropfolder, tmp_file, NULL, TRUE)) < 0) {
                        fclose(mbox_fp);
                        unlink(tmp_file);
                        g_free(tmp_file);
index 44ba92284ba7e4ba44c9171dc4b990826d6b7269..dc1f8f67dad0119ddb1f66cd017a3b68302d6cbf 100644 (file)
@@ -42,7 +42,7 @@ static gchar *mbox_fetch_msg(Folder * folder, FolderItem * item, gint num);
 
 static void mbox_scan_folder(Folder * folder, FolderItem * item);
 static gint mbox_add_msg(Folder * folder, FolderItem * dest,
-                        const gchar * file, gboolean remove_source);
+                        const gchar * file, MsgFlags *flags);
 
 static gint mbox_remove_all_msg(Folder * folder, FolderItem * item);
 static gint mbox_remove_msg(Folder * folder, FolderItem * item, gint num);
@@ -1330,7 +1330,7 @@ gchar *mbox_fetch_msg(Folder *folder, FolderItem *item, gint num)
 }
 
 gint mbox_add_msg(Folder *folder, FolderItem *dest, const gchar *file,
-                 gboolean remove_source)
+                 MsgFlags *flags)
 {
        FILE * src_fp;
        FILE * dest_fp;
@@ -1440,11 +1440,6 @@ gint mbox_add_msg(Folder *folder, FolderItem *dest, const gchar *file,
                return -1;
        }
 
-       if (remove_source) {
-               if (unlink(file) < 0)
-                       FILE_OP_ERROR(file, "unlink");
-       }
-
        g_free(mbox_path);
 
        dest->last_num++;
index 6faf45e60e9d97a9da17bc440dff878891239910..24028cf45323b15ea5697a9866a532a0fa408209 100644 (file)
@@ -517,7 +517,7 @@ static gint disposition_notification_queue(PrefsAccount * account,
        }
 
        queue = folder_get_default_queue();
-       if ((num = folder_item_add_msg(queue, tmp, TRUE)) < 0) {
+       if ((num = folder_item_add_msg(queue, tmp, NULL, TRUE)) < 0) {
                g_warning("can't queue the message\n");
                unlink(tmp);
                g_free(tmp);
index a49507a4a1e8cda6dc6526d7a6e67ba5e2f8530d..319b44919ba03ec1bb90331c1c4fbf5888b4c194 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -53,7 +53,8 @@ static MsgInfo *mh_get_msginfo(Folder * folder,
                               FolderItem * item, gint num);
 static gint mh_add_msg(Folder * folder,
                       FolderItem * dest,
-                      const gchar * file);
+                      const gchar * file,
+                      MsgFlags * flags);
 static gint mh_add_msgs(Folder * folder,
                 FolderItem * dest, GSList * file_list, MsgNumberList **newnum_list);
 static gint mh_copy_msg(Folder * folder,
@@ -309,18 +310,21 @@ gchar *mh_get_new_msg_filename(FolderItem *dest)
        procmsg_write_flags(&newmsginfo, fp); \
 }
 
-gint mh_add_msg(Folder *folder, FolderItem *dest, const gchar *file)
+gint mh_add_msg(Folder *folder, FolderItem *dest, const gchar *file, MsgFlags *flags)
 {
-        GSList file_list; 
        gint ret;
+       GSList file_list;
+       MsgFileInfo fileinfo;
        MsgNumberList *newnum_list = NULL;
-  
-        g_return_val_if_fail(file != NULL, -1); 
-  
-        file_list.data = (gpointer) file; 
-        file_list.next = NULL; 
-  
-        ret = mh_add_msgs(folder, dest, &file_list, NULL); 
+
+       g_return_val_if_fail(file != NULL, -1);
+
+       fileinfo.file = (gchar *)file;
+       fileinfo.flags = flags;
+       file_list.data = &fileinfo;
+       file_list.next = NULL;
+
+        ret = mh_add_msgs(folder, dest, &file_list, &newnum_list);
        g_slist_free(newnum_list);
        return ret;
 } 
@@ -329,8 +333,8 @@ gint mh_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list,
                  MsgNumberList **newnum_list) 
 { 
        gchar *destfile;
-        GSList *cur; 
-        gchar *file; 
+       GSList *cur;
+       MsgFileInfo *fileinfo;
 
        g_return_val_if_fail(dest != NULL, -1);
        g_return_val_if_fail(file_list != NULL, -1);
@@ -340,19 +344,19 @@ gint mh_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list,
                if (dest->last_num < 0) return -1;
        }
 
-        for (cur = file_list; cur != NULL; cur = cur->next) { 
-                file = (gchar *)cur->data; 
-
-                destfile = mh_get_new_msg_filename(dest); 
-                if (destfile == NULL) return -1; 
-  
-                if (link(file, destfile) < 0) { 
-                        if (copy_file(file, destfile, TRUE) < 0) { 
-                                g_warning(_("can't copy message %s to %s\n"), 
-                                          file, destfile); 
-                                g_free(destfile); 
-                                return -1; 
-                        } 
+       for (cur = file_list; cur != NULL; cur = cur->next) {
+               fileinfo = (MsgFileInfo *)cur->data;
+
+               destfile = mh_get_new_msg_filename(dest);
+               if (destfile == NULL) return -1;
+
+               if (link(fileinfo->file, destfile) < 0) {
+                       if (copy_file(fileinfo->file, destfile, TRUE) < 0) {
+                               g_warning(_("can't copy message %s to %s\n"),
+                                         fileinfo->file, destfile);
+                               g_free(destfile);
+                               return -1;
+                       }
                }
                *newnum_list = g_slist_append(*newnum_list, GINT_TO_POINTER(dest->last_num + 1));
 
@@ -360,7 +364,7 @@ gint mh_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list,
                dest->last_num++;
        }
 
-       return dest->last_num; 
+       return dest->last_num;
 }
 
 gint mh_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo)
index 6bd720d3ea23a7559f664701463a541c12a332f2..96ae8728abf0a8f155f361c171fb7ac297484922 100644 (file)
@@ -728,14 +728,14 @@ gint procmsg_save_to_outbox(FolderItem *outbox, const gchar *file,
                        return -1;
 
                folder_item_scan(outbox);
-               if ((num = folder_item_add_msg(outbox, tmp, TRUE)) < 0) {
+               if ((num = folder_item_add_msg(outbox, tmp, NULL, TRUE)) < 0) {
                        g_warning("can't save message\n");
                        unlink(tmp);
                        return -1;
                }
        } else {
                folder_item_scan(outbox);
-               if ((num = folder_item_add_msg(outbox, file, FALSE)) < 0) {
+               if ((num = folder_item_add_msg(outbox, file, NULL, FALSE)) < 0) {
                        g_warning("can't save message\n");
                        return -1;
                }
index a2f3ffe3091e6126a8f572c5af7556b1e544daf0..ad7ee8b7856a35c960bbcd19e5727541710c2438 100644 (file)
@@ -32,6 +32,7 @@
 
 typedef struct _MsgInfo                        MsgInfo;
 typedef struct _MsgFlags               MsgFlags;
+typedef struct _MsgFileInfo            MsgFileInfo;
 typedef struct _MsgInfoUpdate          MsgInfoUpdate;
 typedef struct _MailFilteringData      MailFilteringData;
 
@@ -194,6 +195,12 @@ struct _MsgInfo
        guint decryption_failed : 1;
 };
 
+struct _MsgFileInfo
+{
+        gchar *file;
+        MsgFlags *flags;
+};
+
 struct _MsgInfoUpdate {
        MsgInfo *msginfo;
 };