aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-08 05:54:14 +0800
committerDan Winship <danw@src.gnome.org>2000-07-08 05:54:14 +0800
commit0c9c8a55f81cfd4274b96a13d26f224f48f0a1aa (patch)
tree7e9c0ed210bfbce4628101b5bfbf075730cc6a98
parentb817b9cb3e461f253d54b10e5a1b802b1b5b2058 (diff)
downloadgsoc2013-evolution-0c9c8a55f81cfd4274b96a13d26f224f48f0a1aa.tar
gsoc2013-evolution-0c9c8a55f81cfd4274b96a13d26f224f48f0a1aa.tar.gz
gsoc2013-evolution-0c9c8a55f81cfd4274b96a13d26f224f48f0a1aa.tar.bz2
gsoc2013-evolution-0c9c8a55f81cfd4274b96a13d26f224f48f0a1aa.tar.lz
gsoc2013-evolution-0c9c8a55f81cfd4274b96a13d26f224f48f0a1aa.tar.xz
gsoc2013-evolution-0c9c8a55f81cfd4274b96a13d26f224f48f0a1aa.tar.zst
gsoc2013-evolution-0c9c8a55f81cfd4274b96a13d26f224f48f0a1aa.zip
(sort_node): sort the tree by the original order of the messages
in the folder rather than by date. svn path=/trunk/; revision=3963
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/message-thread.c5
-rw-r--r--mail/message-thread.h1
3 files changed, 7 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f33cafe649..1462275027 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -8,6 +8,9 @@
nodes in the "subjects are common" case. Fixes a bug that would
cause the message list to be truncated if this rule was invoked.
+ (sort_node): sort the tree by the original order of the messages
+ in the folder rather than by date.
+
2000-07-07 Dan Winship <danw@helixcode.com>
* message-list.c: Lots of changes. Store uids as node data on the
diff --git a/mail/message-thread.c b/mail/message-thread.c
index 9c0325ed21..a1abc23560 100644
--- a/mail/message-thread.c
+++ b/mail/message-thread.c
@@ -361,9 +361,9 @@ sort_node(const void *a, const void *b)
a1 = a1->child;
if (b1->message == NULL)
b1 = b1->child;
- if (a1->message->date_sent == b1->message->date_sent)
+ if (a1->order == b1->order)
return 0;
- if (a1->message->date_sent < b1->message->date_sent)
+ if (a1->order < b1->order)
return 1;
else
return -1;
@@ -429,6 +429,7 @@ thread_messages(CamelFolder *folder, GPtrArray *uids)
c->message = mi;
g_hash_table_insert(id_table, mi->message_id, c);
}
+ c->order = i;
container = c;
ref = mi->references;
p = NULL;
diff --git a/mail/message-thread.h b/mail/message-thread.h
index ffde0019b9..d66baacbdd 100644
--- a/mail/message-thread.h
+++ b/mail/message-thread.h
@@ -8,6 +8,7 @@ struct _container {
const CamelMessageInfo *message;
char *root_subject; /* cached root equivalent subject */
int re; /* re version of subject? */
+ int order; /* the order of this message in the folder */
};
struct _container *thread_messages(CamelFolder *folder, GPtrArray *uids);