** .dt %B .dd Name of the mailbox
** .dt %S .dd * Size of mailbox (total number of messages)
** .dt %N .dd * Number of New messages in the mailbox
+ ** .dt %n .dd N if mailbox has new mail, blank otherwise
** .dt %F .dd * Number of Flagged messages in the mailbox
** .dt %! .dd ``!'' : one flagged message;
** ``!!'' : two flagged messages;
* @flags: Format flags, e.g. MUTT_FORMAT_OPTIONAL
*
* cb_format_str is a callback function for mutt_FormatString. It understands
- * five operators. '%B' : Mailbox name, '%F' : Number of flagged messages,
+ * six operators. '%B' : Mailbox name, '%F' : Number of flagged messages,
* '%N' : Number of new messages, '%S' : Size (total number of messages),
* '%!' : Icon denoting number of flagged messages.
+ * '%n' : N if folder has new mail, blank otherwise.
*
* Returns: src (unchanged)
*/
optional = 0;
break;
+ case 'n':
+ if (!optional)
+ {
+ snprintf (fmt, sizeof (fmt), "%%%sc", prefix);
+ snprintf (dest, destlen, fmt, b->new ? 'N' : ' ');
+ }
+ else if (b->new == 0)
+ optional = 0;
+ break;
+
case 'S':
if (!optional)
{
else if ((ColorDefs[MT_COLOR_SB_SPOOLFILE] != 0) &&
(mutt_strcmp (b->path, Spoolfile) == 0))
SETCOLOR(MT_COLOR_SB_SPOOLFILE);
- else if (b->msg_unread > 0)
+ else if ((b->msg_unread > 0) || (b->new))
SETCOLOR(MT_COLOR_NEW);
else if (b->msg_flagged > 0)
SETCOLOR(MT_COLOR_FLAGGED);