summaryrefslogtreecommitdiffstats
path: root/imap
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-03-25 15:07:48 -0700
committerKevin McCarthy <kevin@8t8.us>2020-03-27 14:11:25 -0700
commit1487ea6485745bc836026594aa05c9ad3921def2 (patch)
tree967c830e1be59c9bb6981cc5dbee6b2f6969ff4b /imap
parent1e9ab8b67e50f512bed61f204cdc99c6ca76ba54 (diff)
Add -label and -nopoll arguments to mailboxes command
-nopoll allows adding the mailbox to the sidebar, or the mailbox browser menu, without incurring polling costs. -poll can be used to re-enable polling for a previously disabled mailbox. -label allows specifying an alternative string to show in the sidebar and mailbox browser menu. -nolabel removes a label from an existing mailbox. Change $sidebar_sort_method so that "alpha" and "name" will sort by the label if specified. "path", however, will always sort by the actual mailbox path.
Diffstat (limited to 'imap')
-rw-r--r--imap/browse.c2
-rw-r--r--imap/imap.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/imap/browse.c b/imap/browse.c
index fee412d6..9245fe12 100644
--- a/imap/browse.c
+++ b/imap/browse.c
@@ -454,7 +454,7 @@ static void imap_add_folder (char delim, char *folder, int noselect,
b = b->next;
if (b)
{
- if (Context &&
+ if (Context && !b->nopoll &&
!mutt_strcmp (b->realpath, Context->realpath))
{
b->msg_count = Context->msgcount;
diff --git a/imap/imap.c b/imap/imap.c
index 5e3502fc..bdd99dff 100644
--- a/imap/imap.c
+++ b/imap/imap.c
@@ -1735,6 +1735,9 @@ int imap_buffy_check (int force, int check_stats)
if (mailbox->magic != MUTT_IMAP)
continue;
+ if (mailbox->nopoll)
+ continue;
+
if (imap_get_mailbox (mutt_b2s (mailbox->pathbuf), &idata, name, sizeof (name)) < 0)
{
mailbox->new = 0;