Despite special-casing zero-length input, wxString("") takes over four
times as long as wxString() - and on a 10k line script, this change cuts
AssFile's copy constructor's runtime in half.
Originally committed to SVN as r6401.
The macro processing function can now return a second value, which is
the index of the line to make active, which must be one of the lines in
the selection. If it is not, or if the value is not present, then the
active line is left unchanged if it is in the new selection, or set to
the first line of the new selection if it is not.
Closes#1435.
Originally committed to SVN as r6398.
Previously adding a word to the dictionary via the spell checker dialog
would not update the dictionary used by the subs edit box and
vice-versa.
Originally committed to SVN as r6396.
Remove the pointlessly hardcoded height of the checklist.
Set the parent correctly.
Set the initial focus to the OK button.
Originally committed to SVN as r6373.
Timing changes can potentially make all of the columns need to be
repainted (due to the collision line color), and the grid currently
isn't smart enough to know when this is actually the case, so just
always repaint the entire thing.
Originally committed to SVN as r6371.
Scintilla's modification notifications don't expose enough information
to do a very good job of deciding when to group changes with previous
ones, but it does expose when Scintilla thinks undo groups should end,
so just use that.
This should significantly improve the behavior of undo when editing
lines in the edit box.
Originally committed to SVN as r6370.
SubtitlesGrid::DuplicateLines iterated over the entire file multiple
times for each line duplicated, making duplicating large numbers of
lines extremely slow.
Originally committed to SVN as r6366.
Calling AssFile::Save/Load from multiple threads (even on different
objects) was not safe due to that is uses SubtitleFormat internally,
which was inheriently thread-unsafe. To fix this, change
SubtitleFormat's interface to support immutable implementations, and
make all of the current implementations immutable.
This isn't a perfect solution - making a subtitle format implemented in
lua immutable would be rather difficult - so at some point in the future
SubtitleFormat should probably be changed to a factory which returns new
objects from GetReader/GetWriter.
Originally committed to SVN as r6365.
Redesign how shift times history is saved. Previously it stored the
localized strings in the history file, which are not particularly
parsable as the format may differ between locales. Rather than doing
this, store the raw settings in a json file, and generate the history
strings on display. In addition to making it much easier to load old
settings, this makes it so that the history is always displayed using
the current locale, rather than the locale in which the shifting was
done.
Closes#1427.
Originally committed to SVN as r6363.