[apps/code] Fix Python loading when going in the VarBoxController

The Var box controller deinited python on exit, and the console
controller did not reload python + it made the console controller lose
all its context, such as imported scripts
This commit is contained in:
Léa Saviot
2018-09-21 11:53:53 +02:00
parent 47e78a79fa
commit 2661032993
7 changed files with 25 additions and 25 deletions

View File

@@ -24,10 +24,11 @@ public:
#endif
);
bool loadPythonEnvironment(bool autoImportScripts = true);
bool loadPythonEnvironment();
void unloadPythonEnvironment();
bool pythonEnvironmentIsLoaded();
void setAutoImport(bool autoImport) { m_autoImportScripts = autoImport; }
void autoImport();
void autoImportScript(Script script, bool force = false);
void runAndPrintForCommand(const char * command);
@@ -37,6 +38,7 @@ public:
// ViewController
View * view() override { return &m_selectableTableView; }
void viewWillAppear() override;
void didEnterResponderChain(Responder * previousFirstResponder) override;
void didBecomeFirstResponder() override;
bool handleEvent(Ion::Events::Event event) override;
ViewController::DisplayParameter displayParameter() override { return ViewController::DisplayParameter::WantsMaximumSpace; }
@@ -100,6 +102,7 @@ private:
ScriptStore * m_scriptStore;
SandboxController m_sandboxController;
bool m_inputRunLoopActive;
bool m_autoImportScripts;
#if EPSILON_GETOPT
bool m_locked;
#endif