From e0c522c6a01c7a566bbceeff5cef67ddd8aede35 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sat, 18 Jun 2011 18:49:33 +0300 Subject: [PATCH] * mu-cmd-find: use the semi-working message threading --- src/mu-cmd-find.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/mu-cmd-find.c b/src/mu-cmd-find.c index a3dcb64d..cc72aa79 100644 --- a/src/mu-cmd-find.c +++ b/src/mu-cmd-find.c @@ -551,6 +551,26 @@ print_summary (MuMsgIter *iter) } +static void +indent (MuMsgIter *iter) +{ + const char* threadpath; + int i; + + threadpath = mu_msg_iter_get_thread_path (iter); + if (!threadpath) + return; + + fputs (threadpath, stdout); + + /* count the colons... */ + for (i = 0; *threadpath; ++threadpath) + i += (*threadpath == ':') ? 1 : 0; + + /* indent */ + while (i --> -1) + fputs (" ", stdout); +} static gboolean output_plain (MuMsgIter *iter, const char *fields, gboolean summary, @@ -567,6 +587,8 @@ output_plain (MuMsgIter *iter, const char *fields, gboolean summary, const char* myfields; int len; + + indent (myiter); for (myfields = fields, len = 0; *myfields; ++myfields) { MuMsgFieldId mfid;