Commit c03dc2ca authored by Gregory Shapiro's avatar Gregory Shapiro

Add imap-logout-all to log out of all IMAP connections. Closes #2880.

parent 909a5afe
2010-02-17 00:47 -0800 Simon Ruderich <simon@ruderich.org> (260d39279161)
* doc/manual.xml.head: Document 'n' and 'o' flags in index
* doc/devel-notes.txt, doc/muttrc.man.head, init.h,
rfc1524.c: Spelling fixes
2010-02-10 23:29 -0800 Brendan Cully <brendan@kublai.com> (b7ec848af36b)
* doc/manual.xml.head: Fix a typo (closes #3379)
......
......@@ -102,6 +102,7 @@ OP_MAIN_CHANGE_FOLDER_READONLY "open a different folder in read only mode"
OP_MAIN_CLEAR_FLAG "clear a status flag from a message"
OP_MAIN_DELETE_PATTERN "delete messages matching a pattern"
OP_MAIN_IMAP_FETCH "force retrieval of mail from IMAP server"
OP_MAIN_IMAP_LOGOUT_ALL "logout from all IMAP servers"
OP_MAIN_FETCH_MAIL "retrieve mail from POP server"
OP_MAIN_FIRST_MESSAGE "move to the first message"
OP_MAIN_LAST_MESSAGE "move to the last message"
......
......@@ -6,6 +6,7 @@ The keys used are:
hg tip:
+ imap-logout-all closes all open IMAP connections
! header/body cache paths are always UTF-8
+ $wrap_headers to control outgoing message's header length
+ all text/* parts can be displayed inline without mailcap
......
......@@ -991,6 +991,23 @@ int mutt_index_menu (void)
if (Context && Context->magic == M_IMAP)
imap_check_mailbox (Context, &index_hint, 1);
break;
case OP_MAIN_IMAP_LOGOUT_ALL:
if (Context && Context->magic == M_IMAP)
{
if (mx_close_mailbox (Context, &index_hint) != 0)
{
set_option (OPTSEARCHINVALID);
menu->redraw = REDRAW_FULL;
break;
}
FREE (&Context);
}
imap_logout_all();
mutt_message _("Logged out of IMAP servers.");
set_option (OPTSEARCHINVALID);
menu->redraw = REDRAW_FULL;
break;
#endif
case OP_MAIN_SYNC_FOLDER:
......
......@@ -108,6 +108,7 @@ struct binding_t OpMain[] = { /* map: index */
#endif
#ifdef USE_IMAP
{ "imap-fetch-mail", OP_MAIN_IMAP_FETCH, NULL },
{ "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL, NULL },
#endif
{ "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
{ "next-undeleted", OP_MAIN_NEXT_UNDELETED, "j" },
......@@ -192,6 +193,7 @@ struct binding_t OpPager[] = { /* map: pager */
{ "group-reply", OP_GROUP_REPLY, "g" },
#ifdef USE_IMAP
{ "imap-fetch-mail", OP_MAIN_IMAP_FETCH, NULL },
{ "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL, NULL },
#endif
{ "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
{ "next-undeleted", OP_MAIN_NEXT_UNDELETED, "j" },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment