void modes_update(void) { if(vle_mode_is(CMDLINE_MODE)) { redraw_cmdline(); return; } else if(vle_mode_is(MENU_MODE)) { menu_redraw(); return; } else if(vle_mode_is(FILE_INFO_MODE)) { redraw_file_info_dialog(); return; } touchwin(stdscr); update_all_windows(); if(vle_mode_is(SORT_MODE)) { redraw_sort_dialog(); } else if(vle_mode_is(CHANGE_MODE)) { redraw_change_dialog(); } else if(vle_mode_is(ATTR_MODE)) { redraw_attr_dialog(); } }
void enter_change_mode(FileView *active_view) { if(curr_stats.load_stage < 2) return; view = active_view; *mode = CHANGE_MODE; wattroff(view->win, COLOR_PAIR(DCOLOR_BASE + CURR_LINE_COLOR) | A_BOLD); curs_set(FALSE); update_all_windows(); top = 2; #ifndef _WIN32 bottom = 8; #else bottom = 4; #endif curr = 2; col = 6; step = 2; redraw_change_dialog(); }
void enter_change_mode(FileView *active_view) { if(curr_stats.load_stage < 2) return; view = active_view; vle_mode_set(CHANGE_MODE, VMT_SECONDARY); wattroff(view->win, COLOR_PAIR(cfg.cs.pair[CURR_LINE_COLOR]) | A_BOLD); curs_set(FALSE); update_all_windows(); top = 2; #ifndef _WIN32 bottom = 8; #else bottom = 4; #endif curr = 2; col = 6; step = 2; redraw_change_dialog(); }
void modes_redraw(void) { LOG_FUNC_ENTER; static int in_here; if(curr_stats.load_stage < 2) { return; } if(in_here++ > 0) { /* TODO: is this still needed? Update scheduling might have solved issues * caused by asynchronous execution of this function in the past. */ return; } if(curr_stats.term_state != TS_NORMAL) { update_screen(UT_REDRAW); goto finish; } if(vle_mode_is(CMDLINE_MODE)) { redraw_cmdline(); goto finish; } else if(vle_primary_mode_is(MENU_MODE)) { menu_redraw(); if(vle_mode_is(MSG_MODE)) { redraw_msg_dialog(0); } goto finish; } else if(vle_mode_is(FILE_INFO_MODE)) { redraw_file_info_dialog(); goto finish; } update_screen(UT_REDRAW); if(curr_stats.save_msg) { status_bar_message(NULL); } if(vle_mode_is(SORT_MODE)) { redraw_sort_dialog(); } else if(vle_mode_is(CHANGE_MODE)) { redraw_change_dialog(); } else if(vle_mode_is(ATTR_MODE)) { redraw_attr_dialog(); } else if(vle_mode_is(VIEW_MODE)) { view_redraw(); } else if(vle_mode_is(MSG_MODE)) { redraw_msg_dialog(0); } finish: if(--in_here > 0) { modes_redraw(); } }