From 5b81daba91b035ce98fb7be4970fc2be0183f6ea Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 16 Jun 2019 16:28:12 -0600 Subject: Introduce refresh_window method This replaces tui_refresh_win with a new refresh_window method. This removes another spot that was checking the window's type. gdb/ChangeLog 2019-06-25 Tom Tromey * tui/tui-winsource.c (tui_erase_source_content) (tui_show_source_content, tui_show_exec_info_content) (tui_erase_exec_info_content): Use refresh_window method. * tui/tui-wingeneral.h (tui_refresh_win): Don't declare. * tui/tui-wingeneral.c (tui_gen_win_info::refresh_window): Rename from tui_refresh_win. (tui_data_window::refresh_window): New method. (tui_win_info::refresh, tui_source_window_base::refresh) (tui_refresh_all): Use refresh_window method. * tui/tui-stack.c (tui_show_locator_content): Call refresh_window method. * tui/tui-regs.c (tui_display_register): Call refresh_window method. * tui/tui-layout.c (show_source_disasm_command) (show_source_or_disasm_and_command): Call refresh_window method. * tui/tui-data.h (struct tui_gen_win_info) (struct tui_data_window, struct tui_cmd_window) : New method. --- gdb/tui/tui-winsource.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gdb/tui/tui-winsource.c') diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index f63526b..254c7e0 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -260,7 +260,7 @@ tui_erase_source_content (struct tui_win_info *win_info, tui_set_source_content_nil (win_info, no_src_str); } - tui_refresh_win (win_info); + win_info->refresh_window (); } } @@ -305,7 +305,7 @@ tui_show_source_content (struct tui_win_info *win_info) tui_erase_source_content (win_info, TRUE); tui_check_and_display_highlight_if_needed (win_info); - tui_refresh_win (win_info); + win_info->refresh_window (); win_info->content_in_use = TRUE; } @@ -550,14 +550,14 @@ tui_show_exec_info_content (struct tui_win_info *win_info) int cur_line; werase (exec_info->handle); - tui_refresh_win (exec_info); + exec_info->refresh_window (); for (cur_line = 1; (cur_line <= exec_info->content_size); cur_line++) mvwaddstr (exec_info->handle, cur_line, 0, (char *) exec_info->content[cur_line - 1] ->which_element.simple_string); - tui_refresh_win (exec_info); + exec_info->refresh_window (); exec_info->content_in_use = TRUE; } @@ -569,7 +569,7 @@ tui_erase_exec_info_content (struct tui_win_info *win_info) struct tui_gen_win_info *exec_info = base->execution_info; werase (exec_info->handle); - tui_refresh_win (exec_info); + exec_info->refresh_window (); } void -- cgit v1.1