int i, kill_prefix = 0;
int multiple = (flags & MUTT_SEL_MULTI) ? 1 : 0;
int folder = (flags & MUTT_SEL_FOLDER) ? 1 : 0;
- int buffy = (flags & MUTT_SEL_BUFFY) ? 1 : 0;
+ int mailbox = (flags & MUTT_SEL_MAILBOX) ? 1 : 0;
/* Keeps in memory the directory we were in when hitting '='
* to go directly to $folder (Folder)
*/
char GotoSwapper[PATH_MAX] = "";
- buffy = buffy && folder;
+ mailbox = mailbox && folder;
#ifdef USE_NNTP
if (OptNews)
struct NntpServer *nserv = CurrentNewsSrv;
/* default state for news reader mode is browse subscribed newsgroups */
- buffy = 0;
+ mailbox = 0;
for (unsigned int j = 0; j < nserv->groups_num; j++)
{
struct NntpData *nntp_data = nserv->groups_list[j];
if (nntp_data && nntp_data->subscribed)
{
- buffy = 1;
+ mailbox = 1;
break;
}
}
}
#ifdef USE_IMAP
- if (!buffy && mx_is_imap(LastDir))
+ if (!mailbox && mx_is_imap(LastDir))
{
init_state(&state, NULL);
state.imap_browse = true;
}
else
#endif
- if (buffy)
+ if (mailbox)
{
examine_mailboxes(NULL, &state);
}
FolderHelp);
mutt_menu_push_current(menu);
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
while (true)
{
)
{
/* make sure this isn't a MH or maildir mailbox */
- if (buffy)
+ if (mailbox)
{
mutt_str_strfcpy(buf, state.entry[menu->current].name, sizeof(buf));
mutt_expand_path(buf, sizeof(buf));
}
}
}
- else if (buffy)
+ else if (mailbox)
{
mutt_str_strfcpy(LastDir, state.entry[menu->current].name, sizeof(LastDir));
mutt_expand_path(LastDir, sizeof(LastDir));
prefix[0] = 0;
kill_prefix = 0;
}
- buffy = 0;
+ mailbox = 0;
#ifdef USE_IMAP
if (state.imap_browse)
{
}
browser_highlight_default(&state, menu);
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
if (GotoSwapper[0])
GotoSwapper[0] = '\0';
break;
}
}
- if (buffy || OptNews) /* USE_NNTP */
+ if (mailbox || OptNews) /* USE_NNTP */
{
mutt_str_strfcpy(file, state.entry[menu->current].name, filelen);
mutt_expand_path(file, filelen);
browser_sort(&state);
menu->data = state.entry;
browser_highlight_default(&state, menu);
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
}
/* else leave error on screen */
break;
browser_sort(&state);
menu->data = state.entry;
browser_highlight_default(&state, menu);
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
}
}
break;
memset(&state.entry[state.entrylen - 1], 0, sizeof(struct FolderFile));
state.entrylen--;
mutt_message(_("Mailbox deleted."));
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
}
else
mutt_error(_("Mailbox deletion failed."));
if (buf[0])
{
- buffy = 0;
+ mailbox = 0;
mutt_expand_path(buf, sizeof(buf));
#ifdef USE_IMAP
if (mx_is_imap(buf))
browser_sort(&state);
menu->data = state.entry;
browser_highlight_default(&state, menu);
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
}
else
#endif
}
}
browser_highlight_default(&state, menu);
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
}
else
mutt_error(_("%s is not a directory."), buf);
if (mutt_get_field(_("File Mask: "), buf, sizeof(buf), 0) != 0)
break;
- buffy = 0;
+ mailbox = 0;
/* assume that the user wants to see everything */
if (!buf[0])
mutt_str_strfcpy(buf, ".", sizeof(buf));
imap_browse(LastDir, &state);
browser_sort(&state);
menu->data = state.entry;
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
}
else
#endif
if (examine_directory(menu, &state, LastDir, NULL) == 0)
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
else
{
mutt_error(_("Error scanning directory."));
case OP_BROWSER_GOTO_FOLDER:
case OP_CHECK_NEW:
if (i == OP_TOGGLE_MAILBOXES)
- buffy = 1 - buffy;
+ mailbox = 1 - mailbox;
if (i == OP_BROWSER_GOTO_FOLDER)
{
prefix[0] = 0;
kill_prefix = 0;
- if (buffy)
+ if (mailbox)
{
examine_mailboxes(menu, &state);
}
#endif
else if (examine_directory(menu, &state, LastDir, prefix) == -1)
goto bail;
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
break;
- case OP_BUFFY_LIST:
+ case OP_MAILBOX_LIST:
mutt_buffy_list();
break;
nntp_newsrc_close(nserv);
destroy_state(&state);
- if (buffy)
+ if (mailbox)
examine_mailboxes(menu, &state);
else
{
if (examine_directory(menu, &state, NULL, NULL) == -1)
break;
}
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
}
break;
#endif /* USE_NNTP */
}
}
}
- init_menu(&state, menu, title, sizeof(title), buffy);
+ init_menu(&state, menu, title, sizeof(title), mailbox);
}
if (rc > 0)
menu->redraw = REDRAW_FULL;
extern char *VfolderFormat;
/* flags to mutt_select_file() */
-#define MUTT_SEL_BUFFY (1 << 0)
+#define MUTT_SEL_MAILBOX (1 << 0)
#define MUTT_SEL_MULTI (1 << 1)
#define MUTT_SEL_FOLDER (1 << 2)
#define MUTT_SEL_VFOLDER (1 << 3)
if ((rc != 0) || WaitKey)
mutt_any_key_to_continue(NULL);
- mutt_buffy_check(MUTT_BUFFY_CHECK_FORCE);
+ mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE);
}
/**
*/
void mutt_check_stats(void)
{
- mutt_buffy_check(MUTT_BUFFY_CHECK_FORCE | MUTT_BUFFY_CHECK_FORCE_STATS);
+ mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE | MUTT_MAILBOX_CHECK_FORCE_STATS);
}
if (multiple)
flags |= MUTT_SEL_MULTI;
if (buffy)
- flags |= MUTT_SEL_BUFFY;
+ flags |= MUTT_SEL_MAILBOX;
mutt_select_file(buf, buflen, flags, files, numfiles);
}
else
#endif
mutt_clear_error();
- mutt_buffy_check(MUTT_BUFFY_CHECK_FORCE); /* force the buffy check after we have changed the folder */
+ mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE); /* force the buffy check after we have changed the folder */
menu->redraw = REDRAW_FULL;
OptSearchInvalid = true;
if (!attach_msg)
{
/* force the buffy check after we enter the folder */
- mutt_buffy_check(MUTT_BUFFY_CHECK_FORCE);
+ mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE);
}
if (((Sort & SORT_MASK) == SORT_THREADS) && CollapseAll)
mutt_message(mutt_make_version());
break;
- case OP_BUFFY_LIST:
+ case OP_MAILBOX_LIST:
mutt_buffy_list();
break;
state->lastchar += state->curpos - i;
break;
- case OP_EDITOR_BUFFY_CYCLE:
+ case OP_EDITOR_MAILBOX_CYCLE:
if (flags & MUTT_EFILE)
{
first = 1; /* clear input if user types a real key later */
const struct Binding OpMain[] = { /* map: index */
{ "bounce-message", OP_BOUNCE_MESSAGE, "b" },
{ "break-thread", OP_MAIN_BREAK_THREAD, "#" },
- { "buffy-list", OP_BUFFY_LIST, "." },
+ { "buffy-list", OP_MAILBOX_LIST, "." },
#ifdef USE_NNTP
{ "catchup", OP_CATCHUP, NULL },
#endif
{ "bottom", OP_PAGER_BOTTOM, NULL },
{ "bounce-message", OP_BOUNCE_MESSAGE, "b" },
{ "break-thread", OP_MAIN_BREAK_THREAD, "#" },
- { "buffy-list", OP_BUFFY_LIST, "." },
+ { "buffy-list", OP_MAILBOX_LIST, "." },
{ "change-folder", OP_MAIN_CHANGE_FOLDER, "c" },
{ "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" },
#ifdef USE_NNTP
/* The file browser */
const struct Binding OpBrowser[] = { /* map: browser */
- { "buffy-list", OP_BUFFY_LIST, "." },
+ { "buffy-list", OP_MAILBOX_LIST, "." },
#ifdef USE_NNTP
{ "catchup", OP_CATCHUP, NULL },
#endif
{ "backward-char", OP_EDITOR_BACKWARD_CHAR, "\002" },
{ "backward-word", OP_EDITOR_BACKWARD_WORD, "\033b" },
{ "bol", OP_EDITOR_BOL, "\001" },
- { "buffy-cycle", OP_EDITOR_BUFFY_CYCLE, " " },
+ { "buffy-cycle", OP_EDITOR_MAILBOX_CYCLE, " " },
{ "capitalize-word", OP_EDITOR_CAPITALIZE_WORD, "\033c" },
{ "complete", OP_EDITOR_COMPLETE, "\t" },
{ "complete-query", OP_EDITOR_COMPLETE_QUERY, "\024" },
* @retval num Number of mailboxes with new mail
*
* The force argument may be any combination of the following values:
- * - MUTT_BUFFY_CHECK_FORCE ignore MailboxTime and check for new mail
- * - MUTT_BUFFY_CHECK_FORCE_STATS ignore MailboxTime and calculate statistics
+ * - MUTT_MAILBOX_CHECK_FORCE ignore MailboxTime and check for new mail
+ * - MUTT_MAILBOX_CHECK_FORCE_STATS ignore MailboxTime and calculate statistics
*
* Check all AllMailboxes for new mail and total/new/flagged messages
*/
#ifdef USE_IMAP
/* update postponed count as well, on force */
- if (force & MUTT_BUFFY_CHECK_FORCE)
+ if (force & MUTT_MAILBOX_CHECK_FORCE)
mutt_update_num_postponed();
#endif
if (!force && (t - MailboxTime < MailCheck))
return MailboxCount;
- if ((force & MUTT_BUFFY_CHECK_FORCE_STATS) ||
+ if ((force & MUTT_MAILBOX_CHECK_FORCE_STATS) ||
(MailCheckStats && ((t - MailboxStatsTime) >= MailCheckStatsInterval)))
{
check_stats = true;
}
}
- mutt_buffy_check(MUTT_BUFFY_CHECK_FORCE); /* buffy was wrong - resync things */
+ mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE); /* buffy was wrong - resync things */
}
/* no folders with new mail */
}
}
- mutt_buffy_check(MUTT_BUFFY_CHECK_FORCE); /* Mailbox was wrong - resync things */
+ mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE); /* Mailbox was wrong - resync things */
}
/* no folders with new mail */
void mutt_buffy_setnotified(const char *path);
/* force flags passed to mutt_buffy_check() */
-#define MUTT_BUFFY_CHECK_FORCE (1 << 0)
-#define MUTT_BUFFY_CHECK_FORCE_STATS (1 << 1)
+#define MUTT_MAILBOX_CHECK_FORCE (1 << 0)
+#define MUTT_MAILBOX_CHECK_FORCE_STATS (1 << 1)
void mutt_buffy(char *s, size_t slen);
bool mutt_buffy_list(void);
bool ResumeEditedDraftFiles;
#define MUTT_IGNORE (1 << 0) /* -z */
-#define MUTT_BUFFY (1 << 1) /* -Z */
+#define MUTT_MAILBOX (1 << 1) /* -Z */
#define MUTT_NOSYSRC (1 << 2) /* -n */
#define MUTT_RO (1 << 3) /* -R */
#define MUTT_SELECT (1 << 4) /* -y */
flags |= MUTT_SELECT;
break;
case 'Z':
- flags |= MUTT_BUFFY | MUTT_IGNORE;
+ flags |= MUTT_MAILBOX | MUTT_IGNORE;
break;
case 'z':
flags |= MUTT_IGNORE;
}
else
{
- if (flags & MUTT_BUFFY)
+ if (flags & MUTT_MAILBOX)
{
if (mutt_buffy_check(0) == 0)
{
goto main_curses; // TEST39: neomutt -n -F /dev/null -y
}
folder[0] = '\0';
- mutt_select_file(folder, sizeof(folder), MUTT_SEL_FOLDER | MUTT_SEL_BUFFY, NULL, NULL);
+ mutt_select_file(folder, sizeof(folder),
+ MUTT_SEL_FOLDER | MUTT_SEL_MAILBOX, NULL, NULL);
if (folder[0] == '\0')
{
goto main_ok; // TEST40: neomutt -y (quit selection)
_fmt(OP_BROWSER_TOGGLE_LSUB, N_("toggle view all/subscribed mailboxes (IMAP only)")) \
_fmt(OP_BROWSER_UNSUBSCRIBE, N_("unsubscribe from current mbox (IMAP/NNTP only)")) \
_fmt(OP_BROWSER_VIEW_FILE, N_("view file")) \
- _fmt(OP_BUFFY_LIST, N_("list mailboxes with new mail")) \
_fmt(OP_CATCHUP, N_("mark all articles in newsgroup as read")) \
_fmt(OP_CHANGE_DIRECTORY, N_("change directories")) \
_fmt(OP_CHECK_NEW, N_("check mailboxes for new mail")) \
_fmt(OP_EDITOR_BACKWARD_CHAR, N_("move the cursor one character to the left")) \
_fmt(OP_EDITOR_BACKWARD_WORD, N_("move the cursor to the beginning of the word")) \
_fmt(OP_EDITOR_BOL, N_("jump to the beginning of the line")) \
- _fmt(OP_EDITOR_BUFFY_CYCLE, N_("cycle among incoming mailboxes")) \
_fmt(OP_EDITOR_CAPITALIZE_WORD, N_("capitalize the word")) \
_fmt(OP_EDITOR_COMPLETE, N_("complete filename or alias")) \
_fmt(OP_EDITOR_COMPLETE_QUERY, N_("complete address with query")) \
_fmt(OP_EDITOR_KILL_EOW, N_("delete chars from the cursor to the end of the word")) \
_fmt(OP_EDITOR_KILL_LINE, N_("delete all chars on the line")) \
_fmt(OP_EDITOR_KILL_WORD, N_("delete the word in front of the cursor")) \
+ _fmt(OP_EDITOR_MAILBOX_CYCLE, N_("cycle among incoming mailboxes")) \
_fmt(OP_EDITOR_QUOTE_CHAR, N_("quote the next typed key")) \
_fmt(OP_EDITOR_TRANSPOSE_CHARS, N_("transpose character under cursor with previous")) \
_fmt(OP_EDITOR_UPCASE_WORD, N_("convert the word to upper case")) \
_fmt(OP_LOAD_ACTIVE, N_("load list of all newsgroups from NNTP server")) \
_fmt(OP_MACRO, N_("execute a macro")) \
_fmt(OP_MAIL, N_("compose a new mail message")) \
+ _fmt(OP_MAILBOX_LIST, N_("list mailboxes with new mail")) \
_fmt(OP_MAIN_BREAK_THREAD, N_("break the thread in two")) \
_fmt(OP_MAIN_CHANGE_FOLDER, N_("open a different folder")) \
_fmt(OP_MAIN_CHANGE_FOLDER_READONLY, N_("open a different folder in read only mode")) \
mutt_message(mutt_make_version());
break;
- case OP_BUFFY_LIST:
+ case OP_MAILBOX_LIST:
mutt_buffy_list();
break;
* update_entries_visibility - Should a sidebar_entry be displayed in the sidebar
*
* For each SbEntry in the Entries array, check whether we should display it.
- * This is determined by several criteria. If the Buffy:
+ * This is determined by several criteria. If the Mailbox:
* * is the currently open mailbox
* * is the currently highlighted mailbox
* * has unread messages
}
/**
- * unsort_entries - Restore Entries array order to match Buffy list order
+ * unsort_entries - Restore Entries array order to match Mailbox list order
*/
static void unsort_entries(void)
{
* @param div_width Width in screen characters taken by the divider
*
* Display a list of mailboxes in a panel on the left. What's displayed will
- * depend on our index markers: TopBuffy, OpnBuffy, HilBuffy, BotBuffy.
+ * depend on our index markers: TopMailbox, OpnMailbox, HilMailbox, BotMailbox.
* On the first run they'll be NULL, so we display the top of NeoMutt's list
* (AllMailboxes).
*
- * * TopBuffy - first visible mailbox
- * * BotBuffy - last visible mailbox
- * * OpnBuffy - mailbox shown in NeoMutt's Index Panel
- * * HilBuffy - Unselected mailbox (the paging follows this)
+ * * TopMailbox - first visible mailbox
+ * * BotMailbox - last visible mailbox
+ * * OpnMailbox - mailbox shown in NeoMutt's Index Panel
+ * * HilMailbox - Unselected mailbox (the paging follows this)
*
* The entries are formatted using "sidebar_format" and may be abbreviated:
* "sidebar_short_path", indented: "sidebar_folder_indent",
* mutt_sb_draw - Completely redraw the sidebar
*
* Completely refresh the sidebar region. First draw the divider; then, for
- * each Buffy, call make_sidebar_entry; finally blank out any remaining space.
+ * each Mailbox, call make_sidebar_entry; finally blank out any remaining space.
*/
void mutt_sb_draw(void)
{
* Change the selected mailbox, e.g. "Next mailbox", "Previous Mailbox
* with new mail". The operations are listed in opcodes.h.
*
- * If the operation is successful, HilBuffy will be set to the new mailbox.
+ * If the operation is successful, HilMailbox will be set to the new mailbox.
* This function only *selects* the mailbox, doesn't *open* it.
*
* Allowed values are: OP_SIDEBAR_NEXT, OP_SIDEBAR_NEXT_NEW,
}
/**
- * mutt_sb_set_buffystats - Update the Buffy's message counts from the Context
+ * mutt_sb_set_buffystats - Update the Mailbox's message counts from the Context
* @param ctx A mailbox Context
*
- * Given a mailbox Context, find a matching mailbox Buffy and copy the message
+ * Given a mailbox Context, find a matching mailbox Mailbox and copy the message
* counts into it.
*/
void mutt_sb_set_buffystats(const struct Context *ctx)
}
/**
- * mutt_sb_get_highlight - Get the Buffy that's highlighted in the sidebar
+ * mutt_sb_get_highlight - Get the Mailbox that's highlighted in the sidebar
* @retval ptr Mailbox path
*
* Get the path of the mailbox that's highlighted in the sidebar.
}
/**
- * mutt_sb_set_open_buffy - Set the OpnBuffy based on the global Context
+ * mutt_sb_set_open_buffy - Set the OpnMailbox based on the global Context
*
- * Search through the list of mailboxes. If a Buffy has a matching path, set
- * OpnBuffy to it.
+ * Search through the list of mailboxes. If a Mailbox has a matching path, set
+ * OpnMailbox to it.
*/
void mutt_sb_set_open_buffy(void)
{
}
/**
- * mutt_sb_notify_mailbox - The state of a Buffy is about to change
+ * mutt_sb_notify_mailbox - The state of a Mailbox is about to change
* @param b Folder
* @param created True if folder created, false if deleted
*
* We receive a notification:
- * After a new Buffy has been created
- * Before a Buffy is deleted
+ * - After a new Mailbox has been created
+ * - Before a Mailbox is deleted
*
* Before a deletion, check that our pointers won't be invalidated.
*/