summaryrefslogtreecommitdiffstats
path: root/buffy.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2016-06-07 15:02:58 -0700
committerKevin McCarthy <kevin@8t8.us>2016-06-07 15:02:58 -0700
commit04a6356bd34c855ddebd75d3820887c64ee793b0 (patch)
tree7661dd213476946c96b9c9671d24340b6397751c /buffy.h
parentf4f53521f46abbd138be32b239a9f34f1a8bfb3e (diff)
Make extended buffy independent of the sidebar.
Add new boolean option $mail_check_stats (default off) and $mail_check_stats_interval. The first turns extended buffy on. The second sets the amount of time in between extended buffy checks (defaulting to 60 seconds). Remove the option $sidebar_refresh_time. Change mutt_buffy_check() to only notify the sidebar to redraw if a mailbox buffy value changes. Remove the #ifdefs around the extended buffy functions. The next patch will merge these functions with the basic functions and pass a parameter instead. Imap is a special case, because it sends out the status in one batch. Change this to perform the comparisons inside cmd_parse_status() and flag the sidebar there. It was previously directly assigning the status counters (unsigned int) to the buffy->new (short). Change this to assign 1/0.
Diffstat (limited to 'buffy.h')
-rw-r--r--buffy.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/buffy.h b/buffy.h
index 7f2f1d54..d3f5454a 100644
--- a/buffy.h
+++ b/buffy.h
@@ -35,24 +35,26 @@ typedef struct buffy_t
struct buffy_t *prev;
#endif
short new; /* mailbox has new mail */
-#ifdef USE_SIDEBAR
+
+ /* These next three are only set when OPTMAILCHECKSTATS is set */
int msg_count; /* total number of messages */
int msg_unread; /* number of unread messages */
int msg_flagged; /* number of flagged messages */
+
+#ifdef USE_SIDEBAR
short is_hidden; /* is hidden from the sidebar */
#endif
short notified; /* user has been notified */
short magic; /* mailbox type */
short newly_created; /* mbox or mmdf just popped into existence */
time_t last_visited; /* time of last exit from this mailbox */
-#ifdef USE_SIDEBAR
- time_t sb_last_checked; /* time of last buffy check from sidebar */
-#endif
+ time_t stats_last_checked; /* time of last mail_check_stats calculation */
}
BUFFY;
WHERE BUFFY *Incoming INITVAL (0);
WHERE short BuffyTimeout INITVAL (3);
+WHERE short BuffyCheckStatsInterval INITVAL (60);
extern time_t BuffyDoneTime; /* last time we knew for sure how much mail there was */