}
#endif /* USE_NNTP */
-static void add_folder(struct Menu *m, struct BrowserState *state, const char *name,
- const char *desc, const struct stat *s, struct Buffy *b, void *data)
+static void add_folder(struct Menu *m, struct BrowserState *state,
+ const char *name, const char *desc, const struct stat *s,
+ struct Mailbox *b, void *data)
{
if (state->entrylen == state->entrymax)
{
else if (!S_ISREG(s.st_mode))
continue;
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (mutt_str_strcmp(buffer, np->b->path) != 0)
break;
*/
static int examine_vfolders(struct Menu *menu, struct BrowserState *state)
{
- if (STAILQ_EMPTY(&BuffyList))
+ if (STAILQ_EMPTY(&AllMailboxes))
return -1;
mutt_buffy_check(0);
init_state(state, menu);
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (mx_is_notmuch(np->b->path))
{
{
init_state(state, menu);
- if (STAILQ_EMPTY(&BuffyList))
+ if (STAILQ_EMPTY(&AllMailboxes))
return -1;
mutt_buffy_check(0);
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (Context && (mutt_str_strcmp(np->b->realpath, Context->realpath) == 0))
{
#ifdef USE_COMPRESSED
/* If we're saving to a compressed mailbox, the stats won't be updated
* until the next open. Until then, improvise. */
- struct Buffy *cm = NULL;
+ struct Mailbox *cm = NULL;
if (ctx.compress_info)
cm = mutt_find_mailbox(ctx.realpath);
/* We probably haven't been opened yet */
(state->entry)[state->entrylen].selectable = !noselect;
(state->entry)[state->entrylen].inferiors = !noinferiors;
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (mutt_str_strcmp(tmp, np->b->path) == 0)
break;
mutt_debug(3, "Running default STATUS handler\n");
/* should perhaps move this code back to imap_buffy_check */
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (np->b->magic != MUTT_IMAP)
continue;
size_t matchlen;
matchlen = mutt_str_strlen(buf);
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (mutt_str_strncmp(buf, np->b->path, matchlen) != 0)
continue;
char munged[LONG_STRING];
int buffies = 0;
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
/* Init newly-added mailboxes */
if (!np->b->magic)
}
/* collect results */
- STAILQ_FOREACH(np, &BuffyList, entries)
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if ((np->b->magic == MUTT_IMAP) && np->b->new)
buffies++;
if (VirtualSpoolfile)
{
/* Find the first virtual folder and open it */
- struct BuffyNode *bp = NULL;
- STAILQ_FOREACH(bp, &BuffyList, entries)
+ struct MailboxNode *mp = NULL;
+ STAILQ_FOREACH(mp, &AllMailboxes, entries)
{
- if (bp->b->magic == MUTT_NOTMUCH)
+ if (mp->b->magic == MUTT_NOTMUCH)
{
- cs_str_string_set(Config, "spoolfile", bp->b->path, NULL);
+ cs_str_string_set(Config, "spoolfile", mp->b->path, NULL);
mutt_sb_toggle_virtual();
break;
}
short MailCheckStatsInterval; ///< Config: How often to check for new mail
bool MaildirCheckCur; ///< Config: Check both 'new' and 'cur' directories for new mail
-static time_t BuffyTime = 0; /**< last time we started checking for mail */
-static time_t BuffyStatsTime = 0; /**< last time we check performed mail_check_stats */
-time_t BuffyDoneTime = 0; /**< last time we knew for sure how much mail there was. */
-static short BuffyCount = 0; /**< how many boxes with new mail */
-static short BuffyNotify = 0; /**< # of unnotified new boxes */
+static time_t MailboxTime = 0; /**< last time we started checking for mail */
+static time_t MailboxStatsTime = 0; /**< last time we check performed mail_check_stats */
+static short MailboxCount = 0; /**< how many boxes with new mail */
+static short MailboxNotify = 0; /**< # of unnotified new boxes */
-struct BuffyList BuffyList = STAILQ_HEAD_INITIALIZER(BuffyList);
+struct MailboxList AllMailboxes = STAILQ_HEAD_INITIALIZER(AllMailboxes);
/**
* fseek_last_message - Find the last message in the file
}
/**
- * buffy_new - Create a new Buffy (mailbox)
+ * buffy_new - Create a new Maibox
* @param path Path to the mailbox
- * @retval ptr New Buffy
+ * @retval ptr New Mailbox
*/
-static struct Buffy *buffy_new(const char *path)
+static struct Mailbox *buffy_new(const char *path)
{
char rp[PATH_MAX] = "";
- struct Buffy *buffy = mutt_mem_calloc(1, sizeof(struct Buffy));
+ struct Mailbox *buffy = mutt_mem_calloc(1, sizeof(struct Mailbox));
mutt_str_strfcpy(buffy->path, path, sizeof(buffy->path));
char *r = realpath(path, rp);
mutt_str_strfcpy(buffy->realpath, r ? rp : path, sizeof(buffy->realpath));
}
/**
- * buffy_free - Free a Buffy (mailbox)
- * @param mailbox Buffy to free
+ * buffy_free - Free a Mailbox
+ * @param mailbox Mailbox to free
*/
-static void buffy_free(struct Buffy **mailbox)
+static void buffy_free(struct Mailbox **mailbox)
{
if (mailbox && *mailbox)
FREE(&(*mailbox)->desc);
*
* Checks the specified maildir subdir (cur or new) for new mail or mail counts.
*/
-static int buffy_maildir_check_dir(struct Buffy *mailbox, const char *dir_name,
+static int buffy_maildir_check_dir(struct Mailbox *mailbox, const char *dir_name,
bool check_new, bool check_stats)
{
char path[PATH_MAX];
* @param check_stats if true, also count total, new, and flagged messages
* @retval 1 if the mailbox has new mail
*/
-static int buffy_maildir_check(struct Buffy *mailbox, bool check_stats)
+static int buffy_maildir_check(struct Mailbox *mailbox, bool check_stats)
{
int rc = 1;
bool check_new = true;
* @param check_stats if true, also count total, new, and flagged messages
* @retval 1 if the mailbox has new mail
*/
-static int buffy_mbox_check(struct Buffy *mailbox, struct stat *sb, bool check_stats)
+static int buffy_mbox_check(struct Mailbox *mailbox, struct stat *sb, bool check_stats)
{
int rc = 0;
int new_or_changed;
* @param contex_sb stat() info for the current mailbox (Context)
* @param check_stats If true, also count the total, new and flagged messages
*/
-static void buffy_check(struct Buffy *tmp, struct stat *contex_sb, bool check_stats)
+static void buffy_check(struct Mailbox *tmp, struct stat *contex_sb, bool check_stats)
{
struct stat sb;
#ifdef USE_SIDEBAR
case MUTT_MBOX:
case MUTT_MMDF:
if (buffy_mbox_check(tmp, &sb, check_stats) > 0)
- BuffyCount++;
+ MailboxCount++;
break;
case MUTT_MAILDIR:
if (buffy_maildir_check(tmp, check_stats) > 0)
- BuffyCount++;
+ MailboxCount++;
break;
case MUTT_MH:
if (mh_buffy(tmp, check_stats))
- BuffyCount++;
+ MailboxCount++;
break;
#ifdef USE_NOTMUCH
case MUTT_NOTMUCH:
nm_nonctx_get_count(tmp->path, &tmp->msg_count, &tmp->msg_unread);
if (tmp->msg_unread > 0)
{
- BuffyCount++;
+ MailboxCount++;
tmp->new = true;
}
break;
if (!tmp->new)
tmp->notified = false;
else if (!tmp->notified)
- BuffyNotify++;
+ MailboxNotify++;
}
/**
* buffy_get - Fetch buffy object for given path, if present
* @param path Path to the mailbox
- * @retval ptr Buffy for the mailbox
+ * @retval ptr Mailbox for the path
*/
-static struct Buffy *buffy_get(const char *path)
+static struct Mailbox *buffy_get(const char *path)
{
if (!path)
return NULL;
char *epath = mutt_str_strdup(path);
mutt_expand_path(epath, mutt_str_strlen(epath));
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
/* must be done late because e.g. IMAP delimiter may change */
mutt_expand_path(np->b->path, sizeof(np->b->path));
if (CheckMboxSize)
{
- struct Buffy *b = mutt_find_mailbox(path);
+ struct Mailbox *b = mutt_find_mailbox(path);
if (b && !b->new)
mutt_update_mailbox(b);
}
/**
* mutt_find_mailbox - Find the mailbox with a given path
* @param path Path to match
- * @retval ptr Matching Buffy
+ * @retval ptr Matching Mailbox
*/
-struct Buffy *mutt_find_mailbox(const char *path)
+struct Mailbox *mutt_find_mailbox(const char *path)
{
if (!path)
return NULL;
if (stat(path, &sb) != 0)
return NULL;
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if ((stat(np->b->path, &tmp_sb) == 0) && (sb.st_dev == tmp_sb.st_dev) &&
(sb.st_ino == tmp_sb.st_ino))
* mutt_update_mailbox - Get the mailbox's current size
* @param b Mailbox to check
*/
-void mutt_update_mailbox(struct Buffy *b)
+void mutt_update_mailbox(struct Mailbox *b)
{
struct stat sb;
/* avoid duplicates */
p = realpath(buf, f1);
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (mutt_str_strcmp(p ? p : buf, np->b->realpath) == 0)
{
continue;
}
- struct Buffy *b = buffy_new(buf);
+ struct Mailbox *b = buffy_new(buf);
b->new = false;
b->notified = true;
b->size = 0;
}
- struct BuffyNode *bn = mutt_mem_calloc(1, sizeof(*bn));
- bn->b = b;
- STAILQ_INSERT_TAIL(&BuffyList, bn, entries);
+ struct MailboxNode *mn = mutt_mem_calloc(1, sizeof(*mn));
+ mn->b = b;
+ STAILQ_INSERT_TAIL(&AllMailboxes, mn, entries);
#ifdef USE_SIDEBAR
mutt_sb_notify_mailbox(b, 1);
}
}
- struct BuffyNode *np = NULL;
- struct BuffyNode *tmp = NULL;
- STAILQ_FOREACH_SAFE(np, &BuffyList, entries, tmp)
+ struct MailboxNode *np = NULL;
+ struct MailboxNode *tmp = NULL;
+ STAILQ_FOREACH_SAFE(np, &AllMailboxes, entries, tmp)
{
/* Decide whether to delete all normal mailboxes or all virtual */
bool virt = ((np->b->magic == MUTT_NOTMUCH) && (data & MUTT_VIRTUAL));
#ifdef USE_SIDEBAR
mutt_sb_notify_mailbox(np->b, 0);
#endif
- STAILQ_REMOVE(&BuffyList, np, BuffyNode, entries);
+ STAILQ_REMOVE(&AllMailboxes, np, MailboxNode, entries);
buffy_free(&np->b);
FREE(&np);
continue;
}
/**
- * mutt_buffy_check - Check all BuffyList for new mail
+ * mutt_buffy_check - Check all AllMailboxes for new mail
* @param force Force flags, see below
* @retval num Number of mailboxes with new mail
*
* The force argument may be any combination of the following values:
- * - MUTT_BUFFY_CHECK_FORCE ignore BuffyTimeout and check for new mail
- * - MUTT_BUFFY_CHECK_FORCE_STATS ignore BuffyTimeout and calculate statistics
+ * - MUTT_BUFFY_CHECK_FORCE ignore MailboxTime and check for new mail
+ * - MUTT_BUFFY_CHECK_FORCE_STATS ignore MailboxTime and calculate statistics
*
- * Check all BuffyList for new mail and total/new/flagged messages
+ * Check all AllMailboxes for new mail and total/new/flagged messages
*/
int mutt_buffy_check(int force)
{
#endif
/* fastest return if there are no mailboxes */
- if (STAILQ_EMPTY(&BuffyList))
+ if (STAILQ_EMPTY(&AllMailboxes))
return 0;
t = time(NULL);
- if (!force && (t - BuffyTime < MailCheck))
- return BuffyCount;
+ if (!force && (t - MailboxTime < MailCheck))
+ return MailboxCount;
if ((force & MUTT_BUFFY_CHECK_FORCE_STATS) ||
- (MailCheckStats && ((t - BuffyStatsTime) >= MailCheckStatsInterval)))
+ (MailCheckStats && ((t - MailboxStatsTime) >= MailCheckStatsInterval)))
{
check_stats = true;
- BuffyStatsTime = t;
+ MailboxStatsTime = t;
}
- BuffyTime = t;
- BuffyCount = 0;
- BuffyNotify = 0;
+ MailboxTime = t;
+ MailboxCount = 0;
+ MailboxNotify = 0;
#ifdef USE_IMAP
- BuffyCount += imap_buffy_check(check_stats);
+ MailboxCount += imap_buffy_check(check_stats);
#endif
/* check device ID and serial number instead of comparing paths */
contex_sb.st_ino = 0;
}
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
buffy_check(np->b, &contex_sb, check_stats);
}
- BuffyDoneTime = BuffyTime;
- return BuffyCount;
+ return MailboxCount;
}
/**
size_t pos = 0;
int first = 1;
- int have_unnotified = BuffyNotify;
+ int have_unnotified = MailboxNotify;
buffylist[0] = '\0';
pos += strlen(strncat(buffylist, _("New mail in "), sizeof(buffylist) - 1 - pos));
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
/* Is there new mail in this mailbox? */
if (!np->b->new || (have_unnotified && np->b->notified))
{
/* pos += strlen (strncat(buffylist + pos, "*", sizeof(buffylist)-1-pos)); */
np->b->notified = true;
- BuffyNotify--;
+ MailboxNotify--;
}
pos += strlen(strncat(buffylist + pos, path, sizeof(buffylist) - 1 - pos));
first = 0;
return true;
}
/* there were no mailboxes needing to be notified, so clean up since
- * BuffyNotify has somehow gotten out of sync
+ * MailboxNotify has somehow gotten out of sync
*/
- BuffyNotify = 0;
+ MailboxNotify = 0;
return false;
}
*/
void mutt_buffy_setnotified(const char *path)
{
- struct Buffy *buffy = buffy_get(path);
+ struct Mailbox *buffy = buffy_get(path);
if (!buffy)
return;
*/
bool mutt_buffy_notify(void)
{
- if (mutt_buffy_check(0) && BuffyNotify)
+ if (mutt_buffy_check(0) && MailboxNotify)
{
return mutt_buffy_list();
}
int found = 0;
for (int pass = 0; pass < 2; pass++)
{
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (np->b->magic == MUTT_NOTMUCH) /* only match real mailboxes */
continue;
bool found = false;
for (int pass = 0; pass < 2; pass++)
{
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (np->b->magic != MUTT_NOTMUCH)
continue;
}
}
- mutt_buffy_check(MUTT_BUFFY_CHECK_FORCE); /* buffy was wrong - resync things */
+ mutt_buffy_check(MUTT_BUFFY_CHECK_FORCE); /* Mailbox was wrong - resync things */
}
/* no folders with new mail */
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _MUTT_BUFFY_H
-#define _MUTT_BUFFY_H
+#ifndef _MUTT_MAILBOX_H
+#define _MUTT_MAILBOX_H
#include <limits.h>
#include <stdbool.h>
#define MUTT_VIRTUAL 2
/**
- * struct Buffy - A mailbox
+ * struct Mailbox - A mailbox
*/
-struct Buffy
+struct Mailbox
{
char path[PATH_MAX];
char realpath[PATH_MAX]; /**< used for duplicate detection, context
time_t stats_last_checked; /**< mtime of mailbox the last time stats where checked. */
};
-struct BuffyNode
+struct MailboxNode
{
- struct Buffy *b;
- STAILQ_ENTRY(BuffyNode) entries;
+ struct Mailbox *b;
+ STAILQ_ENTRY(MailboxNode) entries;
};
-STAILQ_HEAD(BuffyList, BuffyNode);
+STAILQ_HEAD(MailboxList, MailboxNode);
-extern struct BuffyList BuffyList;
+extern struct MailboxList AllMailboxes;
#ifdef USE_NOTMUCH
void mutt_buffy_vfolder(char *buf, size_t buflen);
#endif
-extern time_t BuffyDoneTime; /**< last time we knew for sure how much mail there was */
-
-struct Buffy *mutt_find_mailbox(const char *path);
-void mutt_update_mailbox(struct Buffy *b);
+struct Mailbox *mutt_find_mailbox(const char *path);
+void mutt_update_mailbox(struct Mailbox *b);
void mutt_buffy_cleanup(const char *path, struct stat *st);
int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s, unsigned long data, struct Buffer *err);
int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s, unsigned long data, struct Buffer *err);
-#endif /* _MUTT_BUFFY_H */
+#endif /* _MUTT_MAILBOX_H */
#include "hcache/hcache.h"
#endif
-struct Buffy;
+struct Mailbox;
struct Context;
struct Header;
struct Header *maildir_parse_stream(int magic, FILE *f, const char *fname, bool is_old, struct Header *h);
bool maildir_update_flags(struct Context *ctx, struct Header *o, struct Header *n);
-bool mh_buffy(struct Buffy *mailbox, bool check_stats);
+bool mh_buffy(struct Mailbox *mailbox, bool check_stats);
int mh_check_empty(const char *path);
bool mx_is_maildir(const char *path);
* @retval 0 modification time is older
* @retval -1 Error
*/
-static int mh_sequences_changed(struct Buffy *b)
+static int mh_sequences_changed(struct Mailbox *b)
{
char path[PATH_MAX];
struct stat sb;
* @retval 0 Modification time on the message file is newer
* @retval -1 Error
*/
-static int mh_already_notified(struct Buffy *b, int msgno)
+static int mh_already_notified(struct Mailbox *b, int msgno)
{
char path[PATH_MAX];
struct stat sb;
* @param check_stats Also count total, new, and flagged messages
* @retval true if the mailbox has new mail
*/
-bool mh_buffy(struct Buffy *mailbox, bool check_stats)
+bool mh_buffy(struct Mailbox *mailbox, bool check_stats)
{
struct MhSequences mhs = { 0 };
bool check_new = true;
}
else
#endif
- if (STAILQ_EMPTY(&BuffyList))
+ if (STAILQ_EMPTY(&AllMailboxes))
{
mutt_error(_("No incoming mailboxes defined."));
goto main_curses; // TEST39: neomutt -n -F /dev/null -y
FILE *fp = NULL;
struct Progress progress;
char msgbuf[PATH_MAX + 64];
- struct Buffy *tmp = NULL;
+ struct Mailbox *tmp = NULL;
/* sort message by their position in the mailbox on disk */
if (Sort != SORT_ORDER)
*/
char *nm_get_description(struct Context *ctx)
{
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (np->b->desc && (strcmp(np->b->path, ctx->path) == 0))
return np->b->desc;
if (!desc || !buf || (buflen == 0))
return -EINVAL;
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if ((np->b->magic == MUTT_NOTMUCH) && np->b->desc && (strcmp(desc, np->b->desc) == 0))
{
*/
struct SbEntry
{
- char box[STRING]; /**< formatted mailbox name */
- struct Buffy *buffy; /**< Mailbox this represents */
- bool is_hidden; /**< Don't show, e.g. $sidebar_new_mail_only */
+ char box[STRING]; /**< formatted mailbox name */
+ struct Mailbox *buffy; /**< Mailbox this represents */
+ bool is_hidden; /**< Don't show, e.g. $sidebar_new_mail_only */
};
static int EntryCount = 0;
buf[0] = 0; /* Just in case there's nothing to do */
- struct Buffy *b = sbe->buffy;
+ struct Mailbox *b = sbe->buffy;
if (!b)
return src;
{
const struct SbEntry *sbe1 = *(const struct SbEntry **) a;
const struct SbEntry *sbe2 = *(const struct SbEntry **) b;
- struct Buffy *b1 = sbe1->buffy;
- struct Buffy *b2 = sbe2->buffy;
+ struct Mailbox *b1 = sbe1->buffy;
+ struct Mailbox *b2 = sbe2->buffy;
int result = 0;
{
int i = 0;
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (i >= EntryCount)
break;
* Display a list of mailboxes in a panel on the left. What's displayed will
* depend on our index markers: TopBuffy, OpnBuffy, HilBuffy, BotBuffy.
* On the first run they'll be NULL, so we display the top of NeoMutt's list
- * (BuffyList).
+ * (AllMailboxes).
*
* * TopBuffy - first visible mailbox
* * BotBuffy - last visible mailbox
static void draw_sidebar(int num_rows, int num_cols, int div_width)
{
struct SbEntry *entry = NULL;
- struct Buffy *b = NULL;
+ struct Mailbox *b = NULL;
if (TopIndex < 0)
return;
if (!Entries)
{
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
mutt_sb_notify_mailbox(np->b, 1);
}
return;
/* Even if the sidebar's hidden, we should take note of the new data. */
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
if (mutt_str_strcmp(np->b->realpath, ctx->realpath) == 0)
{
*
* Before a deletion, check that our pointers won't be invalidated.
*/
-void mutt_sb_notify_mailbox(struct Buffy *b, int created)
+void mutt_sb_notify_mailbox(struct Mailbox *b, int created)
{
if (!b)
return;
EntryCount = 0;
FREE(&Entries);
EntryLen = 0;
- struct BuffyNode *np = NULL;
- STAILQ_FOREACH(np, &BuffyList, entries)
+ struct MailboxNode *np = NULL;
+ STAILQ_FOREACH(np, &AllMailboxes, entries)
{
/* and reintroduce the ones that are visible */
if (((np->b->magic == MUTT_NOTMUCH) && (sidebar_source == SB_SRC_VIRT)) ||
#include <stdbool.h>
-struct Buffy;
+struct Mailbox;
struct Context;
/* These Config Variables are only used in sidebar.c */
void mutt_sb_change_mailbox(int op);
void mutt_sb_draw(void);
const char *mutt_sb_get_highlight(void);
-void mutt_sb_notify_mailbox(struct Buffy *b, int created);
+void mutt_sb_notify_mailbox(struct Mailbox *b, int created);
void mutt_sb_set_buffystats(const struct Context *ctx);
void mutt_sb_set_open_buffy(void);
void mutt_sb_toggle_virtual(void);