Commit Graph

39 Commits

Author SHA1 Message Date
David Capello a06e01ff7e Rename ui::Entry::EntryChange to ui::Entry::Change 2015-09-22 16:22:47 -03:00
David Capello d6684691bf Rename PRINTF to LOG 2015-08-28 20:48:49 -03:00
David Capello 53a925e86d Remove SkinParts enum
Now we generate the list of SkinTheme parts from the skin.xml file using
the gen utility.

Several refactors included in SkinTheme class to simplify code.
2015-08-04 19:38:52 -03:00
David Capello f01b816fb5 Remove JI_ prefix from ui/base.h constants 2015-06-23 14:00:00 -03:00
David Capello e0fea708f8 Add option to resize the final output of "Save Copy As" command (fix #685) 2015-06-03 16:34:27 -03:00
David Capello c6f2c48d66 Move the "new folder dialog" to its own xml to automatically generate its widget 2015-06-03 12:21:14 -03:00
David Capello 726013e0bd Use generated widget in app::FileSelector from file_selector.xml 2015-06-03 12:21:12 -03:00
David Capello 3c95bd57ee Unify app::FileSelector::Type with app::FileSelectorType 2015-06-03 12:21:08 -03:00
David Capello 9723d1b6ec Now the file type combobox in FileSelector acts like a filter (fix #643) 2015-05-28 18:59:12 -03:00
David Capello 2a5c93e333 Move "do you want to overwrite this file?" question inside the FileSelector
Native file dialogs ask this same question too (also they check for
read-only attribute).
2015-05-28 16:11:06 -03:00
David Capello c6c7439566 Close autocomplete popup when we change the active folder in FileSelector 2015-05-06 16:58:32 -03:00
David Capello 05fb32bb84 Fix navigation keys for OS X and Windows
On OS X we can use Cmd+[ or Cmd+] to navigate the history. And Cmd+Up/Down
to go to the enclosing folder, or enter in a folder respectively.

On Windows we can use Alt+Left/Right to navigate the history. And Alt+Up
to go to the enclosing folder. (Alt+Down is an extra shortcut to enter
in the folder).
2015-05-06 16:47:43 -03:00
David Capello 4e911b7eea Esc key close the combobox popup 2015-05-06 16:27:45 -03:00
David Capello 139e0cb8f5 Fix issues autocompleting the file name field in FileSelector
Now the file name field is an editable ComboBox, so we don't
autocomplete/modify the text inside the entry box.

With this commit we modified the editable ComboBox behavior too:
* When the ListBox is shown, the focus remain in the Entry field (now
  the ListBox cannot have the focus when the ComboBox is editable).
* When Up/down keys are received by the Entry, they are given to the
  ListBox to change the selected item. But the focus returns to the
  Entry anyway.
2015-05-04 14:58:24 -03:00
David Capello b23194dfae Fix several warnings in MSVC, clang, and gcc 2015-03-05 15:19:00 -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 7785199899 Fix platform specific flags
* Replace ALLEGRO_WINDOWS and WIN32 with _WIN32
* Replace ALLEGRO_MACOSX with __APPLE__
2015-02-12 12:46:56 -03:00
David Capello 2c6067f7e4 Update license of app/ module to GPLv2 2015-02-12 12:16:25 -03:00
David Capello d796256eef Don't use Allegro's for_each_file API
Replace for_each_file() calls with <dirent.h> POSIX API
2014-10-20 01:20:08 -03:00
David Capello e07f1f1668 FileSelector: Default directory is user home/docs folder 2014-09-21 16:49:59 -03:00
David Capello 1ac99c04ae Fix the autocomplete timer activation/deactivation in CustomFileNameEntry
The kKeyUpMessage was received when we opened the open/save file dialog
with a shortcut (e.g. Ctrl+Shift+S), so the timer was triggered and the
autocomplete activated. After that, the text was unselected (as it looks
like fully autocompleted). Now we activate the timer to autocomplete
only when the field is modified (onEntryChange).
2014-09-11 11:09:26 -03:00
David Capello 03ac41e05d Add timer to autocomplete in FileSelector 2014-09-10 00:58:25 -03:00
David Capello 7af2882fb8 Fix regression bug: don't enter to a folder if we press Enter and with a new file name (e.g. in save as dialog) 2014-09-10 00:19:04 -03:00
David Capello 43dbeb02b8 Some fixes to the FileSelector
* Enter pad should behave like the regular Enter key
* Added navigation with Ctrl (or Cmd) + arrow keys
2014-09-09 23:42:47 -03:00
David Capello bde2ddbe83 Remove ji_screen and ji_clock global variables
- Replace JI_SCREEN_W/H with ui::display_w/h()
- Remove GfxMode class
- Move drawing code of ColorCurveEditor widget to onPaint()
- Rename ji_clock -> ui::clock()
2014-08-31 14:17:49 -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 950a9fe82f Add button to create new folders in FileSelector (issue 233) 2014-06-28 18:01:32 -03:00
David Capello 95fbfd9fe7 Add a mutex to access to the FileSystemModule 2014-04-24 08:51:59 -03:00
David Capello 3c4bbbe30c Replace jwidget_set_min/max_size() with Width::setMin/MaxSize() 2014-04-21 22:15:29 -03:00
David Capello b33357ed46 Remove base::string (std::string is good enough for utf8 strings) 2014-04-20 19:53:27 -03:00
David Capello 6ed35b733c FileSelector: fix combobox behavior as now ComboBox::onChange() event is generated when the combobox is open 2014-03-29 18:42:17 -03:00
David Capello 7e593e92e1 FileSelector: move navigatin_locked as a member variable 2014-03-29 18:00:19 -03:00
David Capello a2a4eaae91 FileSelector: fix auto-complete to avoid modifying letter case of user-typed text (issue #247) 2014-03-29 17:26:07 -03:00
David Capello e777729928 FileSelector: select the whole filename when an item is selected in the list 2014-03-29 17:21:13 -03:00
David Capello ad0b28bd63 Change Window() ctor to avoid ambiguity (DesktopWindow, WithoutTitleBar, or WithTitleBar)
In this way we know at the moment of the creation of the window if it
will need the close button.

Issue #280.
https://github.com/aseprite/aseprite/pull/6
2013-11-23 17:47:57 -03:00
David Capello 5b252c30f5 Add support for Unicode file names on Windows
- Fixed issue #46: open .png files with Unicode chars
- Fixed issue #150: ability to uncompress program in folders w/Unicode chars
- Added base::utf8_iterator
- Added base::FileHandle
- Added base::get_app_path()
- Modified ui::KeyMessage::ascii() -> unicodeChar()
- Removed JI_NOTEXT flag
- Added app::XmlDocumentRef class and app::open_xml() function
- Added support for Unicode text exchange with Win32 clipboard
2013-10-14 19:58:11 -03:00
David Capello cde54f3682 Change BSD license to MIT in sublibraries and fix headers 2013-08-08 21:01:20 -03:00
David Capello c88f9b172b Refactor: Move app files to src/app subdirectory inside app namespace
- Add HAVE_CONFIG_H wrapper to #include "config.h"
- Removed widgets namespace (it's in app now)
- Move some functions from src/file/file.h to src/base/cfile.h
- Move Vector2d to base library
- Rename MenuItem2 to AppMenuItem
2013-08-05 21:20:19 -03:00