mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Code: merge actions for text input in ConsoleController and
EditorController
This commit is contained in:
committed by
EmilieNumworks
parent
aade7cb2fe
commit
3db86a8111
@@ -259,10 +259,6 @@ PythonToolbox::PythonToolbox() :
|
||||
{
|
||||
}
|
||||
|
||||
void PythonToolbox::setAction(Action action) {
|
||||
m_action = action;
|
||||
}
|
||||
|
||||
bool PythonToolbox::handleEvent(Ion::Events::Event event) {
|
||||
if (Toolbox::handleEvent(event)) {
|
||||
return true;
|
||||
@@ -297,7 +293,8 @@ bool PythonToolbox::selectLeaf(ToolboxMessageTree * selectedMessageTree) {
|
||||
const char * editedText = I18n::translate(node->insertedText());
|
||||
char strippedEditedText[strlen(editedText)+1];
|
||||
Shared::ToolboxHelpers::TextToInsertForCommandMessage(node->insertedText(), strippedEditedText);
|
||||
m_action(sender(), const_cast<const char *>(strippedEditedText));
|
||||
TextInput * textInput = static_cast<TextInput *>(sender());
|
||||
textInput->handleEventWithText(strippedEditedText, true);
|
||||
app()->dismissModalViewController();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user