* 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 376e15c..463cf6a 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
index f892424..9a212ca 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 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
index b40ee09..9fd7a84 100644 (file)
@@ -527,6 +527,8 @@ static PrefParam param[] = {
         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},
index 74bf8fe..50a9de9 100644 (file)
@@ -145,6 +145,8 @@ struct _PrefsCommon
        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;
index d501bb3..0acc2d6 100644 (file)
@@ -232,6 +232,10 @@ GNode *procmsg_get_thread_tree(GSList *mlist)
                                        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) {