The drawing area is now a container and the layers are the proper drawing widgets. There is a separated layer for the current element so only the current element is redisplayed when drawing.
With old GS/GJS, some GType names were generated from class names without sanitizing it (e.g. Menu.ActionButton).
Instead of defining all GType names, sanitize all class name as it was GType name, and let GJS generated GType name securely when it is necessary.
Fix#46.
* Rename "Persistent" to "Persistent over restarts".
* If disabled, "Persistent over toggles" has priority over "Persistent over restarts" and "Drawing on the desktop".
Close issue #42.
Array is more semantically appropriate.
For example 2 actions may have the same translations (error of a translator). With an object (or a map), only the second would be displayed, which is problematic to alert to the problem.
Additionally, handle the case where some GSettings keybinding values are empty.
* Let the user choose the directory.
* Rework of Files.Images.
* area.currentImage is now an ... image, not an index.
* Add 'switch-image-file-reverse' keybinding.
* Add image gicons (from thumbnails) in the submenu.
* Images are reset on drawing mode left or on images added from the clipboard.
Since the most drawing params can be changed via menu or shortcuts, remove default.css and user.css.
* Missing params like palettes, dash, grid, etc, are added to prefs.
* Add palette choice to menu and shortcuts.
* Some defaults like fonts, line width, etc, are no longer modifiable by the user.
All key events go through a hidden St Entry.
* Ibus inputs support.
* GS keyboard support, by moving the keyboard box above the drawing area.
* All convenience keybindings of a St Entry (cursor moves, delete, paste, select all ...).
* Add a writing action mode so some keybindings are disabled when writing (e.g. `Delete` and `Ctrl + A`).
* Draw a thin rectangle as text cursor instead of a text character, so moving the cursor is smoother.
Close#29, #34
Use `Main._findModal` instead of `Main.actionMode` as the criterion of the toggle direction.
Main.actionMode is not a safe criterion to know if the area is modal. For example, `Main.actionMode` is modified when toggling overview while drawing.
* Close menu before toggling modal (before because the menu changes `Main.actionMode`).
* Hide the helper and update the grid display when toggling modal.
* Signal `stop-drawing` -> `leave-drawing-mode` for consistence.
* `area.disable` -> area `destroy` event handler.
* `area.isInDrawingMode` -> `area.reactive`.
Keybinding to ungrab keyboard and mouse while drawing remains at the top.
To be aware that this create some problems with the shell (DnD #1 and maybe more ?).
related to #6, #9, #20, #24, #33
* `SCALE_PRESERVE` (preserve ratio)
* `SCALE` (vertical, horizontal or both)
There is a third transformation, `SCALE_ANGLE`, that is not used because it causes problems to the `elementFinder`. Probably a bug of Cairo.inStroke that do no consider scales.
* 'Shapes' -> 'Tools' ('Shapes' + 'Manipulations')
* 'TextState' -> 'TextStates'
* Rotation centers are now computed dynamically (when building Cairo or SVG paths).
* Text rotation center is now located at the beginning of the text.
* Text elements gain a 'lineIndex' attribute to retrieve the rotation center of the first line.