Commit Graph

299 Commits

Author SHA1 Message Date
Thomas Goyne f3428bccbd Fix compilation with wx built with --enable-stl
--enable-stl replaces the implicit conversion to char/wchar_t* with one
to std::[w]string. This breaks conversions to boost::filesytem::path and
makes some ternaries ambiguous (which GCC helpfully reports as no
conversion existing rather than an ambiguous conversion).
2014-01-05 08:21:53 -08:00
Thomas Goyne 924c63103f Add a better error message when a hotkey is set for an invalid command 2014-01-04 06:20:31 -08:00
Thomas Goyne 0b205e8019 Fix typo in help text 2014-01-03 07:41:36 -08:00
Thomas Goyne be485dd4d4 Use raw string literals for regular expressions where useful 2013-12-12 09:27:52 -08:00
Thomas Goyne d6a5d9c458 Use initializer lists in some places 2013-12-11 18:50:11 -08:00
Thomas Goyne 4c1a8a21b9 Fix assertion failure when deleting all lines
Lines need to be deselected before they're deleted, but new lines need
to be committed before they can be selected, so reorder things to
remove -> insert new line if needed -> commit -> update selection -> delete.
2013-12-01 20:27:31 -08:00
Thomas Goyne a7f4fb5b87 Run clang-modernize on things 2013-11-23 09:57:22 -08:00
Thomas Goyne 3d573f0e70 Add Split at cursor (at video frame) 2013-11-17 17:21:23 -08:00
Thomas Goyne 0ef9963782 Replace Duplicate and Shift with Split (before|after) current frame
If the current frame is outside the bounds of the selected line, create
a duplicate of it at the current video frame. Otherwise, make the line
end on the previous frame and create a copy of it which starts on the
current frame (for split before).
2013-11-17 15:07:17 -08:00
Thomas Goyne f0ef14669f Handle override blocks starting at the beginning of the line correctly 2013-11-04 13:54:12 -08:00
Thomas Goyne 62a81df4b2 Fix handling of unpaired braces in the edit box buttons 2013-11-03 05:38:13 -08:00
tophf 3948bdc6f4 Fix trimming of second line in Recombine Lines 2013-11-01 08:44:21 -07:00
Thomas Goyne eee4da0642 Change the selection before committing deletions of lines
For whatever reason this was sometimes being done after the commit,
which resulted in a lot of code only working by coincidence when the
grid commit handler happened to be the first one to be called.
2013-10-27 07:03:51 -07:00
Thomas Goyne 2f14c395e7 Preserve line current length in Duplicate and Shift
It's quite rare to actually want a multi-frame line followed by a
single-frame line; in most cases they're either all a single frame (in
which case this behaves the same as it always has), or they're all
multi-line, in which case this should be more convenient.
2013-10-26 08:44:16 -07:00
Thomas Goyne 5f63a3fcce Remove the help/files command
The local docs it tries to open don't actually exists and if they're
ever added, the help contents command opens them anyway so I'm not sure
what the intended purpose of the command ever was.
2013-10-25 14:09:42 -07:00
Thomas Goyne 3a852f102d Remove entirely superfluous doxygen comments in commands 2013-10-25 14:03:35 -07:00
Thomas Goyne 51d516979b Improve some help text for commands
Consistently use the imperative mood and expand some overly terse help
messages.
2013-10-25 13:54:20 -07:00
Thomas Goyne c5e30709a6 Add a command to cycle between subtitle providers 2013-10-24 14:32:49 -07:00
Thomas Goyne 535a17bcf2 Remove pointess OSX_ prefix from functions 2013-10-21 18:11:37 -07:00
Thomas Goyne 7bd1da7d45 Fix saving screenshots of dummy video 2013-10-16 17:29:03 -07:00
Thomas Goyne bbd4cbef78 Fix shifting contiguous selections downward
Reverse iterators behave differently from regular iterators when
swapping (regular iterators continue to point at the same elements,
while reverse iterators do not), so instead use regular iterators with a
negative step for shifting down.
2013-09-30 17:01:15 -07:00
Thomas Goyne 8fade74026 Actually trim whitespace when combining lines
regex_replace does not mutate the string in place.
2013-09-21 11:21:25 -07:00
Thomas Goyne 6cd6ee9845 Use auto more places 2013-09-17 07:51:07 -07:00
Thomas Goyne e5afaf8a45 Handle subtitle lines pasted into the edit box
If the text being pasted can be parsed as ASS dialogue events, then do
so even if the edit box is focused since it's rather unlikely that
the user actually wants ASS subtitle events in their subs.
2013-09-16 11:02:20 -07:00
Thomas Goyne af2028e971 Pass unique_ptrs around by value 2013-09-16 06:43:17 -07:00
Thomas Goyne 2fdbc73721 Fully extract the resolution resampling logic from DialogResample 2013-07-09 08:35:50 -07:00
Thomas Goyne a1d44cafc1 Redesign VideoFrame
Eliminate the manual memory management and shuffle around where the
copies are made to eliminate the need for non-owning video frames.
2013-07-01 18:35:09 -07:00
Thomas Goyne 7c7cfc79e6 Delete SubtitlesGrid since it's now empty 2013-06-18 19:43:16 -07:00
Thomas Goyne ad58ae14bf Extract RecombineLines from SubtitlesGrid 2013-06-18 19:43:16 -07:00
Thomas Goyne bda127144d Extract adjoin lines logic from SubtitlesGrid 2013-06-18 19:43:16 -07:00
Thomas Goyne de7b09f7f7 Change some enums into enum classes 2013-06-12 20:01:21 -07:00
Thomas Goyne 72d4577d7d Kill scoped_ptr in favor of unique_ptr 2013-06-11 16:06:58 -07:00
Thomas Goyne f21a72992b Use unique_ptr for most non-wx owning pointers 2013-06-08 19:21:49 -07:00
Thomas Goyne 5c4279a654 Add command "edit/line/duplicate/shift_back" 2013-06-08 19:21:28 -07:00
Thomas Goyne 05baa4b0e4 Fix compilation with gcc 4.7 2013-04-29 20:24:33 -07:00
Thomas Goyne 3c7527c2f7 Do a better job of picking a new active line after deleting lines
Set it to the first line not part of the selection after the selection
begins if there are any, and the last line remaining in the file if not
(i.e. the last line before the selection).

Closes #1595.
2013-04-16 20:05:44 -07:00
Thomas Goyne e89fb6eeb8 Improve the edit box tooltips 2013-04-07 08:43:56 -07:00
Thomas Goyne 4a4583a77d Fix path generation for saving screenshots 2013-02-08 09:53:34 -08:00
Thomas Goyne 1f831be170 Ask the user if they want to close the current file before prompting for a new file to open rather than after 2013-02-06 13:38:34 -08:00
Thomas Goyne 09aa873ed7 Hide the StatusTimeout awfulness in a util function 2013-02-06 13:22:34 -08:00
Thomas Goyne 396ff897e5 Kill StandardPaths
It's now just a pointless wrapper around agi::Path.
2013-02-06 13:22:33 -08:00
Thomas Goyne a0d3dbc550 Extract Loading/Saving/Undo stuff from AssFile
Add SubsController, which deals with things like what subtitle file is
currently open, rather than the contents of the current subtitle file.
Move the rest of the relevant logic from FrameMain there in addition to
all of the stuff from AssFile.
2013-02-06 13:22:32 -08:00
Thomas Goyne ca9be4caef Extract some duplicated wxFileSelector code to a helper function 2013-02-06 13:22:16 -08:00
Thomas Goyne bc7229782c Use an enum for the predefined aspect ratio types 2013-02-06 13:22:15 -08:00
Thomas Goyne 1e0f08c0ed Mostly purge wxWidgets from non-UI stuff
Use boost::filesystem::path for all paths, and std::string for all other
strings, converting to/from wxString as close to the actual uses of wx
as possible.

Where possible, replace the uses of non-UI wxWidgets functionality with
the additions to the standard library in C++11, or the equivalents in
boost.

Move the path token management logic to libaegisub (and rewrite it in
the process).

Add a basic thread pool based on asio and std::thread to libaegisub.

This touches nearly every file in the project and a nontrivial amount of
code had to be rewritten entirely, so there's probably a lot of broken
stuff.
2013-02-06 13:22:15 -08:00
Thomas Goyne 89a431a68b Set end times to zero when pasting plain text. Closes #1570. 2013-01-17 14:04:50 -08:00
Thomas Goyne 879c2c19ae Add a button to the split editbox to remove the line text only, leaving override tags 2013-01-14 08:37:03 -08:00
Thomas Goyne 9a36e5cfe1 Add a unique ID to dialogue lines
This is needed to track lines across undo, as the previous method of
using the row number was slow and broke on inserts/deletes.
2013-01-14 08:37:03 -08:00
Thomas Goyne 0e7df15170 Initial implementation of the split editbox 2013-01-14 08:37:03 -08:00
Thomas Goyne 8162ebea24 Actually read the initial alpha for the color picker buttons 2013-01-14 08:37:03 -08:00