Commit Graph

115 Commits

Author SHA1 Message Date
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
Émilie Feral
2217eebaec [escher] SelectableTableView: when reloading data, we temporary deselect
the table. We warn the SelectableTableViewDelegate that the selection
change is 'within a temporary selection change' when notifying it of the
change.
2019-05-03 15:54:21 +02:00
Léa Saviot
496d346049 Remove max/min inline from KDCoordinate header 2019-05-03 15:53:19 +02:00
Léa Saviot
a021af46fe [apps/code] Hide the sandbox between script importations 2019-02-06 11:45:03 +01:00
Léa Saviot
4a8c0a6bd0 [apps/code] Do not change the responders in autoImportScript if sandbox
This fixes the following scenario: create a script that draws at
importation (for instance, add "squares()" at the end of squares.py) and
execute this script. The sandbox is displayed but events are handled by
the underneath text field, thus leading to the display of the variable
box and other bugs.
2019-02-06 11:45:03 +01:00
Léa Saviot
fbb1fbd138 [apps/code] Handle nullptr prompt text in input 2019-01-10 11:42:05 +01:00
Léa Saviot
f7f77ef9f7 [apps/code] When OK or EXE on empty python input loop, stop the input 2019-01-10 11:42:05 +01:00
Léa Saviot
c4bd55ef08 [apps/code] Clean ConsoleController::printText 2019-01-10 11:42:05 +01:00
Léa Saviot
177373c5af [apps/code] Handle carriage returns in the input text 2019-01-10 11:42:05 +01:00
Léa Saviot
4f4ae4e0f7 Merge branch 'master' into python_turtle 2019-01-08 14:32:43 +01:00
Léa Saviot
1782326ed8 [apps/code] Clean ConsoleController code 2019-01-07 13:36:01 +01:00
Léa Saviot
33072eb9b1 [apps/code] Add some comments 2019-01-07 13:36:01 +01:00
Léa Saviot
8830821d0e [apps/code/python] Inline and indent some code 2019-01-07 13:36:01 +01:00
Léa Saviot
4b306791c0 [python/turtle] Turtle::m_drawn is false if sandbox not displayed
This way, Turtle::draw() and erase() are more symetrical and no not
perform themselves if the turtle is already drawn / erased.
2018-12-18 12:05:46 +01:00
Léa Saviot
ed19d19070 Merge branch 'master' into python_turtle 2018-12-17 15:49:46 +01:00
Léa Saviot
ce1cdaacc3 [apps/code] Fix console reloading that did not occur often enough
Scenario:
Write a script that prints "abc"
Open the console -> prints "abc"
Modify the script to print "ab"
Go back to the console -> "ab" not printed !
2018-12-12 11:15:50 +01:00
Léa Saviot
cc3beb6014 [python/turtle] Turtle::reset() method 2018-12-06 17:26:43 +01:00
Émilie Feral
55be86ef50 [escher] TableView::cellAtLocation should return nullptr if the cell is
invisible and therefore no view displays it.

Fix bug: add 4 functions, in the values table one cell is wrong as soon
as you edit an x value
2018-11-26 11:24:30 +01:00
Émilie Feral
932782bec4 [code] Load Variable box content only once in the ConsoleController (to
avoid memory exhaustion later)
2018-11-23 12:04:03 +01:00