]> 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>
Sun, 6 Mar 2016 00:44:22 +0000 (00:44 +0000)
buffy.c
buffy.h
imap/command.c
mh.c
sidebar.c

diff --git a/buffy.c b/buffy.c
index c9d4d00bba109a113db24a08d11a7b077e678a57..13ef731d08b4d3aee2ef05f7b2eaf55d1f041147 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 1eaa92edaafed253227cf33c420ea721fe1df106..4fb577e43b41b6e73087d0f3a7637c7f07ddcd89 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 eeda540c3fe375a5412a219ff9a8441dc8cf560a..e49c5fee7867651536a10cf200a6ab48e1a6d53f 100644 (file)
@@ -1015,7 +1015,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 5839534d66184357de00dc5e5b1733c7e91d1d14..d390092df18fe590f1e073ea3e9eca66c3ff476b 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;
                }