From ac7e437730ecbe32f9e4e168a3ee4a7b7f3cd761 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 12 Sep 2013 23:39:34 +0200 Subject: Move Client responsibilities to InputHandler InputHandler owns it's UserInterface, and is directly stored by the ClientManager. --- src/context.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/context.cc') diff --git a/src/context.cc b/src/context.cc index ed01e1c6..0b2816a7 100644 --- a/src/context.cc +++ b/src/context.cc @@ -12,8 +12,8 @@ Context::Context() = default; Context::Context(Editor& editor) : m_editor(&editor) {} -Context::Context(InputHandler& input_handler, UserInterface& ui) - : m_input_handler(&input_handler), m_ui(&ui) {} +Context::Context(InputHandler& input_handler, Editor& editor) + : m_input_handler(&input_handler), m_editor(&editor) {} Context::~Context() = default; @@ -54,7 +54,7 @@ UserInterface& Context::ui() const { if (not has_ui()) throw runtime_error("no user interface in context"); - return *m_ui; + return m_input_handler->ui(); } OptionManager& Context::options() const -- cgit v1.2.3