diff options
author | Scott Robinson <scott@quadhome.com> | 2009-12-31 11:17:40 -0400 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-02-23 12:01:12 -0800 |
commit | 6ce2bf68f53fec4302121763e588c33c7cd86a9c (patch) | |
tree | 97eed1a84956f582cc43efbb16419c43b930c242 /show-message.c | |
parent | 3ca7a4fbcc9cd72330bce1b1670150af1e250006 (diff) |
Add an "--format=(json|text)" command-line option to both notmuch-search and notmuch-show.
In the case of notmuch-show, "--format=json" also implies
"--entire-thread" as the thread structure is implicit in the emitted
document tree.
As a coincidence to the implementation, multipart message ID numbers are
now incremented with each part printed. This changes the previous
semantics, which were unclear and not necessary related to the actual
ordering of the message parts.
Diffstat (limited to 'show-message.c')
-rw-r--r-- | show-message.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/show-message.c b/show-message.c index 784981b6..05ced9c4 100644 --- a/show-message.c +++ b/show-message.c @@ -26,8 +26,6 @@ static void show_message_part (GMimeObject *part, int *part_count, void (*show_part) (GMimeObject *part, int *part_count)) { - *part_count = *part_count + 1; - if (GMIME_IS_MULTIPART (part)) { GMimeMultipart *multipart = GMIME_MULTIPART (part); int i; @@ -56,6 +54,8 @@ show_message_part (GMimeObject *part, int *part_count, return; } + *part_count = *part_count + 1; + (*show_part) (part, part_count); } |