aboutsummaryrefslogtreecommitdiffhomepage
path: root/query.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-10-26 17:35:31 -0700
committerGravatar Carl Worth <cworth@cworth.org>2009-10-26 17:35:31 -0700
commitc12823648ee84b4748e0e9f0cd97f7264911b589 (patch)
treec3bbb5ed573bcd2a63167416ccab6a09f708ffb5 /query.cc
parent8e96a87fff4d34a154d1456e9ad47e7b0c322d54 (diff)
Add public notmuch_thread_get_subject
And use this in "notmuch search" to display subject line as well as thread ID.
Diffstat (limited to 'query.cc')
-rw-r--r--query.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/query.cc b/query.cc
index c8a91491..5fac024e 100644
--- a/query.cc
+++ b/query.cc
@@ -207,9 +207,15 @@ notmuch_query_search_threads (notmuch_query_t *query)
thread_id, NULL,
(void **) &thread))
{
+ const char *subject;
+
thread = _notmuch_thread_create (query, query->notmuch,
thread_id);
+ subject = _notmuch_message_get_subject (message);
+
+ _notmuch_thread_set_subject (thread, subject);
+
g_hash_table_insert (seen, xstrdup (thread_id), thread);
g_ptr_array_add (thread_results->threads, thread);
@@ -222,6 +228,8 @@ notmuch_query_search_threads (notmuch_query_t *query)
tag = notmuch_tags_get (tags);
_notmuch_thread_add_tag (thread, tag);
}
+
+ notmuch_message_destroy (message);
}
g_hash_table_unref (seen);