/* Checks whether views should be checked against external changes. Returns * non-zero is so, otherwise zero is returned. */ static int should_check_views_for_changes(void) { return !is_status_bar_multiline() && !is_in_menu_like_mode() && NONE(vle_mode_is, CMDLINE_MODE, MSG_MODE); }
void modes_pre(void) { if(vle_mode_is(CMDLINE_MODE)) { touchwin(status_bar); wrefresh(status_bar); return; } else if(ANY(vle_mode_is, SORT_MODE, CHANGE_MODE, ATTR_MODE)) { return; } else if(vle_mode_is(VIEW_MODE)) { view_pre(); return; } else if(is_in_menu_like_mode()) { menu_pre(); return; } if(!curr_stats.save_msg) { clean_status_bar(); wrefresh(status_bar); } }
/* Checks whether job bar is visible. Returns non-zero if so, and zero * otherwise. */ static int is_job_bar_visible(void) { /* Pretend that bar isn't visible in tests. */ return curr_stats.load_stage >= 2 && ui_stat_job_bar_height() != 0 && !is_in_menu_like_mode(); }
/* Checks whether views should be checked against external changes. Returns * non-zero is so, otherwise zero is returned. */ static int should_check_views_for_changes(void) { return !is_status_bar_multiline() && !is_in_menu_like_mode() && get_mode() != CMDLINE_MODE; }
/* Checks whether views should be checked against external changes. Returns * non-zero is so, otherwise zero is returned. */ static int should_check_views_for_changes(void) { return !ui_sb_multiline() && !is_in_menu_like_mode() && NONE(vle_mode_is, CMDLINE_MODE, MSG_MODE) && !suggestions_are_visible; }
static int read_char(WINDOW *win, wint_t *c, int timeout) { static const int T = 150; static const int IPC_F = 10; int i; int result = ERR; for(i = 0; i <= timeout/T; i++) { int j; if(is_redraw_scheduled()) { modes_redraw(); } if(!is_status_bar_multiline() && !is_in_menu_like_mode() && get_mode() != CMDLINE_MODE) { check_if_filelists_have_changed(curr_view); if(curr_stats.number_of_windows != 1 && !curr_stats.view) check_if_filelists_have_changed(other_view); } check_background_jobs(); for(j = 0; j < IPC_F; j++) { ipc_check(); wtimeout(win, MIN(T, timeout)/IPC_F); if((result = wget_wch(win, c)) != ERR) break; if(is_redraw_scheduled()) { modes_redraw(); } } if(result != ERR) break; timeout -= T; } return result; }
void modes_post(void) { if(ANY(vle_mode_is, CMDLINE_MODE, SORT_MODE, CHANGE_MODE, ATTR_MODE)) { return; } else if(vle_mode_is(VIEW_MODE)) { view_post(); return; } else if(is_in_menu_like_mode()) { menu_post(); return; } update_screen(curr_stats.need_update); if(curr_stats.save_msg) { status_bar_message(NULL); } if(!vle_mode_is(FILE_INFO_MODE) && curr_view->list_rows > 0) { if(!is_status_bar_multiline()) { update_stat_window(curr_view); ui_ruler_update(curr_view); } } modes_statusbar_update(); }
/* Checks whether job bar is visible. Returns non-zero if so, and zero * otherwise. */ static int is_job_bar_visible(void) { return ui_stat_job_bar_height() != 0 && !is_in_menu_like_mode(); }