From: Richard Russon Date: Fri, 18 Dec 2015 15:33:03 +0000 (+0000) Subject: rename: msgcount to msg_count to match other sidebar variables X-Git-Tag: neomutt-20160404~14^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71b6031241ddac8dd905f15fbf30f7fd9e830ce6;p=neomutt rename: msgcount to msg_count to match other sidebar variables --- diff --git a/buffy.c b/buffy.c index cda20295d..323b9dbf5 100644 --- a/buffy.c +++ b/buffy.c @@ -404,7 +404,7 @@ buffy_maildir_update (BUFFY *mailbox) if (!option (OPTSIDEBAR) || !mailbox) return; - mailbox->msgcount = 0; + mailbox->msg_count = 0; mailbox->msg_unread = 0; mailbox->msg_flagged = 0; @@ -422,7 +422,7 @@ buffy_maildir_update (BUFFY *mailbox) if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) { mailbox->new = 1; - mailbox->msgcount++; + mailbox->msg_count++; mailbox->msg_unread++; } } @@ -441,7 +441,7 @@ buffy_maildir_update (BUFFY *mailbox) continue; if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) { - mailbox->msgcount++; + mailbox->msg_count++; if ((p = strstr (de->d_name, ":2,"))) { if (!strchr (p + 3, 'T')) { if (!strchr (p + 3, 'S')) @@ -510,12 +510,12 @@ buffy_mbox_update (BUFFY *mailbox, struct stat *sb) if (!option (OPTSIDEBAR)) return; - if ((mailbox->sb_last_checked > sb->st_mtime) && (mailbox->msgcount != 0)) + if ((mailbox->sb_last_checked > sb->st_mtime) && (mailbox->msg_count != 0)) return; /* no check necessary */ ctx = mx_open_mailbox (mailbox->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL); if (ctx) { - mailbox->msgcount = ctx->msgcount; + mailbox->msg_count = ctx->msgcount; mailbox->msg_unread = ctx->unread; mailbox->msg_flagged = ctx->flagged; mailbox->sb_last_checked = time (NULL); diff --git a/buffy.h b/buffy.h index a50cf321e..0a519bd87 100644 --- a/buffy.h +++ b/buffy.h @@ -33,7 +33,7 @@ typedef struct buffy_t #endif short new; /* mailbox has new mail */ #ifdef USE_SIDEBAR - int msgcount; /* total number of messages */ + int msg_count; /* total number of messages */ int msg_unread; /* number of unread messages */ int msg_flagged; /* number of flagged messages */ #endif diff --git a/imap/command.c b/imap/command.c index 15e475b9a..82c992c24 100644 --- a/imap/command.c +++ b/imap/command.c @@ -1019,7 +1019,7 @@ static void cmd_parse_status (IMAP_DATA* idata, char* s) #ifdef USE_SIDEBAR /* Make the sidebar show the correct numbers */ if (status->messages) { - inc->msgcount = status->messages; + inc->msg_count = status->messages; inc->msg_unread = status->unseen; } #endif diff --git a/mh.c b/mh.c index 527c03b06..3465417ac 100644 --- a/mh.c +++ b/mh.c @@ -318,13 +318,13 @@ mh_buffy_update (BUFFY *mailbox) if (mh_read_sequences (&mhs, mailbox->path) < 0) return; - mailbox->msgcount = 0; + mailbox->msg_count = 0; mailbox->msg_unread = 0; mailbox->msg_flagged = 0; int i; for (i = 0; i <= mhs.max; i++) { - mailbox->msgcount++; + mailbox->msg_count++; } if (mhs_check (&mhs, i) & MH_SEQ_UNSEEN) { mailbox->msg_unread++; diff --git a/sidebar.c b/sidebar.c index 605524383..6fc73c0cc 100644 --- a/sidebar.c +++ b/sidebar.c @@ -444,8 +444,8 @@ sb_draw (void) if (Context && Context->path && (!strcmp (b->path, Context->path)|| !strcmp (b->realpath, Context->path))) { - b->msg_unread = Context->unread; - b->msgcount = Context->msgcount; + b->msg_unread = Context->unread; + b->msg_count = Context->msgcount; b->msg_flagged = Context->flagged; } @@ -501,7 +501,7 @@ sb_draw (void) } char str[SHORT_STRING]; make_sidebar_entry (str, sizeof (str), SidebarWidth - delim_len, - sidebar_folder_name, b->msgcount, + sidebar_folder_name, b->msg_count, b->msg_unread, b->msg_flagged); printw ("%s", str); if (sidebar_folder_depth > 0) @@ -637,7 +637,7 @@ sb_set_buffystats (const CONTEXT *ctx) if (!strcmp (b->path, ctx->path) || !strcmp (b->realpath, ctx->path)) { b->msg_unread = ctx->unread; - b->msgcount = ctx->msgcount; + b->msg_count = ctx->msgcount; b->msg_flagged = ctx->flagged; break; }