From 3db86a811115bc06ecca35aefa79f0a0bf99f5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 23 Feb 2018 15:45:23 +0100 Subject: [PATCH] [apps] Code: merge actions for text input in ConsoleController and EditorController --- apps/code/app.cpp | 23 +++++++++++++++-------- apps/code/app.h | 6 +----- apps/code/console_controller.cpp | 13 +------------ apps/code/editor_controller.cpp | 16 ++-------------- apps/code/python_toolbox.cpp | 7 ++----- apps/code/python_toolbox.h | 1 - apps/code/variable_box_controller.cpp | 26 +++++--------------------- apps/code/variable_box_controller.h | 9 +++------ 8 files changed, 29 insertions(+), 72 deletions(-) diff --git a/apps/code/app.cpp b/apps/code/app.cpp index d7c99c0c1..907cf5a7e 100644 --- a/apps/code/app.cpp +++ b/apps/code/app.cpp @@ -2,6 +2,7 @@ #include "../apps_container.h" #include "code_icon.h" #include "../i18n.h" +#include "helpers.h" namespace Code { @@ -77,16 +78,22 @@ App::App(Container * container, Snapshot * snapshot) : #endif ), m_codeStackViewController(&m_modalViewController, &m_listFooter), - m_toolboxActionForTextArea([](void * sender, const char * text) { - TextArea * textArea = static_cast