summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3cc6735)
Rocco Rutte:
- add %u for unread messages to $sidebar_number_format
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@559
e385b8ad-14ed-0310-8656-
cc95a2468c6d
the necessary keywords to look them up in the manual, ChangeLog or other
sources of information.
the necessary keywords to look them up in the manual, ChangeLog or other
sources of information.
+2005-10-23:
+
+ The %u expando for $sidebar_number_format has been added.
+
2005-10-14:
The generic <rebuild-cache> function has been added.
2005-10-14:
The generic <rebuild-cache> function has been added.
/* only check on force or $imap_mail_check reached */
if (force != 0 || (now - last2 >= ImapBuffyTimeout)) {
tmp->msgcount = imap_mailbox_check (tmp->path, 0);
/* only check on force or $imap_mail_check reached */
if (force != 0 || (now - last2 >= ImapBuffyTimeout)) {
tmp->msgcount = imap_mailbox_check (tmp->path, 0);
- if ((tmp->new = imap_mailbox_check (tmp->path, 1)) > 0) {
+ tmp->new = imap_mailbox_check (tmp->path, 1);
+ tmp->msg_unread = imap_mailbox_check (tmp->path, 2);
+ if (tmp->new > 0)
- tmp->msg_unread = tmp->new; /* for sidebar; wtf? */
- }
- else {
+ if (tmp->msg_unread < 0)
}
else if (tmp->new > 0)
/* keep current stats if !force and !$imap_mail_check reached */
}
else if (tmp->new > 0)
/* keep current stats if !force and !$imap_mail_check reached */
%t
Number of tagged messages. 1)
%t
Number of tagged messages. 1)
+ %u
+ Number of unread messages.
+
1) These expandos only have a non-zero value for the current mailbox
and will always be zero otherwise.
1) These expandos only have a non-zero value for the current mailbox
and will always be zero otherwise.
-/* returns count of recent messages if new = 1, else count of total messages.
- * (useful for at least postponed function)
- * Question of taste: use RECENT or UNSEEN for new?
+/*
+ * count messages:
+ * new == 1: recent
+ * new == 2: unseen
+ * otherwise: total
+ * return:
* 0+ number of messages in mailbox
* -1 error while polling mailboxes
*/
* 0+ number of messages in mailbox
* -1 error while polling mailboxes
*/
else if (mutt_bit_isset (idata->capabilities, IMAP4REV1) ||
mutt_bit_isset (idata->capabilities, STATUS)) {
snprintf (buf, sizeof (buf), "STATUS %s (%s)", mbox,
else if (mutt_bit_isset (idata->capabilities, IMAP4REV1) ||
mutt_bit_isset (idata->capabilities, STATUS)) {
snprintf (buf, sizeof (buf), "STATUS %s (%s)", mbox,
- new ? "RECENT" : "MESSAGES");
+ new == 1 ? "RECENT" : (new == 2 ? "UNSEEN" : "MESSAGES"));
}
else
/* Server does not support STATUS, and this is not the current mailbox.
}
else
/* Server does not support STATUS, and this is not the current mailbox.
** .dt %M .dd Total number of messages shown, i.e. not hidden by a limit. 1)
** .dt %n .dd Number of new messages.
** .dt %t .dd Number of tagged messages. 1)
** .dt %M .dd Total number of messages shown, i.e. not hidden by a limit. 1)
** .dt %n .dd Number of new messages.
** .dt %t .dd Number of tagged messages. 1)
+ ** .dt %u .dd Number of unread messages.
** .de
** .pp
** 1) These expandos only have a non-zero value for the current mailbox and
** .de
** .pp
** 1) These expandos only have a non-zero value for the current mailbox and
break;
/* new */
case 'n':
break;
/* new */
case 'n':
+ if (!opt) {
+ snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
+ snprintf (dest, destlen, tmp, c ? Context->new : b->new);
+ } else if ((c && Context->new == 0) || (!c && b->new == 0))
+ opt = 0;
+ break;
+ /* unread */
+ case 'u':
if (!opt) {
snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
snprintf (dest, destlen, tmp, c ? Context->unread : b->msg_unread);
if (!opt) {
snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
snprintf (dest, destlen, tmp, c ? Context->unread : b->msg_unread);