url_free_tags(query_items);
return rc;
}
+
+char *nm_get_description(CONTEXT *ctx)
+{
+ BUFFY *p;
+
+ for (p = VirtIncoming; p; p = p->next)
+ if (p->path && p->desc && strcmp(p->path, ctx->path) == 0)
+ return p->desc;
+
+ return NULL;
+}
void nm_longrun_init(CONTEXT *cxt, int writable);
void nm_longrun_done(CONTEXT *cxt);
+char *nm_get_description(CONTEXT *ctx);
+
#endif /* _MUTT_NOTMUCH_H_ */
#include "mapping.h"
#include "mx.h"
+#ifdef USE_NOTMUCH
+#include "mutt_notmuch.h"
+#endif
+
#include <string.h>
#include <ctype.h>
#include <unistd.h>
break;
case 'f':
- snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
+ {
+#ifdef USE_NOTMUCH
+ char *p;
+ if (Context && Context->magic == M_NOTMUCH &&
+ (p = nm_get_description(Context)))
+ strfcpy(tmp, p, sizeof (tmp));
+ else
+#endif
if (Context && Context->path)
{
strfcpy (tmp, Context->path, sizeof (tmp));
}
else
strfcpy (tmp, _("(no mailbox)"), sizeof (tmp));
+
+ snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
snprintf (buf, buflen, fmt, tmp);
break;
-
+ }
case 'F':
if (!optional)
{