Show
Ignore:
Timestamp:
2005-02-16 19:33:00 (4 years ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

New function: rename-mailbox (bound to 'r' by default).

The lack of a rename-mailbox command for IMAP finally got too annoying.
It's a bit of a cut-and-paste job, but I've put my dreams of cleaning
up the IMAP codebase on hold. Gotta grow up some time.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • browser.c

    r3873 r3937  
    876876        break; 
    877877 
    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: 
    879900        if (!state.entry[menu->current].imap) 
    880901          mutt_error (_("Delete is only supported for IMAP mailboxes"));