Make source windows be self-updating
This changes the TUI source window to register itself on the
source_styling_changed observable, and removes a bit of code from
tui-hooks.c. This reduces the number of uses of the TUI_SRC_WIN
global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-source.c (tui_source_window): New constructor. Add
observer.
(~tui_source_window): New destructor.
(tui_source_window::style_changed): New method.
* tui/tui-hooks.c (tui_redisplay_source): Remove.
(tui_attach_detach_observers): Update.
* tui/tui-data.h (struct tui_source_window): Make constructor not
inline. Add destructor.
(struct tui_source_window) <style_changed>: New method.
<m_observable>: New member.