Commit Graph

5910 Commits

Author SHA1 Message Date
David Capello
80744eb80e Fix compilation error with gcc
We need #include <cstring> to use memcpy
2018-01-02 13:30:38 -03:00
David Capello
10e66bbd19 Remove #include to ui layer 2018-01-02 13:18:00 -03:00
David Capello
cf07af155f Move .aseprite file encoder to dio module (related to #379)
In this way we'll be able to use the encoder in a future
module (e.g. dll COM server) to generate thumbnails.
2018-01-02 13:12:50 -03:00
David Capello
11817e27fe Update copyright year in README file 2018-01-02 12:13:52 -03:00
David Capello
d1e9abf85c Move ComPtr class to laf-base library 2018-01-02 12:12:50 -03:00
David Capello
5811bba2b1 Several changes to the native file selector on all platforms
* Added she::FileDialog::setType() to select the different kind of
  dialog (open one file, multiple files, save one file, open a folder)
* Added capacity to select folders with she::FileDialog
* Added she::CommonFileDialog so all native dialogs share common code
* Windows:
  * Reimplemented using the IFileDialog COM interface introduced in
    Windows Vista (this one supports choosing folders when
    FOS_PICKFOLDERS flags is used)
  * Added she::ComPtr<> utility class to Windows port (it might be
    useful in laf::base in a future, or we might use the Microsoft
    CComPtr or _com_ptr_t types in a future)
* GTK:
  * Reimplemented to use gdk and gtk directly instead of using gtkmm
    library
  * Now it's centered on the given she::Display (instead of being
    centered on the screen)
  * Default location is the desktop instead of documents (this should
    be configurable in a future "more generic" solution)
  * Removed WITH_DEPRECATED_GLIB_SUPPORT and fixed compilation with GTK
    file selector
2017-12-21 16:35:12 -03:00
David Capello
d088ee0f38 Minor change in USE_SHARED_HARFBUZZ option text 2017-12-20 16:54:41 -03:00
David Capello
19890a1f24 Merge branch 'winterheart-ft' 2017-12-20 16:39:47 -03:00
David Capello
ddfe4e65b3 HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS might not be defined (harfbuzz 0.9.27) 2017-12-20 16:37:38 -03:00
David Capello
7f9d1f64d8 Merge branch 'ft' of https://github.com/winterheart/aseprite into winterheart-ft 2017-12-20 15:09:17 -03:00
David Capello
2807c10017 Fix crash deleting undo states on macOS when running from the app bundle
This bug wasn't reproduced in other situations. Only when running
Aseprite from the app bundle. It looks like app bundles are dynamically
linked with a different free/delete implementation which zeroes/modify
the deallocated memory.

I've posted an answer to this kind of problem on macOS here:
https://stackoverflow.com/a/47817729
2017-12-14 13:16:04 -03:00
David Capello
355d4b1135 Adjust scroll correctly when tiled mode is changed
https://community.aseprite.org/t/tile-mode-preview-incorrect/785
2017-12-14 09:11:20 -03:00
David Capello
a938fcec7f Fix ChangePixelFormatCommand label on keyboard shortcuts dialog when used without params 2017-12-13 17:19:00 -03:00
David Capello
9520dee00a Avoid random crashes changing Color Mode with a TTF font in the theme
This is a weird combination of things:
1. StatusBar::onPixelFormatChanged() is being called in a non-UI thread
   because ChangePixelFormatCommand changes the color mode from a
   Job (background thread).
2. The UI layer is not prepared to work on multithreading, so all UI
   stuff should be used in the main UI thread (anyway, generally, the UI
   layer doesn't crash if it's used by multiple threads).
3. The harfbuzz library (used for TTF fonts) crashes if it is used by
   multiple threads, so that was the trigger of this crash.
2017-12-13 17:11:53 -03:00
David Capello
a307668552 ChangePixelFormatCommand can be called without params 2017-12-13 17:09:13 -03:00
David Capello
b30b0de52e Update harfbuzz module 2017-12-13 16:10:00 -03:00
David Capello
e4abaafec3 Don't add useless cmd::SetPalette() when converting a sprite to Grayscale w/grayscale palette 2017-12-13 15:44:03 -03:00
David Capello
195a87aca3 Remove unused Font forward declarations 2017-12-13 14:31:17 -03:00
David Capello
ede5412d5e Fix usage of TrueType fonts on Linux/Allegro port 2017-12-13 14:30:49 -03:00
David Capello
8a738bd440 Finally fix for Shift+2 on macOS on English keyboard layout (fix #1627)
Previous fix in 9378379cb8 works only for
Spanish layout.
2017-12-13 12:27:57 -03:00
David Capello
4c9e67de18 Linux: Fix crash using Aseprite in batch mode
Reported here:
http://steamcommunity.com/app/431730/discussions/2/1499000547480220354/
2017-12-11 13:40:26 -03:00
David Capello
31bf851d4f Fix X11 app icon 2017-12-06 18:50:23 -03:00
David Capello
9378379cb8 Now Shift+2 shortcut can be used on macOS (fix #1604) 2017-12-06 16:09:23 -03:00
David Capello
7d9a0379e4 Replace REPORT_KEYS with KEY_TRACE in vk.mm 2017-12-06 16:08:50 -03:00
David Capello
ffe25c9750 Disable KEY_TRACE in she/win/window.cpp 2017-12-06 15:41:29 -03:00
David Capello
086445d9a1 Fix triggering commands with Shift+key when a freehand tool is the active one (reported in #1604) 2017-12-06 15:20:29 -03:00
David Capello
29d2988112 Fix new Ctrl+' and Ctrl+Shift+' keyboard shortcuts on Windows
Now Unicode characters are included on keyboard messages generated from
a Control+key on Windows.
2017-12-06 15:06:56 -03:00
David Capello
7dcc0072f1 Add SwitchNonactiveLayersOpacity command (fix #1515)
This is a temporal solution but it's good enough for an experimental
feature.
2017-12-06 14:44:40 -03:00
David Capello
b0b3818267 Possibility to assign same key to several tools (fix #1460) 2017-12-06 10:22:32 -03:00
David Capello
150b27862f Keyboard shortcuts to avoid selecting Paint Bucket and Gradient with G key 2017-12-06 09:55:07 -03:00
David Capello
2ccbf44a55 Fix crosshair glitches on Editor when brush size popup is open 2017-12-05 13:31:34 -03:00
David Capello
48fc0cbcb4 Don't allow shift pixels on locked layer
Discussion: https://community.aseprite.org/t/750
2017-12-01 17:18:23 -03:00
David Capello
21248b96dc Don't apply Flip/Rotate commands to locked layers
Several issues fixed from https://community.aseprite.org/t/750

- Don't apply flip/rotate commands to cels from locked layers
- Show a status bar tooltip when all selected layers are locked
- Keep the timeline range enabled after the flip/rotate command
2017-12-01 17:14:18 -03:00
David Capello
7682971acb Don't allow Insert Text when the layer is locked
Discussion: https://community.aseprite.org/t/750
2017-12-01 17:10:45 -03:00
David Capello
e0a60b6748 Generate the list of command IDs from en.ini file 2017-12-01 15:10:21 -03:00
David Capello
ccee49c02b Move command friendly names to the strings file
Related to #124
2017-11-30 23:41:45 -03:00
David Capello
3c3914c7d8 Fix some warnings in timeline.cpp 2017-11-30 23:40:46 -03:00
David Capello
c7c049028b Add command to show the brushes popup 2017-11-30 16:23:31 -03:00
David Capello
264c59bbc1 Fix assigning configured shortcuts to QuickCommands
As QuickCommands will be created in MainWindow widgets mainly, we have
to create all widgets before we load the keyboard shortcuts.
2017-11-30 16:22:44 -03:00
David Capello
297dbbf913 Minor change in color_bar.cpp to use COLOR_BAR_TRACE() 2017-11-30 15:00:24 -03:00
David Capello
5f33b55a11 Add new commands to show color bar menus/options
Added QuickCommand class to create commands in the relevant
place (e.g. the ColorBar commands can be created in
ColorBar::registerCommands()).
2017-11-30 14:51:13 -03:00
David Capello
a75c8fb1b8 Convert list of commands to a map 2017-11-30 12:33:08 -03:00
David Capello
eb3143ce21 Rename CommandsModule to Commands 2017-11-30 12:24:07 -03:00
David Capello
c0ef5e2a15 Remove unused variable from Sprite_set_colorMode() 2017-11-30 11:54:50 -03:00
David Capello
677d5253ad Linux: Don't keep Alt flag pressed when we Alt+tab the window 2017-11-29 18:07:36 -03:00
David Capello
5e7cc50cb0 Don't call create_sub_bitmap() to create empty bitmaps 2017-11-29 16:20:48 -03:00
David Capello
d3d107b0ac Add Trim option in Export Sprite Sheet 2017-11-29 16:17:30 -03:00
David Capello
d67b083e42 Fix Alt key modifier on Linux 2017-11-29 15:39:44 -03:00
David Capello
daf2672dbd Removed unused file in she/alleg4 port for macOS
macOS doesn't support Allegro port since several versions ago.
2017-11-29 15:33:16 -03:00
David Capello
519715224e Fix displaying several keyboard shortcuts for the same command 2017-11-29 15:28:04 -03:00