Modifying the contents of a text control after IM processing happens in
the same cycle of the event loop seems to be seriously broken. Work
around this by disabling IM processing for time edits, as it should
never be relevant for them anyway.
Closes#1679. Closes#1680.
Don't delete the old copy of the file until after the new version is
committed to avoid a use-after-free when code tries to do things with
the active line in a COMMIT_NEW handler, as just trying to avoid doing
that hasn't really worked out.
The default Lua include path is encoded with the local charset rather
than UTF-8. This causes problems when the working directory includes
non-latin-1 characters which are valid in the local charset, as Aegisub
expects the string to be UTF-8. As the default path isn't very useful on
Windows (on other platforms it could potentially include things like
luarocks-installed modules), just clear it.
Closes#1676.
Switch to flat_map for trivially less memory usage and just use a global
map rather than a heap-allocated map since it's not
(de)initialization-order sensitive.
Eliminate the pointless runtime command name -> icon map and just make
commands responsible for their icons. Don't bother predecoding and
caching icons since it wastes some RAM (~10 MB) and decoding icons takes
a trivial amount of time.
Fix a few places where icons were being set for the wrong command names.
Remove the faux-variadic make_unique since 2013 has real variadic
templates.
Switch to the non-deprecated windows version check functions.
Switch to the develop branch of boost since master doesn't fully support
VS 2013 atm.
Fix some assorted compilation errors.
Hardcode the paths to a bunch of Visual Studio things since it's now
expanding the relevant macros to nothing for whatever reason.
SetBitmap triggers a size event, which results in UpdateBitmap being
called again. For some reason, rather than being an infinite loop this
just resulted in the bitmap never being set.
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.
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).
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.
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.
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.
If the script's matrix matches the video's matrix, use that even if
Force BT.601 is on, and if it's TV.601, use that even if Force BT.601 is
off.
This should mostly eliminate the common problems resulting from mixed
values of the Force BT.601 option.
Closes#1649.
For some reason the close event is getting sent multiple times and
them getting processed in the event loop for the confirmation dialog,
resulting in two dialogs.
Split int validating and double validating into two separate classes.
Make double parsing, validating and stringifying locale-aware. This is
far more complicated than it needs to be due to that Aegisub's locale
handling is a total mess.
Use DoubleValidator rather than wxFloatingPointValidator, because the
latter doesn't work with Aegisub's locale mess (on OS X it uses the C
locale for some things, and the locale reported by CoreFoundation for
others).
Closes#1568.