| 878 | | case OP_DELETE_MAILBOX: |
| | 878 | case OP_RENAME_MAILBOX: |
| | 879 | if (!state.entry[menu->current].imap) |
| | 880 | mutt_error (_("Rename is only supported for IMAP mailboxes")); |
| | 881 | else |
| | 882 | { |
| | 883 | int nentry = menu->current; |
| | 884 | |
| | 885 | if (imap_mailbox_rename (state.entry[nentry].name) >= 0) { |
| | 886 | destroy_state (&state); |
| | 887 | init_state (&state, NULL); |
| | 888 | state.imap_browse = 1; |
| | 889 | imap_browse (LastDir, &state); |
| | 890 | menu->data = state.entry; |
| | 891 | menu->current = 0; |
| | 892 | menu->top = 0; |
| | 893 | init_menu (&state, menu, title, sizeof (title), buffy); |
| | 894 | MAYBE_REDRAW (menu->redraw); |
| | 895 | } |
| | 896 | } |
| | 897 | break; |
| | 898 | |
| | 899 | case OP_DELETE_MAILBOX: |