]> granicus.if.org Git - neomutt/commitdiff
rename: msgcount to msg_count to match other sidebar variables
authorRichard Russon <rich@flatcap.org>
Fri, 18 Dec 2015 15:33:03 +0000 (15:33 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 02:37:43 +0000 (03:37 +0100)
buffy.c
buffy.h
imap/command.c
mh.c
sidebar.c

diff --git a/buffy.c b/buffy.c
index cda20295dbf7e406871cb2922148ce9b9f76d01a..323b9dbf52bcb0a949e2d03b62f6870a9361fe39 100644 (file)
--- 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 a50cf321ee347fce64a1ab3bf41a2ba3eb517739..0a519bd8777d71383e0bef4248e1a13defedcbad 100644 (file)
--- 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
index 15e475b9a33a5dfe4fad47d01a4dde1e85017292..82c992c240113d181e635870b32fa04c0a7700c0 100644 (file)
@@ -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 527c03b06366158dc39cb39a1a71585ec71f4e67..3465417acd9f4a8e59da89bfd08b0ffe8661d991 100644 (file)
--- 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++;
index 605524383d29fe7d93a7bcfc5ab6d629053ecc1b..6fc73c0cce1bdcbeb1f03c100296e2bfed24ce46 100644 (file)
--- 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;
                }