Commit Graph

7761 Commits

Author SHA1 Message Date
David Capello
e23cd003bb Merge branch 'Enfyve-fix-232' into main 2022-05-03 16:16:36 -03:00
David Capello
c7827410bd Move the refresh button at the right of the file selector 2022-05-03 16:15:46 -03:00
David Capello
9248f53447 Don't invalidate the cached file system on each action
We can use the refresh button for this, and in a future we could
refresh it when the window loses focus and is activated again, or
listening the file system changes.
2022-05-03 15:46:01 -03:00
David Capello
db84c02e94 Fix crash accessing an invalid iterator in FileSelector::onRefreshFolder() 2022-05-03 15:24:55 -03:00
David Capello
debd22014c Fix program hanging when calling FileSelector::refresh()
The FileSystemModule is already locked, so if we use LockFS another
time it will try to lock a FileSystemModule::m_mutex for a second
time.
2022-05-03 15:14:44 -03:00
David Capello
f41c6bc1c5 Fix compilation in macOS (and add Command+R to refresh) 2022-05-03 15:11:47 -03:00
David Capello
a004b7dfe1 Merge branch 'fix-232' of https://github.com/Enfyve/aseprite into Enfyve-fix-232 2022-05-03 15:11:27 -03:00
David Capello
d861f0760c Switch from C++14 to C++17 (#2999) 2022-04-29 10:01:23 -03:00
David Capello
dfa357eb8d Add an experimental CommandResult for the execution of commands
This makes possible to return true or false after the execution of
each command app.command.CommandName() if it successes or fails.
Currently the Lua API documentation says something about this here:

  https://github.com/aseprite/api/blob/main/api/command/ReplaceColor.md#replacecolor

But this is not true, the function always returned nil. Now it will
return true or false.
2022-04-29 09:53:57 -03:00
David Capello
cc7da16691 Run Console in background so commands can continue running and logging to the console if needed (fix #3227) 2022-04-28 21:58:15 -03:00
David Capello
94065571b5 [x11] Add possibility to set a user-defined string to detect styluses (#3176) 2022-04-28 16:33:21 -03:00
David Capello
f638b5ca2b Fix minor memory leak loading a doc::Palette from backup data 2022-04-26 12:16:31 -03:00
David Capello
ea47f6624f Update IXWebSocket module 2022-04-26 10:30:34 -03:00
David Capello
e45e05eaff Don't create new threads for files we couldn't generate a thumbnail for 2022-04-22 13:12:48 -03:00
David Capello
319824021b Keep plugin preferences when re-installing an extension (fix #3259) 2022-04-22 09:09:10 -03:00
David Capello
ae7f340f7e Don't use system libb2 by default in libarchive (fix #3257) 2022-04-22 08:46:57 -03:00
David Capello
65ef6f8e96 Replace utf8 iterators with utf8_decode (fix #3260)
This should fix some problems decoding invalid UTF-8 strings.
2022-04-21 20:24:49 -03:00
David Capello
75a99360a0 Use std::mutex & std::thread in ThumbnailGenerator 2022-04-21 12:46:21 -03:00
David Capello
efa3cbf83e Update laf module 2022-04-21 12:26:44 -03:00
David Capello
f5bce17e7b Delete unused code in FileOp and FileFormat 2022-04-21 12:23:52 -03:00
David Capello
737a60c5ac Minor change in ThumbnailGenerator::instance() 2022-04-19 17:46:31 -03:00
David Capello
78ec753a3c Simplify list of workers in ThumbnailGenerator with unique_ptrs 2022-04-19 17:14:50 -03:00
David Capello
f0a7d1faaa Fix data race loading next thumbnail without locking the item
This was detected with -fsanitize=thread
2022-04-19 17:09:49 -03:00
David Capello
03e0bc26c9 Fix bug initializing auxiliary table for findBestfit() from multiple threads
This could happen if we generated thumbnails for GIF files from
multiple threads when showing the File > Open dialog for the first
time (calling findBestfit() from multiple threads).
2022-04-19 17:07:37 -03:00
David Capello
82a0ec5199 Improve seleting words w/double-clicking on a ui::Entry (fix #3229)
* Now we support selecting multiple words at the same time
* Now punctuation is not included as part of the word
2022-04-19 16:17:28 -03:00
David Capello
83e2604d12 Make ui::Entry smaller 2022-04-19 08:48:50 -03:00
David Capello
52667855d5 Fix public -> private in ui::Timer 2022-04-18 18:01:39 -03:00
David Capello
e4c2995326 Extensions now support defining keyboard shortcuts (#1403, #3239) 2022-04-13 22:46:48 -03:00
David Capello
721e401052 Fix some memory leaks & simplify code sending UI messages 2022-04-13 21:04:54 -03:00
David Capello
b4d3692927 Add ShowMenu command so the user can customize Alt+top level menu mnemonic shortcuts (#3239) 2022-04-12 22:52:09 -03:00
David Capello
3645afd9a2 Add ui::Widget::resetMin/MaxSize() member functions 2022-04-12 21:14:07 -03:00
David Capello
c450bf7c50 const-correctness for ui::Widget member functions to find children 2022-04-12 21:07:20 -03:00
David Capello
93b0e9e520 Fix painting extra straight line using Ctrl+Shift w/Pencil tool (fix #3196) 2022-04-12 19:11:20 -03:00
David Capello
43513e0f1b Don't show tooltip when a new frame/layer is created from a script transaction
This might improve the performance of some scripts if it creates
several frames/layers at the same time.
2022-04-11 09:53:01 -03:00
David Capello
11417c56ac [lua] Add Cel.frame setter to move a cel quickly 2022-04-07 19:48:39 -03:00
David Capello
b4e9d7b155 Fix memory leaks when deleting backups from recovery data 2022-04-07 11:48:49 -03:00
David Capello
9e7077b442 Update clip module (includes https://github.com/dacap/clip/issues/57) 2022-04-06 09:33:23 -03:00
David Capello
5ddf8c0d28 Fix json11 compilation with MSVC
Probably a cmake bug that doesn't detect some invalid flags with VS2022.
Reported here: https://gitlab.kitware.com/cmake/cmake/issues/23398
2022-04-06 09:31:39 -03:00
David Capello
7e2b7b6096 Fix json11 module on MSVC 2022-04-06 00:29:52 -03:00
David Capello
e61888fc92 Fix compilation when ENABLE_UI is disabled and UIContext isn't defined 2022-04-06 00:10:49 -03:00
David Capello
693a5777e7 Update json11 module 2022-04-06 00:00:23 -03:00
David Capello
2594892dd5 Fix crash when a Lua error happens in a Dialog onclose (fix #3237) 2022-04-05 23:57:36 -03:00
David Capello
3ed969ff0a Close all docs correctly even in case of exception (fix #3162) 2022-04-05 23:07:08 -03:00
David Capello
2a908f79df lua: Dialog() must return nil if there is no UI available
This avoids some crashes when running in --batch mode and some script
tries to create a Dialog().
2022-04-05 20:45:34 -03:00
Ryan Schmidt
be7c26da5e No longer add -stdlib=libc++ in CMakeLists.txt
Adding -stdlib=libc++ was needed when 10.7 was being targeted because on
10.8 and earlier libstdc++ is the default. Now that the target is 10.9
specifying -stdlib=libc++ is unnecessary since libc++ is the default on
10.9 and later.
2022-03-31 17:39:51 -03:00
Gaspar Capello
683747f412 Remove tag range adjust when exporting sprite sheets (fix #3210)
Before this fix, tag ranges were adjusted in the json data file, in the 'meta' sector, when the --list-tags and --ignore-empty flags were set.
Particularlly, when --split-layers, --list-tags, and --ignore-empty were on, the calculation of tag ranges could fail with cels with pure mask pixels.
2022-03-31 17:35:49 -03:00
Gaspar Capello
b70a29269d Fix wrong json export with linked, trimmed cels (fix #2600)
Before this fix, the json file associated with the exported sprite sheet had wrong 'spriteSourceSize' coordinates in particular cases like this:
- Linked cels
- Export Sprite Sheet options: TrimmedCels + Merge Duplicates + SplitLayers checked
2022-03-31 16:43:14 -03:00
Jeremy Behreandt
d429797359 Fix Lua Color HSL Constructor
Changed call from HSV to HSL for Lua Color HSL constructor.
2022-03-29 23:15:17 -03:00
David Capello
33e9359340 Update laf module 2022-03-29 18:11:55 -03:00
David Capello
4018e38d38 Update laf module 2022-03-29 18:08:58 -03:00