Commit Graph

53 Commits

Author SHA1 Message Date
Christian Kaiser 5108762f65 [WIP] Command refresh 2025-07-29 14:05:13 -03:00
David Capello 09538f9a1a clang-format all files 2024-12-16 14:52:19 -03:00
Martín Capello f7eed69d7c Move OpenFileJob to its own header 2024-10-15 16:24:41 -03:00
Gaspar Capello 04c45f4329 Fix duplicate items in keyboard shortcuts list (fix #4387)
Introduced Key::isListed() and Command::isListed() to customize when a
command should be displayed in the list of shortcuts.

Removed commands:
'Launch'
'OpenBrowser'
And removed unnecessary commands:
'Change Color Mode: Indexed'
'Contract Selection'
'Export Sprite Sheet'
'Flip Canvas Horizontally'
'Frame Properties'
'Load Palette'
'Open Sprite'
'Playback Speed 1x'
'Run Script'
'Save Palette'
'Select Used Colors'
'Set Palette Entry Size'
'Tileset Mode: Auto'
2024-09-16 10:14:12 -03:00
David Capello bf0a47545c Remove #if/endif ENABLE_UI conditional directives (fix #4619)
This was originated for #1279 (CLI-only Aseprite) which can be
achieved with LAF_BACKEND=none anyway.

In this way we simplify the development process, and checking for the
availability of the GUI can be done in run-time through App::isGui()
or Context::isUIAvailable().
2024-09-02 23:16:26 -03:00
David Capello 0cc1161d64 Disable progress bar in commands that can receive ui=false (fix #4165) 2024-05-09 14:34:48 -03:00
David Capello e78e1e9a54 Remove current_editor, replace with Editor::activeEditor()
Finally removed src/app/modules/editors.h file.
2022-10-20 12:31:22 -03:00
Joshua Ogunyinka bf88fa2bd1 Add missing language strings when loading/saving components 2022-10-12 14:21:21 -03:00
David Capello 8b4746e813 Add option to disable the "open sequence of files" dialog 2021-04-12 16:57:02 -03:00
David Capello 35bb3af6e2 Replace all base::Bind() with lambda functions 2021-03-05 20:09:42 -03:00
David Capello 8c0f81cbba Improve handling of image sequences when dropping files or opening multiple files
Now we can repeat the same action (Agree/Skip the all sequence of
images) for all the dropped files/selected files in the "Open File"
dialog (as in the CLI new behavior).
2020-07-30 16:27:23 -03:00
David Capello 1255b17738 Fix opening image sequences more times from CLI
We've also fixed the Agree/Skip dialog to show a checkbox and repeat
the same action for all image sequences.

Fixes:
https://github.com/aseprite/aseprite/issues/2128
https://github.com/aseprite/aseprite/issues/1936#issuecomment-451565903
2020-07-30 14:33:27 -03:00
David Capello 30b2585037 Save grid bounds inside .aseprite files and doc::Sprite (fix #688) 2019-10-10 15:08:59 -03:00
David Capello 9a75d01efe Improve the File Selector adding new view types: list, small icons, big icons (fix #451) 2019-03-25 22:09:22 -03:00
David Capello 3c35887abf Specialize Params::get_as<bool>() to read "true" as a true bool
Just like new params impl Param<bool>::fromString()
2019-03-22 11:47:45 -03:00
David Capello f2ed45e795 Replace base::UniquePtr -> std::unique_ptr 2018-08-08 17:27:26 -03:00
David Capello 9c79ea2b77 Rename app::Document -> Doc 2018-07-07 11:54:44 -03:00
David Capello 139c5aac49 Add flag to compile CLI-only (fix #1279)
New cmake flag -DENABLE_UI=OFF can be used to turn off the GUI
and compile a CLI-only version of Aseprite.

Requested here too:
https://community.aseprite.org/t/1351
2018-05-07 00:11:50 -03:00
David Capello 0426582e0e Don't crash when we select an non-existent recent folder
* Other minor changes in the recent files/folder API
* Don't remove the recent folder (if it exist) when a recent file
  doesn't exist
2018-03-14 12:08:02 -03:00
David Capello dee6ff6c7e Refactor: Use new base::paths type for list of filenames/extensions 2018-02-21 11:06:58 -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 1350d6d7f7 Add possibility to open multiple files at once (fix #1163) 2017-04-08 00:06:25 -03:00
David Capello 9f76136876 Use std::string instead of char* in several places
This is useful to avoid creation of std::strings from const char* several times when it's not really needed.
2017-03-15 23:59:19 -03:00
David Capello 643cad5c97 Add basic implementation of slice tool (#721) to modify theme parts
It still need support to export to .aseprite-data as <slice> XML elements, and animation support.
2017-03-06 19:27:43 -03:00
David Capello 4813936a3a Add --oneframe CLI param to load just one frame 2016-12-01 12:06:35 -03:00
David Capello 83bd999f41 Move OpenFileCommand member functions to Params 2016-12-01 11:37:45 -03:00
David Capello c06ed1b993 Don't show errors if we cancel the sprite loading process 2016-11-22 14:01:17 -03:00
David Capello 1b736aef85 Improve UX when opening file sequences
* Now we can select the specific files that are part of the sequence
* New checkbox do the same for all dropped files (fix #1284)
2016-11-15 18:11:47 -03:00
David Capello 2240742816 Avoid processing the same file two times when it's used to load a sequence
E.g. If we drop three files (1.png, 2.png, and 3.png), and we load 1.png
as a sequence, we don't want to ask for the third file.
2016-11-14 19:44:29 -03:00
David Capello ce6c85996e Update laf library (base/path is gone, use base/fs) 2016-11-01 19:14:05 -03:00
David Capello 5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello 5f90ef7c9b Add properties in App to access directly to timeline/contextBar/workspace 2016-04-22 13:19:06 -03:00
David Capello c30112ea10 Convert FileOp into a class 2015-09-29 11:27:00 -03:00
David Capello eff31223ab Add support to open image sequences when files are specified in the command line (fix #785) 2015-08-27 09:34:14 -03:00
David Capello a8577a4273 Rename Context::isUiAvailable to Context::isUIAvailable 2015-05-18 17:04:31 -03:00
David Capello 5ef4cb1460 Change get_readable/writable_extensions() API from char* to std::string 2015-03-17 17:17:01 -03:00
David Capello 0cb4b2234d Always load params when a command is executed
This is to avoid leaving commands with old params (a problem with
keyboard shortcuts). To make sure, we've changed arguments from Params*
to Params&, so we always have params to load.

Also, in this change we introduce a new way to give parameters to executed
commands from menu items using AppMenuItem::setContextParams(). Before
showing a popup, we can call setContextParams() to give extra params to
the command (e.g. the specific FrameTag to remove or change properties).
In this way "contextparams" attribute for <item> in gui.xml is not
available anymore.
2015-03-11 15:40:22 -03:00
David Capello 361a3084fd Merge branch 'new-workspace'
Conflicts:
	src/app/commands/cmd_open_file.cpp

Fixes:
	src/app/ui/timeline.cpp
2015-03-04 22:41:34 -03:00
David Capello b8ed98bd8b Add native file open/save dialog (only win32 at the moment, issue #321) 2015-03-02 16:07:35 -03:00
David Capello 6862e02805 Add list of recent files and folders in Home tab
* Add LinkLabel::onClick()
* Use Widget instead of ListItem in ListBox API
* Add TextRule::padding() and use it to calculate the preferred size
  for a skin::Style's rules
2015-03-02 11:18:33 -03:00
David Capello 2c6067f7e4 Update license of app/ module to GPLv2 2015-02-12 12:16:25 -03:00
David Capello 63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello 5075c1f86f Remove unused variables/code 2014-08-17 20:37:12 -03:00
David Capello 6824570c4b Remove base/override.h (use override keyword directly) 2014-08-14 23:07:47 -03:00
David Capello 81ffb0c5bd Refactor: Create doc::Context and move some logic from app::Document to doc::Document
The objective of these changes is to create a more testable doc/logic API.

Included changes:
- Added doc::Context, doc::Documents (the old app::Documents),
  and doc::Sprites (and observers for each)
- Added raster::Sprite::createBasicSprite()
- Added doc::ColorMode (equal to raster::PixelFormat)
- Added some methods to doc::Document: context(), sprites(), sprite()
  (to replace app::Document::getSprite()), width/height(), colorMode(),
  name(), and close()
- Moved app::DocumentObserver/Event to doc::DocumentObserver/Event
- Replaced app::ContextObserver with doc::DocumentsObserver and a couple
  of signals.
- Renamed app::Context::getActiveDocument() with
  doc::Context::activeDocument()
- Renamed app::Context::getActiveLocation() with
  app::Context::activeLocation()
- Removed app::ContextObserverList
- Removed app::DocumentId (now we can use doc::ObjectId)
- Removed app::Context::getSettings()
2014-07-29 00:53:24 -03:00
David Capello 411ceda0e7 Add options to save GIF files (how to quantize palettes mainly)
* Added "context" parameter to save/load routines so we can test them.
2014-07-19 22:01:39 -03:00
David Capello 66564e354f Fix issue #394 - crash when we cancel the file save operation
There were problems calling a pure virtual function (IFileOpProgress
implemented by OpenFileJob) when we are already in ~Job() dtor. So we've
to wait the background thread (added Job::waitJob() function) to join
the thread so it can use IFileOpProgress safely.

Also the save process of .ase files now can be cancelled (it wasn't
possible before).
2014-05-02 17:04:55 -03:00
David Capello a2753fd898 Add missing OVERRIDE modifier to OpenFileCommand member functions 2014-04-17 01:35:31 -03:00
David Capello 44d3e228fd Add missing OVERRIDE modifier to Command::clone() overrides
It fixes some invalid clone() overrides without const modifier.
2014-03-29 17:08:40 -03:00