X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=browser.c;h=b85d622d72de6789a13fa6db1756a22c62cbe233;hb=b8f78cd1394748ceaaad7bc7e723f07779a3663a;hp=f0dc1837874f070f52e6b6b55783a6b9240b9d2b;hpb=f404a0ca916be07049af51a3022baaaaab94def6;p=apps%2Fmadmutt.git diff --git a/browser.c b/browser.c index f0dc183..b85d622 100644 --- a/browser.c +++ b/browser.c @@ -569,6 +569,7 @@ static int examine_directory (MUTTMENU *menu, struct browser_state *state, } closedir (dp); } + draw_sidebar (CurrentMenu); browser_sort (state); return 0; } @@ -1103,7 +1104,28 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num } break; - case OP_DELETE_MAILBOX: + case OP_RENAME_MAILBOX: + if (!state.entry[menu->current].imap) + mutt_error (_("Rename is only supported for IMAP mailboxes")); + else + { + int nentry = menu->current; + + if (imap_mailbox_rename (state.entry[nentry].name) >= 0) { + destroy_state (&state); + init_state (&state, NULL); + state.imap_browse = 1; + imap_browse (LastDir, &state); + menu->data = state.entry; + menu->current = 0; + menu->top = 0; + init_menu (&state, menu, title, sizeof (title), buffy); + MAYBE_REDRAW (menu->redraw); + } + } + break; + + case OP_DELETE_MAILBOX: if (!state.entry[menu->current].imap) mutt_error (_("Delete is only supported for IMAP mailboxes")); else