0.8.8claws18
authorChristoph Hohmann <reboot@gmx.ch>
Sun, 29 Dec 2002 00:30:38 +0000 (00:30 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sun, 29 Dec 2002 00:30:38 +0000 (00:30 +0000)
* src/folder.c
* src/procmsg.[ch]
        check parent messages for IGNORE THREAD flag, when adding,
        moving or copying messages to a folder

ChangeLog.claws
configure.in
src/folder.c
src/procmsg.c
src/procmsg.h

index 99c86a975280ec439f019c8f875dca0576b320e2..74e59bea9379c0a017fa69fec21342475cc2eb70 100644 (file)
@@ -1,3 +1,10 @@
+2002-12-29 [christoph] 0.8.8claws18
+
+       * src/folder.c
+       * src/procmsg.[ch]
+               check parent messages for IGNORE THREAD flag, when adding,
+               moving or copying messages to a folder
+
 2002-12-27 [alfons]    0.8.8claws17
 
        re-organize matcher part 5; more to come
index 580f180c7eb56e42669de23280417e6b8f96b28d..4b1f51c159e964196e88946c20f9b0e85f3cca04 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws17
+EXTRA_VERSION=claws18
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 85aae92c89baaa913de33a1dc34cf09d1de21e08..8a18558ee32a564806e863b6152e6f85362d36fc 100644 (file)
@@ -1146,6 +1146,8 @@ gint folder_item_scan(FolderItem *item)
                                                unreadcnt++;
                                        if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
                                                unreadmarkedcnt++;
+                                       if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+                                               procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
                                        procmsg_msginfo_free(newmsginfo);
                                }                                       
 
@@ -1157,6 +1159,8 @@ gint folder_item_scan(FolderItem *item)
                                        unreadcnt++;
                                if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
                                        unreadmarkedcnt++;
+                               if (procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD))
+                                       procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
                        }
                        totalcnt++;
                        procmsg_msginfo_free(msginfo);
@@ -1204,6 +1208,8 @@ gint folder_item_scan(FolderItem *item)
                                        unreadcnt++;
                                if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
                                        unreadmarkedcnt++;
+                               if (procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD))
+                                       procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
                                totalcnt++;
                                procmsg_msginfo_free(msginfo);
                        }
@@ -1226,6 +1232,8 @@ gint folder_item_scan(FolderItem *item)
                                    unreadcnt++;
                                if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
                                        unreadmarkedcnt++;
+                               if (procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD))
+                                       procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
                                totalcnt++;
                                procmsg_msginfo_free(msginfo);
                                debug_print("Added newly found message %d to cache.\n", num);
@@ -1478,6 +1486,8 @@ gint folder_item_add_msg(FolderItem *dest, const gchar *file,
                                dest->unread++;
                        if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
                                dest->unreadmarked++;
+                       if (procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD))
+                               procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
                        dest->total++;
                        dest->need_update = TRUE;
 
@@ -1690,6 +1700,8 @@ gint folder_item_move_msg(FolderItem *dest, MsgInfo *msginfo)
                                dest->unread++;
                        if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
                                dest->unreadmarked++;
+                       if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+                               procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
                        dest->total++;
                        dest->need_update = TRUE;
 
@@ -1803,6 +1815,8 @@ gint folder_item_move_msgs_with_dest(FolderItem *dest, GSList *msglist)
                                        dest->unread++;
                                if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
                                        dest->unreadmarked++;
+                               if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+                                       procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
                                dest->total++;
                                dest->need_update = TRUE;
 
@@ -1905,6 +1919,8 @@ gint folder_item_copy_msg(FolderItem *dest, MsgInfo *msginfo)
                                dest->unread++;
                        if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
                                dest->unreadmarked++;
+                       if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+                               procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
                        dest->total++;
                        dest->need_update = TRUE;
 
@@ -1996,6 +2012,8 @@ gint folder_item_copy_msgs_with_dest(FolderItem *dest, GSList *msglist)
                                        dest->unread++;
                                if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
                                        dest->unreadmarked++;
+                               if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+                                       procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
                                dest->total++;
                                dest->need_update = TRUE;
 
index 1ea38d82ca632ac3c48e56d5ba4216dfbbdbf3a0..96c7c6c6b5d4545f24d88f1e67d339f7015b8a86 100644 (file)
@@ -1599,17 +1599,19 @@ void procmsg_msginfo_write_flags(MsgInfo *msginfo)
        g_free(destdir);
 }
 
-gboolean procmsg_msg_has_marked_parent (MsgInfo *info)
+gboolean procmsg_msg_has_flagged_parent(MsgInfo *info, MsgPermFlags perm_flags)
 {
        MsgInfo *tmp;
+
        g_return_val_if_fail(info != NULL, FALSE);
+
        if (info != NULL && info->folder != NULL && info->inreplyto != NULL) {
                tmp = folder_item_get_msginfo_by_msgid(info->folder, info->inreplyto);
-               if (tmp && MSG_IS_MARKED(tmp->flags)) {
+               if (tmp && (tmp->flags.perm_flags & perm_flags)) {
                        procmsg_msginfo_free(tmp);
                        return TRUE;
                } else if (tmp != NULL) {
-                       gboolean result = procmsg_msg_has_marked_parent(tmp);
+                       gboolean result = procmsg_msg_has_flagged_parent(tmp, perm_flags);
                        procmsg_msginfo_free(tmp);
                        return result;
                } else {
@@ -1617,6 +1619,11 @@ gboolean procmsg_msg_has_marked_parent   (MsgInfo *info)
                }
        } else
                return FALSE;
+}
+
+gboolean procmsg_msg_has_marked_parent(MsgInfo *info)
+{
+       return procmsg_msg_has_flagged_parent(info, MSG_MARKED);
 }      
 
 GSList *procmsg_find_children (MsgInfo *info)
index fbf080ff559a79507b05f23227a6ef7c4e6c6afa..71688b186697e95670c91b991c90e3788df92cd2 100644 (file)
@@ -290,6 +290,8 @@ void procmsg_msginfo_unset_flags    (MsgInfo *msginfo,
 gint procmsg_remove_special_headers    (const gchar    *in, 
                                         const gchar    *out);
 
+gboolean procmsg_msg_has_flagged_parent        (MsgInfo        *info,
+                                        MsgPermFlags    perm_flags);
 gboolean procmsg_msg_has_marked_parent (MsgInfo        *info);
 GSList *procmsg_find_children          (MsgInfo        *info);
 #endif /* __PROCMSG_H__ */