X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=browser.c;h=1a1f71ed701e5442178b89b7d930a17db5d99cda;hp=3ed8a11ca10d3b089eace9dd370bf35c6e38d5f5;hb=13b3b36c8f696aea26b7c60444f2baa4858b004d;hpb=841a368ddea400022328f35dd8c7a3eb6f543892 diff --git a/browser.c b/browser.c index 3ed8a11..1a1f71e 100644 --- a/browser.c +++ b/browser.c @@ -12,6 +12,7 @@ #endif #include "mutt.h" +#include "enter.h" #include "mx.h" #include "mutt_curses.h" #include "mutt_menu.h" @@ -486,6 +487,7 @@ static int examine_directory (MUTTMENU * menu, struct browser_state *state, for (tmp = news->list; tmp; tmp = tmp->next) { if (!(data = (NNTP_DATA *) tmp->data)) continue; + nntp_sync_sidebar (data); if (prefix && *prefix && strncmp (prefix, data->group, str_len (prefix)) != 0) continue; @@ -493,6 +495,7 @@ static int examine_directory (MUTTMENU * menu, struct browser_state *state, continue; add_folder (menu, state, data->group, NULL, data, data->new); } + sidebar_draw (CurrentMenu); } else #endif /* USE_NNTP */ @@ -575,14 +578,14 @@ static int examine_mailboxes (MUTTMENU * menu, struct browser_state *state) init_state (state, menu); for (tmp = news->list; tmp; tmp = tmp->next) { - if ((data = (NNTP_DATA *) tmp->data) != NULL && (data->new || - (data->subscribed - && - (!option - (OPTSHOWONLYUNREAD) - || data->unread)))) + if ((data = (NNTP_DATA*) tmp->data) == NULL) + continue; + nntp_sync_sidebar (data); + if ((data->new || (data->subscribed && + (!option (OPTSHOWONLYUNREAD)|| data->unread)))) add_folder (menu, state, data->group, NULL, data, data->new); } + sidebar_draw (CurrentMenu); } else #endif @@ -818,6 +821,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); + browser_sort (&state); } #endif } @@ -953,6 +957,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); + browser_sort (&state); menu->data = state.entry; } else @@ -1051,6 +1056,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); + browser_sort (&state); menu->data = state.entry; menu->current = 0; menu->top = 0; @@ -1070,6 +1076,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); + browser_sort (&state); menu->data = state.entry; menu->current = 0; menu->top = 0; @@ -1144,6 +1151,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); + browser_sort (&state); menu->data = state.entry; menu->current = 0; menu->top = 0; @@ -1215,6 +1223,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); + browser_sort (&state); menu->data = state.entry; init_menu (&state, menu, title, sizeof (title), buffy); } @@ -1299,6 +1308,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); + browser_sort (&state); menu->data = state.entry; } #endif @@ -1308,6 +1318,8 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, break; case OP_BUFFY_LIST: + if (option (OPTFORCEBUFFYCHECK)) + buffy_check (1); buffy_list (); break;