Commit Graph

133 Commits

Author SHA1 Message Date
M4x1m3
81e9cbc0e0 Enabled circuit breaker with emscripten
This is possible because we use WASM and ASYNCIFY with the latest-upstream
toolchain.
2020-07-01 21:23:50 +02:00
Quentin
f37040dc8a [Fix] Conflicts 2020-04-16 14:04:56 +02:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Quentin
0d56576f9c [Git] Fix conflicts 2020-04-01 11:36:16 +02:00
Émilie Feral
d247843da6 [apps/code] Clean ConsoleController::reloadData (always returns true) 2020-04-01 10:18:09 +02:00
Émilie Feral
81284120af [apps/code] ConsoleController: refreshOutput is now done only when the
console is active
2020-04-01 10:18:09 +02:00
Émilie Feral
fb3f6ab6f3 [apps/code][python] ConsoleController doesn't keep any pointer/boolean to know
if the sandbox/matplotlib view controller is displayed. Its state won't be
always right; instead, use the StackViewController depth.

This fixes the following bug: when popping the sandbox/matplotlib view
controller, the first responder token was not given to the console
controller!
2020-04-01 10:18:09 +02:00
Émilie Feral
89b54d424e [apps/code] ConsoleController: when becoming first responder, check if a
controller is displayed and switch the first responder accordingly
2020-04-01 10:18:09 +02:00
Émilie Feral
7d48d4e7c4 [apps/code] Console controller: display only one ExecutionViewController
at a time
2020-04-01 10:18:08 +02:00
Émilie Feral
53ec023ea0 [apps/code] ConsoleController: factorize code to reload the table 2020-04-01 10:18:08 +02:00
Émilie Feral
659da1dff8 [apps][python] ExecutionEnvironment handles hide sand display of sandbox
and plot controller the same way
2020-04-01 10:18:08 +02:00
Émilie Feral
51da01aa11 [apps/code] Remove 'm_preventEdition' from ConsoleController, it was
always used with m_preventEdition = true.
2020-04-01 10:18:08 +02:00
Romain Goyet
d71ad9b288 [wip] Convenience to test matplotlib 2020-04-01 10:18:08 +02:00
Romain Goyet
3df8018943 [apps/code] Remove useless code 2020-04-01 10:18:08 +02:00
Romain Goyet
2b73c4c9aa [apps/code] Quick hacks to allow pushing a view controller 2020-04-01 10:18:08 +02:00
Romain Goyet
131df18b00 [python] A module can now ask to present a view controller 2020-04-01 10:18:08 +02:00
Quentin Guidée
02a5826789 Merge branch 'master' of https://github.com/numworks/epsilon into numworks-master 2020-02-28 19:50:43 +01:00
Léa Saviot
f12c53b3f2 [apps/code] printText should not be asynchronous in emscripten
Otherwise, we need to put in the whitelist all methods that might call
printText, which are a lot.
2020-02-27 11:32:26 +01:00
Quentin Guidée
a9c46dc28c Fix conflicts 2020-02-26 22:17:57 +01:00
Léa Saviot
02e79ad595 [apps/code] Do not refresh the print if the sandbox is displayed
Otherwise the first responder becomes the console edit line, and events
(such as Toolbox) are not intercepted by the sandbox anymore.
2020-02-25 15:31:25 +01:00
Léa Saviot
9bc0776a6a [apps/code] Allow interruption of infinite print loops
while (True):
  print("hello")
is now interruptible when the user presses Back
2020-02-20 10:59:01 +01:00
Léa Saviot
cf37e5c45a [apps/code] Fix input(), that did not return the input 2020-02-20 10:52:19 +01:00
Léa Saviot
84a66d3b31 [apps/code] Fix input(), that did not return the input 2020-02-20 00:20:41 +01:00
Léa Saviot
73bec71db3 [apps/code] Allow interruption of infinite print loops
while (True):
  print("hello")
is now interruptible when the user presses Back
2020-02-20 00:08:42 +01:00
Quentin Guidée
5b2f33c80a Fix conflicts 2020-02-17 17:10:32 +01:00
Romain Goyet
a187f39094 [apps] Report telemetry events 2020-02-17 10:31:24 -05:00
Romain Goyet
7f43b73049 [apps] Don't forget to call viewWillAppear
At the moment ViewController::viewWillAppear doesn't do anything, so
there is no real impact. But if we want to use it it needs to be called
from subclasses.
2020-02-17 10:31:24 -05:00
Quentin Guidée
ab8f731515 Fixed some conflicts 2020-02-12 17:42:58 +01:00
Léa Saviot
b7e177865a [apps/code] Fix prompt after input 2020-02-12 15:13:22 +01:00
Léa Saviot
3dcb40b5d4 [apps/code] Do not call interrupt in printText 2020-02-12 15:13:22 +01:00
Léa Saviot
1dacd71acb [apps/code] Remove unneeded arguments 2020-02-12 15:13:22 +01:00
Léa Saviot
c6c3e3f340 [apps/code] Hide prompt when running script 2020-02-12 15:13:22 +01:00
Léa Saviot
f47f1f0543 [apps/code] Refresh view in printText 2020-02-12 15:13:22 +01:00
Léa Saviot
f20bb1fcf2 [apps/code] Display the console before running auto-imported script 2020-02-12 15:13:22 +01:00
Émilie Feral
d64321d116 [apps/code] Remove useless class member in ConsoleController 2020-02-12 15:13:17 +01:00
Émilie Feral
c2dabf6510 [apps/code] Choose console text size from GlobalPreferences 2020-02-12 15:13:15 +01:00
AD Simmons
cdfb1f724b [apps/code] Add PythonFont preferences as the python font size in code 2019-12-29 16:24:23 -05:00
Quentin Guidée
c68a0cdb33 New Default theme: Omega theme! (Beta) 2019-11-29 19:42:39 +01:00
Quentin Guidée
3b592c847e New dark theme & KDColorWhite -> Palette::BackgroundHard 2019-11-26 23:04:03 +01:00
Adrien Bertrand
2ec4bc29e0 [apps] [code] Fix nullptr deref (fix #1176)
When scrolling up in the python shell history, `selectedCell` could be NULL.
2019-11-04 09:57:45 +01:00
Léa Saviot
4caf9f5197 [coding style] Make some methods const 2019-09-09 20:05:14 +02:00
Léa Saviot
5fac7a8cd2 [apps/code] Fix typo 2019-08-08 17:29:10 +02:00
Léa Saviot
c2b4d2b760 [strlcpy] Assertions on len parameter 2019-08-08 17:22:06 +02:00
Léa Saviot
7b84b65502 [apps/code] Fix sandbox and input clash
The command "squares()%input()" followed by text, OK, and a backspace
event broke an assertion on the consoleStore number of lines.
2019-07-30 11:31:21 +02:00
Ruben Dashyan
eb6d697927 [apps] Make app accessors static members of App classes 2019-07-19 15:06:25 +02:00
Ruben Dashyan
44809f4b3f Substitute Escher app() by Container::activeApp() 2019-07-19 15:06:25 +02:00
Romain Goyet
21907fb89a [apps] Get rid of App casts 2019-07-19 15:06:25 +02:00
Romain Goyet
45875dd642 [escher] Make app() a global function
This way it can easily be reached by anyone, including non-responders.
And it can easily be overwritten in namespaced apps.
2019-07-19 15:06:25 +02:00
Ruben Dashyan
eb3da7f395 [apps] Substitute "app()->container()" by "AppsContainer::sharedAppsContainer()" 2019-07-19 15:06:25 +02:00
Émilie Feral
9a411874ee [code] Console: when displaying results, do not split in lines in middle
of code points. Otherwise, this triggers crashes when manipulaping the
text (removing code point for instance)
2019-05-03 15:54:22 +02:00