* src/prefs_common.[ch]
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Thu, 19 Jun 2003 08:45:07 +0000 (08:45 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Thu, 19 Jun 2003 08:45:07 +0000 (08:45 +0000)
* src/procmsg.c
restrict threading by subject by checking thread for
age (prefs_common.thread_by_subject_max_age)

ChangeLog.claws
configure.ac
src/prefs_common.c
src/prefs_common.h
src/procmsg.c

index 376e15ca93def309905fd2c7493db1f4e2ecab1e..463cf6add9682e9b3f0e8e4ce3b285b3557f98ed 100644 (file)
@@ -1,3 +1,10 @@
+2003-06-19 [alfons]    0.9.0claws48
+
+       * src/prefs_common.[ch]
+       * src/procmsg.c
+               restrict threading by subject by checking thread for
+               age (prefs_common.thread_by_subject_max_age)
+
 2003-06-18 [christoph] 0.9.0claws47
 
        * src/imap.c
 2003-06-18 [christoph] 0.9.0claws47
 
        * src/imap.c
index f8924244d75ea73e3ca549dbea991f6e07655b0b..9a212caadb7678099679ef90100a0e555b339c2b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws47
+EXTRA_VERSION=claws48
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index b40ee09b8171ec5c13c00aafb0478bbe93bf33a2..9fd7a84f79d63313cc3ba27299dcc7dd48ff9a82 100644 (file)
@@ -527,6 +527,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
         NULL, NULL, NULL},
         NULL, NULL, NULL},
        {"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
         NULL, NULL, NULL},
+       {"thread_by_subject_max_age", "10", &prefs_common.thread_by_subject_max_age,
+       P_INT, NULL, NULL, NULL },
 
        {"enable_thread", "TRUE", &prefs_common.enable_thread, P_BOOL,
         NULL, NULL, NULL},
 
        {"enable_thread", "TRUE", &prefs_common.enable_thread, P_BOOL,
         NULL, NULL, NULL},
index 74bf8fe1ad484fc1860d34de2de95ef6103cb17e..50a9de9ce9c55d97d4dcb727e26bf72fcab478b1 100644 (file)
@@ -145,6 +145,8 @@ struct _PrefsCommon
        gboolean bold_unread;
        gboolean enable_thread;
        gboolean thread_by_subject;
        gboolean bold_unread;
        gboolean enable_thread;
        gboolean thread_by_subject;
+       gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded
+                                        *   by subject (days) */
 
        ToolbarStyle toolbar_style;
        gboolean show_statusbar;
 
        ToolbarStyle toolbar_style;
        gboolean show_statusbar;
index d501bb33f6e2ae3634d1b7c72cf18446b30f53f6..0acc2d6b963a36206aa6707db89b2ae55e250d94 100644 (file)
@@ -232,6 +232,10 @@ GNode *procmsg_get_thread_tree(GSList *mlist)
                                        parent = NULL;
                                if (parent == node)
                                        parent = NULL;
                                        parent = NULL;
                                if (parent == node)
                                        parent = NULL;
+                               /* check if the message should be added to this thread */
+                               if (parent && abs(((MsgInfo *)parent->data)->date_t - msginfo->date_t) > 
+                                               prefs_common.thread_by_subject_max_age * 3600 * 24)
+                                       parent = NULL;
                        }
 
                        if (parent) {
                        }
 
                        if (parent) {