diff options
author | Austin Clements <amdragon@MIT.EDU> | 2012-02-19 19:26:25 -0500 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-03-01 08:28:02 -0400 |
commit | 2209d7b9520000fbd6941b1e0e8521da90f443c6 (patch) | |
tree | 903794b11ec2e2ee0ceac15ec5c20bac72af9a9c /notmuch-show.c | |
parent | 44d9656cbf51ade90e372eadbf3542de83549c74 (diff) |
show: Use consistent header ordering in the JSON format
Previously, top-level message headers were printed as Subject, From,
To, Date, while embedded message headers were printed From, To,
Subject, Date. This makes both cases use the former order and updates
the tests accordingly.
Diffstat (limited to 'notmuch-show.c')
-rw-r--r-- | notmuch-show.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/notmuch-show.c b/notmuch-show.c index 868b2cd..9ca9882 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -328,6 +328,9 @@ format_headers_message_part_json (GMimeMessage *message) const char *recipients_string; printf ("%s: %s", + json_quote_str (ctx_quote, "Subject"), + json_quote_str (ctx_quote, g_mime_message_get_subject (message))); + printf (", %s: %s", json_quote_str (ctx_quote, "From"), json_quote_str (ctx_quote, g_mime_message_get_sender (message))); recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO); @@ -343,9 +346,6 @@ format_headers_message_part_json (GMimeMessage *message) json_quote_str (ctx_quote, "Cc"), json_quote_str (ctx_quote, recipients_string)); printf (", %s: %s", - json_quote_str (ctx_quote, "Subject"), - json_quote_str (ctx_quote, g_mime_message_get_subject (message))); - printf (", %s: %s", json_quote_str (ctx_quote, "Date"), json_quote_str (ctx_quote, g_mime_message_get_date_as_string (message))); |