Show
Ignore:
Timestamp:
2000-02-14 08:07:54 (9 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

Brendan Cully's patch from <20000212185021.A7365@…>.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • browser.c

    r1431 r1522  
    173173    case 'f': 
    174174#ifdef USE_IMAP 
    175       if (mx_is_imap (folder->ff->name)) 
     175      if (folder->ff->imap) 
    176176        strfcpy (fn, NONULL(folder->ff->desc), sizeof (fn)); 
    177177      else 
     
    208208      { 
    209209#ifdef USE_IMAP 
    210         if (mx_is_imap (folder->ff->name)) 
    211         { 
     210        if (folder->ff->imap) 
     211        { 
     212          sprintf (permission, "IMAP %c%c", 
     213                   folder->ff->inferiors ? '+' : ' ', 
     214                   folder->ff->selectable ? 'S' : ' '); 
    212215          snprintf (tmp, sizeof (tmp), "%%%ss", fmt); 
    213           snprintf (dest, destlen, tmp, "IMAP"); 
     216          snprintf (dest, destlen, tmp, permission); 
    214217        }                                         
    215218#endif 
     
    329332  (state->entry)[state->entrylen].desc = safe_strdup (name); 
    330333#ifdef USE_IMAP 
    331   (state->entry)[state->entrylen].notfolder = 0; 
    332 #endif 
    333  
     334  (state->entry)[state->entrylen].imap = 0; 
     335#endif 
    334336  (state->entrylen)++; 
    335337} 
     
    422424  { 
    423425#ifdef USE_IMAP 
    424     if (tmp->path[0] == '{') 
     426    if (mx_is_imap (tmp->path)) 
    425427    { 
    426428      add_folder (menu, state, tmp->path, NULL, tmp->new); 
     
    624626            link_is_dir (LastDir, state.entry[menu->current].name))  
    625627#ifdef USE_IMAP 
    626             || state.entry[menu->current].notfolder 
     628            || state.entry[menu->current].inferiors 
    627629#endif 
    628630            ) 
     
    646648          if ((mx_get_magic (buf) <= 0) 
    647649#ifdef USE_IMAP 
    648             || state.entry[menu->current].notfolder 
     650            || state.entry[menu->current].inferiors 
    649651#endif 
    650652            ) 
     
    682684            else if (state.imap_browse) 
    683685            { 
     686              int n; 
     687               
    684688              strfcpy (LastDir, state.entry[menu->current].name, 
    685689                sizeof (LastDir)); 
     690              /* tack on delimiter here */ 
     691              if ((state.entry[menu->current].delim != '\0') && 
     692                  (n = strlen (LastDir)+1) < sizeof (LastDir)) 
     693              { 
     694                LastDir[n] = '\0'; 
     695                LastDir[n-1] = state.entry[menu->current].delim; 
     696              } 
    686697            } 
    687698#endif 
     
    807818 
    808819      case OP_DELETE_MAILBOX: 
    809         if (!mx_is_imap (state.entry[menu->current].name)) 
     820        if (!state.entry[menu->current].imap) 
    810821          mutt_error (_("Delete is only supported for IMAP mailboxes")); 
    811822        else 
     
    10591070        } 
    10601071 
     1072#ifdef USE_IMAP 
     1073        if (state.entry[menu->current].selectable) 
     1074        { 
     1075          strfcpy (f, state.entry[menu->current].name, flen); 
     1076          destroy_state (&state); 
     1077          mutt_menuDestroy (&menu); 
     1078          return; 
     1079        } 
     1080        else 
     1081#endif 
    10611082        if (S_ISDIR (state.entry[menu->current].mode) || 
    10621083            (S_ISLNK (state.entry[menu->current].mode) &&