Fixes a bug that made it rather awkward to resize the style editor
dialog with libass, as the libass provider briefly creates a modal
dialog whenever it's created, which would interrupt the drag
Originally committed to SVN as r6744.
Save the initial start and end times of lines before adjusting them to
avoid negative line durations, so that if further changes to the edit
boxes make the adjustment unneccesary the original values can be
restored. This Fixes the problem where changing a line visible from
frames 800-900 to 800-901 would actually result in 90-901, due to the
end frame briefly being 90.
Originally committed to SVN as r6741.
This makes it so that if there is a gap between two lines but not enough
space for both the full lead-in and lead-out to be added, adding lead-in
to the second line will be prioritized over adding lead-out to the first
line, which is usually the desired result.
Originally committed to SVN as r6731.
Char hook events propagate by default, removing the need for the event
filter to make key down events propagate, which was causing some funny
issues.
On Windows, the char hook handler runs before menu accelerators, fixing
a bug where Default context hotkeys would override more specific ones
when they appeared on a menu. Unfortunately, this is not the case on
GTK, so the dumb accelerator-disabling hack is still required.
Originally committed to SVN as r6724.
This command commits the current line, advances to the next line (even
if Auto Next on Commit is disabled), and resets the next line's time to
the default timing as if the next line was zero-timed. Add a default
hotkey of Shift-G, but don't bother with a toolbar button for now as
demand for this turned out to be fairly low.
Closes#946.
Originally committed to SVN as r6720.
We only read subtitles, which are individually very small and generally
have video frames between them, resulting in most of the 65 KB
previously read being wasted. On an arbitrary test file this speeds up
subtitle reading from a cold cache by ~25%, and ~60% from warm.
Originally committed to SVN as r6716.
Although in absolute terms it does not take very long, loading the 18 MB
en_US thesaurus was about three quarters of Aegisub's total startup
time when opening with no command line arguments.
Originally committed to SVN as r6702.
In cases where an English-specific change was made to a string (such as
fixing a misspelling or colour -> color), update the corresponding msgid
in the po.
Apply some of the punctuation changes where it's safe to. Many strings
lost some punctuation at the end, so simply update the msgid when the
translation didn't have any punctuation at the end, and if the
punctuation was the same, update both the msgid and msgstr (and leave it
up to the translator if the punctuation was different).
Update msgid and msgstr in the cases where the printf formatting
character was the only thing that changed.
This decreases the number of new strings by up to ~150.
Originally committed to SVN as r6686.
The dropdown to pick the provider/player can't be made translatable with
how they're currently implemented, and having the options group name not
match the values in the dropdown is more confusing than useful.
Originally committed to SVN as r6678.
GTK accelerators silently swallow the keypresses when the menu item is
disabled, so disable accelerators completely and just use our hotkey system.
Closes#1314.
Originally committed to SVN as r6673.
If a "1, 1+2, 1" pattern appeared at the end of the selection the blank
line at the end would never get cleaned up as it's removed when the line
after it is checked for recombination, so add a special case for that.
Closes#1468.
Originally committed to SVN as r6669.
hotkey::check marks non-matching events as skipped, so the default key
event handler was running even if BaseGrid did something with the
keypress.
Closes#1464.
Originally committed to SVN as r6667.
Default to VSFilter on Windows as libass is still somewhat unstable.
Set the default audio player via the platform config file rather than
not doing anything with it.
Originally committed to SVN as r6664.
Return wxNullColor rather than the original color on cancel so that the
calling code can actually tell if it was cancelled.
If one of the subs edit box color buttons is cancelled, undo the changes
made rather than restoring the original text of the active line. This
makes the cancel button actually work with multiple lines selected, and
eliminates some undo state noise.
Closes#1465.
Originally committed to SVN as r6663.
With ATI cards, deleting a wxGLContext seems to invalidate ALL
wxGlContexts, rather than just things associated with the deleted one.
This resulted in video breaking after closing the detached video dialog,
as the embedded video display was trying to use an invalidated context.
To work around this, delete and recreate the context when reattaching
video.
Also recreate the visual typesetting tool as OpenGLText holds references
to textures created on construction.
Originally committed to SVN as r6646.
When opening the video resulted in the script resolution changing, the
subtitles file was committed at a time when IsLoaded() would return true
but VideoOpen hadn't been signalled yet, resulting in some VideoDisplay
code running before the display was initialized. If the video opened is
sufficiently fast to decode, this could result in a crash due to trying
to display a frame before the display is shown.
Originally committed to SVN as r6645.
Typical computers have far more RAM than they did in 2005, and the
memory required for each undo state is far lower than when the default
was first set to 8.
Originally committed to SVN as r6640.
r6632 made ConverterImpl have a vtable, which makes the iconv_fallbacks
parent no longer the first thing in the object, so add an explicit cast.
Originally committed to SVN as r6639.
Split the configuration dialog off into its own file and mostly decouple
it from the subtitle format.
Save last used export settings to options and restore them the next time
the dialog is opened.
Use libaegisub for charset conversion and IO rather than wxWidgets.
Use libaegisub's line-wrapping logic and finish implementing all of the
various wrapping modes.
Make unchecking the "Translate alignments" checkbox do something.
Originally committed to SVN as r6636.
glibc's iconv implementation supports ISO-6937-2, but libiconv doesn't
due to that these days the only place it's used is in a few old subtitle
formats. As a result, on everything but linux we need our own converter.
Conversion from ISO-6937-2 is currently not supported.
Originally committed to SVN as r6632.
Move SMPTE handling to agi::vfr::Framerate to get all of the interesting
logic dealing with timcodes in one place, and to make it testable.
Completely rewrite the SMPTE time conversions as testing them reveals
that they were incorrect in some cases.
Originally committed to SVN as r6631.
As ASS doesn't support negative times, some of the other code assumes
that times are >= 0, and it's never actually useful to have a negative
start time.
Originally committed to SVN as r6623.
Fix some issues where a spurious load/unload dialog would be displayed
despite that nothing would be loaded even if the user selected yes, and
double-loading of audio when opening video and audio files with
automatic audio loading enabled.
Originally committed to SVN as r6618.
The rewritten audio display does not use displayTimer and that
functionality shouldn't have been in the players in the first place.
Originally committed to SVN as r6605.
Don't let the user cancel the language selection dialog on first
startup, and don't bother with the dialog at all if there's only one
language available.
Originally committed to SVN as r6602.
Use more appropriate controls rather than a pile of text ctrls and some
not-entirely-correct validation of the values.
Split apart the dialog and the actual resampling logic.
Originally committed to SVN as r6599.