diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-16 14:22:21 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-25 07:48:32 -0600 |
commit | cda37efbffb63e2634ea0600fdad2de6a8f9f3ad (patch) | |
tree | 8edadf6bec084e722503d27cc686e3cfd591e53d /gdb/tui/tui-wingeneral.c | |
parent | 6a0ee02c22b78b6d49fda99b6f2f9154d0cb0a47 (diff) | |
download | gdb-cda37efbffb63e2634ea0600fdad2de6a8f9f3ad.zip gdb-cda37efbffb63e2634ea0600fdad2de6a8f9f3ad.tar.gz gdb-cda37efbffb63e2634ea0600fdad2de6a8f9f3ad.tar.bz2 |
Introduce make_visible method
This introduceds the make_visible to tui_win_info and overrides it in
subclasses as appropriate. This allows the removal of the
tui_win_is_source_type, as it is no longer used.
gdb/ChangeLog
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (tui_win_info::make_visible)
(tui_source_window_base::make_visible): New methods.
(make_all_visible): Make method call.
* tui/tui-data.h (struct tui_win_info) <make_visible>: New method.
(struct tui_source_window_base, struct tui_cmd_window): Override
make_visible.
(tui_win_is_source_type): Don't declare.
* tui/tui-data.c (tui_win_is_source_type): Remove.
Diffstat (limited to 'gdb/tui/tui-wingeneral.c')
-rw-r--r-- | gdb/tui/tui-wingeneral.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 5428817..1308437 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -211,6 +211,22 @@ tui_make_invisible (struct tui_gen_win_info *win_info) make_visible (win_info, 0); } +/* See tui-data.h. */ + +void +tui_win_info::make_visible (int visible) +{ + ::make_visible (&generic, visible); +} + +/* See tui-data.h. */ + +void +tui_source_window_base::make_visible (int visible) +{ + ::make_visible (execution_info, visible); + tui_win_info::make_visible (visible); +} /* Makes all windows invisible (except the command and locator windows). */ @@ -221,17 +237,8 @@ make_all_visible (int visible) for (i = 0; i < MAX_MAJOR_WINDOWS; i++) { - if (tui_win_list[i] != NULL - && ((tui_win_list[i])->generic.type) != CMD_WIN) - { - if (tui_win_is_source_type ((tui_win_list[i])->generic.type)) - { - tui_source_window_base *base - = (tui_source_window_base *) tui_win_list[i]; - make_visible (base->execution_info, visible); - } - make_visible (&tui_win_list[i]->generic, visible); - } + if (tui_win_list[i] != NULL) + tui_win_list[i]->make_visible (visible); } return; |