Commit Graph

2271 Commits

Author SHA1 Message Date
Thomas Goyne fc7164422c Flush options after asking the first-startup questions
Originally committed to SVN as r6789.
2012-05-15 13:39:55 +00:00
Thomas Goyne 4940a98e85 Set both the initial and value fields of spin controls in the preferences dialog since wx ports are inconsistent about which is used
Originally committed to SVN as r6788.
2012-05-15 13:39:50 +00:00
Thomas Goyne 5b9ba0205a Always use change_value for setting spin ctrls in the color picker
With wxCocoa the change events from SetValue are processed immediately,
resulting in significant breakage as in some cases multiple spin
controls need to be set at once. Even on other platforms where things
appeared to work due to the change notifications being delayed, they
still didn't do anything useful and slowed updates down slightly.

Originally committed to SVN as r6787.
2012-05-15 13:39:45 +00:00
Thomas Goyne ad64e8e48a Remove hardcoded widths for the labels in the color picker
This results in the controls being slightly misaligned, but that's not
as bad as truncating the labels.

Originally committed to SVN as r6786.
2012-05-15 13:39:40 +00:00
Thomas Goyne a97c7fa1f6 Fix infinite loop when changing the color in the color picker on OS X
Originally committed to SVN as r6785.
2012-05-15 13:39:35 +00:00
Thomas Goyne 75305877f0 Set the initial values of the color picker before binding events
Originally committed to SVN as r6784.
2012-05-15 13:39:30 +00:00
Thomas Goyne ba413fa64d Rework destruction of FrameMain's children
wxCocoa doesn't like reparenting SubsGrid to NULL, so instead
recursively destroy all of FrameMain's children other than SubsGrid and
its parent. Fixes a crash on exit on OS X.

Originally committed to SVN as r6783.
2012-05-15 13:39:24 +00:00
Thomas Goyne 6b21485c0b Add default_config_platform.json to distclean files
Originally committed to SVN as r6775.
2012-05-14 13:21:33 +00:00
Thomas Goyne 0239ab6688 Remove the explicit height from the preferences dialog
The height was too short to fit the contents in some cases, and wasn't
even used on Windows. Patch by cantabile.

Closes #1488.

Originally committed to SVN as r6773.
2012-05-13 00:58:16 +00:00
Thomas Goyne 57e06a6cad Fix error when a dropdown in the preferences dialog has no values
Originally committed to SVN as r6772.
2012-05-13 00:58:11 +00:00
Thomas Goyne d04bc6d9b4 Don't paint the audio display if it hasn't been fully initialized due to audio not being open
Originally committed to SVN as r6771.
2012-05-13 00:58:06 +00:00
Thomas Goyne 35fa6c47ce Automatically add a "Default" style to the "Default" catalog as 2.1.x did. Patch by cantabile. Closes #1487.
Originally committed to SVN as r6765.
2012-05-13 00:57:34 +00:00
Thomas Goyne 3388281fb7 Fix error when the style catalog directory doesn't exist or is empty
Use wxDir::GetFirst/GetNext rather than wxFileFirstFile since the latter
doesn't have any way to signal that there aren't actually any files to
be found.

Closes #1486.

Originally committed to SVN as r6764.
2012-05-13 00:57:25 +00:00
Thomas Goyne 2addf40b31 Fix typo (204M -> 240M)
Originally committed to SVN as r6763.
2012-05-11 14:42:30 +00:00
Thomas Goyne bc74dfc33b Update the video matrix tagging scheme
Write the color range and color space used to convert video to RGB to
the YCbCr Matrix field, or None if no non-RGB video was opened. See
http://code.google.com/p/xy-vsfilter/issues/detail?id=91 for related
discussion.

Originally committed to SVN as r6762.
2012-05-11 14:38:44 +00:00
Thomas Goyne baacea6ab0 Force threads to 1 when opening video via lavf since the ffms2 bug that makes multithreaded decoding sometimes break still hasn't been fixed
Originally committed to SVN as r6761.
2012-05-11 02:58:34 +00:00
Thomas Goyne c354dc9e30 Fix brokenness in the curve smoothing
Originally committed to SVN as r6760.
2012-05-11 02:47:24 +00:00
Thomas Goyne a05d469741 Actually do the smoothing when drawing a smoothed freehand shape
Originally committed to SVN as r6759.
2012-05-11 02:47:18 +00:00
Thomas Goyne c4e36e00a5 Fix compilation with wxGTK trunk
Originally committed to SVN as r6758.
2012-05-10 14:19:07 +00:00
Thomas Goyne f1b2b4a3da Don't allow opening multiple copies of the spell checker dialog
Originally committed to SVN as r6757.
2012-05-10 14:19:02 +00:00
Thomas Goyne 47fb50d4d3 Fix crash after cancelling the shift times dialog. Closes #1483.
Originally committed to SVN as r6756.
2012-05-10 14:18:54 +00:00
Thomas Goyne f724abd0b8 Add support for symlinking fonts rather than copying them in the fonts collector. Based on a patch by nodame.
Originally committed to SVN as r6755.
2012-05-10 14:18:47 +00:00
Thomas Goyne 18f158a364 Rename option "Always show visual tools" to "Only show visual tools when mouse is over video" as the old name said nothing about when they wouldn't be shown.
Originally committed to SVN as r6754.
2012-05-05 02:11:15 +00:00
Thomas Goyne 06e23b9296 Use SetSelectionAndActive whenever both are set at once
I'm not sure if this fixes any current actual problems as using slightly
stale data is normally only a problem when lines are being deleted, but
it's easier to fix it across the board than to figure out where it is
and isn't needed, and the speed impact of batching is trivial.

Originally committed to SVN as r6753.
2012-05-05 02:11:09 +00:00
Thomas Goyne f756aa73c1 Add SelectionController::SetSelectionAndActive, which automatically batches the changes to the selection and active line
Originally committed to SVN as r6752.
2012-05-05 02:11:03 +00:00
Thomas Goyne 70abaf75d7 Don't cache the selection in the dialogue timing controller, as getting it isn't very expensive and it was used in a stale state when the active line changed
Originally committed to SVN as r6751.
2012-05-05 02:10:57 +00:00
Thomas Goyne a15024e052 Trigger a modified event on Enter in a time edit so that selecting several lines and hitting Enter to set them all to the active line's time works
Originally committed to SVN as r6750.
2012-05-04 02:53:14 +00:00
Thomas Goyne 9269c79763 Only clear the selection due to a click on no visual features if there are actually multiple visual features to select
Originally committed to SVN as r6749.
2012-05-04 02:53:09 +00:00
Thomas Goyne 479de87068 Leave the selected range in the audio display unchanged when switching to an untimed line as 2.1.x did
Originally committed to SVN as r6748.
2012-05-04 02:53:03 +00:00
Thomas Goyne 1bd24d837c Allow block selections on the grid with modifier keys held down
Originally committed to SVN as r6747.
2012-05-04 02:52:58 +00:00
Thomas Goyne 213ccccf86 Redesign the logic for scrolling the grid on drags
Update the grid scroll position on mouse up rather than mouse down,
eliminating the need for the logic that made it impossible to do a drag
selection from the top or bottom rows of the grid, and fix some cases
where the grid would scroll in an undesirable direction.

Originally committed to SVN as r6746.
2012-05-04 02:52:52 +00:00
Thomas Goyne 4d7c6b08e0 Leave the current line selected after splitting at cursor rather than selecting the new line
Originally committed to SVN as r6745.
2012-05-03 03:14:11 +00:00
Thomas Goyne 4603a86953 Don't pointless recreate the subs provider when the subs preview is resized
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.
2012-05-02 22:42:43 +00:00
Thomas Goyne 63d60b9b1e Save the size of the style editor in addition to the position
Originally committed to SVN as r6743.
2012-05-02 22:42:37 +00:00
Thomas Goyne 5a067f56e4 Add command "time/lead/both" which adds both lead in and out
Originally committed to SVN as r6742.
2012-05-02 22:42:31 +00:00
Thomas Goyne 8f3b027881 Improve the negative-duration-avoiding behavior of the time edit boxes
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.
2012-05-02 22:42:25 +00:00
Thomas Goyne 252351b7da Don't stop audio playback when switching lines
Originally committed to SVN as r6740.
2012-05-02 22:42:18 +00:00
Thomas Goyne 4be8e3595b Limit the duration of the lines created with Insert (before) and Insert (after) to the default timing length
Originally committed to SVN as r6739.
2012-05-02 00:31:44 +00:00
Thomas Goyne cb75c42f04 Leave the old audio open when opening new audio fails for any reason
Originally committed to SVN as r6738.
2012-05-02 00:31:38 +00:00
Thomas Goyne b8212512e7 Work around a bug which made style names in the style editor scrolled to the left far sooner than they needed to be
Originally committed to SVN as r6737.
2012-05-01 02:50:09 +00:00
Thomas Goyne 2ef7ed98c0 Update the audio scroll position at most once every 50ms when dragging markers
Originally committed to SVN as r6736.
2012-05-01 02:50:03 +00:00
Thomas Goyne 1558aa2dad Increase the height of the audio display scrollbar by 50%
Originally committed to SVN as r6735.
2012-05-01 02:49:58 +00:00
Thomas Goyne 4231653146 When joining lines, use the maximum of the lines' end times rather than the last line's end time
Originally committed to SVN as r6734.
2012-05-01 02:49:53 +00:00
Thomas Goyne 9e3553c199 Join concatenated lines with a space rather than \N
Originally committed to SVN as r6733.
2012-05-01 02:49:48 +00:00
Thomas Goyne 834c2849da Scroll 1/3 of the audio display per mouse wheel click rather than 120 pixels
This is what 2.1.x did (except this actually handles nonstandard wheel
deltas) and is generally far more usable.

Originally committed to SVN as r6732.
2012-05-01 02:49:43 +00:00
Thomas Goyne 1c4bb4a0e2 Split Lead In and Lead Out into separate passes in the TPP
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.
2012-05-01 02:49:38 +00:00
Thomas Goyne 742cbf16aa Add WebM to the list of supported video formats
Originally committed to SVN as r6730.
2012-05-01 02:49:33 +00:00
Thomas Goyne 2deafdd3a7 Fix race condition on shutdown that could result in the program not completely exiting on Windows
Originally committed to SVN as r6729.
2012-05-01 02:49:26 +00:00
Thomas Goyne 81d1073a97 Move the auto4 script factories to a local non-heap static to reduce memory leak report noise
Originally committed to SVN as r6728.
2012-04-27 19:08:17 +00:00
Thomas Goyne 38e87e2c83 Fix formatting string assertion failure in the search/replace dialog. Closes #1478.
Originally committed to SVN as r6727.
2012-04-27 19:08:09 +00:00
Thomas Goyne c71734a8a4 Fix the width of the adjacent bias slider in the TPP dialog on wxGTK. Closes #1477.
Originally committed to SVN as r6726.
2012-04-27 19:08:02 +00:00
Thomas Goyne 123f02f0fb Process hotkeys in wxEVT_CHAR_HOOK rather than wxEVT_KEY_DOWN
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.
2012-04-27 19:07:49 +00:00
Thomas Goyne 40b1fbaa1b Implement audio/play/toggle (default hotkey B)
Originally committed to SVN as r6723.
2012-04-27 19:07:42 +00:00
Thomas Goyne 46a27a4e46 Eliminate excess spacing from CellSkip
Originally committed to SVN as r6722.
2012-04-27 19:07:36 +00:00
Thomas Goyne b275399fb1 Add option to draw lines at each second in the audio display
Originally committed to SVN as r6721.
2012-04-27 19:07:29 +00:00
Thomas Goyne 8b854283b7 Add audio/commit/default command
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.
2012-04-27 19:07:21 +00:00
Thomas Goyne eb26bc51b9 Add commit commands which always stay and always advance regardless of the auto advance setting
Originally committed to SVN as r6719.
2012-04-27 19:07:15 +00:00
Thomas Goyne 99a65974e4 Move the Next Line on Commit logic to the commit command so that other commands can do different things
Originally committed to SVN as r6718.
2012-04-27 19:07:07 +00:00
Thomas Goyne 79282d7b89 Add the header background color to the preferences dialog
Originally committed to SVN as r6717.
2012-04-27 19:06:58 +00:00
Thomas Goyne e4df8f9654 Reduce the Matroska read-ahead to 1KB
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.
2012-04-22 15:31:16 +00:00
Thomas Goyne b13c72e967 Fix a few places where 32-bit fseek/ftell were used in the Matroska reader code
Originally committed to SVN as r6715.
2012-04-22 15:31:11 +00:00
Thomas Goyne 35241bdbce Fix wxString::Format assertion failure when opening subtitles from Matroska
Originally committed to SVN as r6714.
2012-04-22 15:31:06 +00:00
Thomas Goyne 95344fdb7c Always write user dictionaries to ?user/dictionaries
The value of Path/Dictionary is not guaranteed to be writable, and on
linux is likely to not be.

Originally committed to SVN as r6713.
2012-04-21 15:13:57 +00:00
Thomas Goyne fb5f94ca74 Change the spell checker and thesaurus language lists to radio items rather than check items
Originally committed to SVN as r6712.
2012-04-21 15:13:51 +00:00
Thomas Goyne 0a64763f2f Set the audio volume from the slider when audio is opened
Originally committed to SVN as r6711.
2012-04-21 15:13:46 +00:00
Thomas Goyne 3c31c1a17a Store the loaded audio file as a path relative to the subtitles, as is done with video
Originally committed to SVN as r6710.
2012-04-21 15:13:40 +00:00
Thomas Goyne 15eb4dc29d Fix bad option name that caused a fatal error on startup for clean installs
Originally committed to SVN as r6709.
2012-04-17 15:03:27 +00:00
Thomas Goyne 3253ccdb90 Move the "Force BT.601" option out of the FFmpegSource category as it's no longer FFMS2-specific, and make it on by default
Originally committed to SVN as r6708.
2012-04-16 23:55:21 +00:00
Thomas Goyne eceac482d0 Add BT.601/BT.709 guessing to the Avisynth video provider along with support for Force BT.601
Originally committed to SVN as r6707.
2012-04-16 23:55:15 +00:00
Thomas Goyne c28f262ec4 Use a save file dialog when extracting attachments rather than an open one
Originally committed to SVN as r6705.
2012-04-16 23:55:04 +00:00
Thomas Goyne 8a03e3a374 Read and write attachments in binary mode so they don't get mutilated on Windows
Originally committed to SVN as r6704.
2012-04-16 23:54:59 +00:00
Thomas Goyne d83507c816 Use the overload of wxComboBox::Append that takes a wxArrayString rather than manually looping over the items
Originally committed to SVN as r6703.
2012-04-16 23:54:53 +00:00
Thomas Goyne e5540de2da Delay creation of the thesaurus until it's needed
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.
2012-04-16 23:54:47 +00:00
Thomas Goyne 20a31f8e32 Change the default subtitles provider on Windows to "CSRI/vsfilter_aegisub"
Originally committed to SVN as r6701.
2012-04-16 23:54:42 +00:00
Thomas Goyne ed27a4eaa4 When gathering CSRI renderers, stick those with "aegisub" in the name at the beginning, so that the shipped copy of VSFilter will be used by default
Originally committed to SVN as r6700.
2012-04-16 23:54:34 +00:00
Thomas Goyne 0f9289dc0f Reduce how long the CSRI lock is held
Originally committed to SVN as r6699.
2012-04-14 03:17:22 +00:00
Thomas Goyne 24fde36e7f Don't fallback to default when trying to create a nonexistent CSRI renderer, as that should never happen
Originally committed to SVN as r6698.
2012-04-14 03:17:15 +00:00
Thomas Goyne 77eaedd611 Use wxEVT_CHAR_HOOK rather than wxEVT_KEY_DOWN in the hotkey editor so that hotkeys can be set to Esc
Originally committed to SVN as r6697.
2012-04-13 22:27:56 +00:00
Thomas Goyne 1d15bf273a Fix compilation failure from incomplete merging in r6692
Originally committed to SVN as r6696.
2012-04-12 15:40:25 +00:00
Thomas Goyne ba7b7efc12 Rename the 'Start-marker drag sensitivity' option, as its name was highly misleading
Originally committed to SVN as r6695.
2012-04-12 00:04:36 +00:00
Thomas Goyne 0da9a4f111 Add option to disable the new behavior where left-click-drag sets the start marker then drags the end marker
Originally committed to SVN as r6694.
2012-04-12 00:04:31 +00:00
Thomas Goyne 313fa2e1eb Use START times rather than EXACT for keyframe markers so that they agree with the snap start/end to frame commands
Originally committed to SVN as r6693.
2012-04-12 00:04:24 +00:00
Thomas Goyne 39d2546dcd Add a button to the preferences dialog to reset all options to the defaults
Originally committed to SVN as r6690.
2012-04-11 03:43:08 +00:00
Thomas Goyne 3ae96b59b9 Set the event type for version checker results correctly so that the dialog actually gets displayed
Originally committed to SVN as r6689.
2012-04-10 23:19:42 +00:00
Thomas Goyne 30565530eb Pick the CSRI renderer when the provider is created rather than every time subtitles are loaded
Originally committed to SVN as r6688.
2012-04-10 20:41:25 +00:00
Thomas Goyne 9f87a2bacb Only register the CSRI subtitles provider if there actually are any CSRI providers available
Originally committed to SVN as r6687.
2012-04-10 20:41:20 +00:00
Thomas Goyne e2edd71f9d Make top-level menubar items translatable
Originally committed to SVN as r6684.
2012-04-10 20:41:00 +00:00
Thomas Goyne ee84961d36 Make the invalid command name message translatable, as it's displayed to the user in non-error situations
Originally committed to SVN as r6683.
2012-04-10 20:40:54 +00:00
Thomas Goyne d842e73643 Make the hotkey context names translatable
Originally committed to SVN as r6682.
2012-04-10 20:40:48 +00:00
Thomas Goyne f7a42e8821 Mark the Actor and Effect placeholder texts as translatable
Originally committed to SVN as r6681.
2012-04-10 20:40:43 +00:00
Thomas Goyne 0c7638aed5 s/were were/were/g
Originally committed to SVN as r6680.
2012-04-10 20:40:37 +00:00
Thomas Goyne 711faf17fa Readd the 's' to 'Subtitles provider'
Originally committed to SVN as r6679.
2012-04-10 20:40:32 +00:00
Thomas Goyne 08a63d437a Don't mark the provider/player names as translatable in the preferences dialog
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.
2012-04-10 20:40:26 +00:00
Thomas Goyne 7cda44c3f0 Readd the number prefixes to the automation log levels in the preferences dialog
Originally committed to SVN as r6677.
2012-04-10 20:40:20 +00:00
Thomas Goyne af0e58f876 Readd the word 'Mode' to 'Cycle Tag Hiding Mode'
Originally committed to SVN as r6676.
2012-04-10 20:40:14 +00:00
Thomas Goyne 87455d7f7e Append a blank line to the end of the fonts collector log since it clips the bottom few pixels of the last line on windows
Originally committed to SVN as r6675.
2012-04-08 02:28:50 +00:00
Thomas Goyne 79f24a5fb2 Add a warning when the fonts collector finds over 32 MB of fonts
Originally committed to SVN as r6674.
2012-04-08 02:28:43 +00:00
Thomas Goyne c614980dca "Fix" issues with hotkeys not working with wxGTK
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.
2012-04-07 01:06:34 +00:00
Thomas Goyne db69fdbbcd Vertically center the labels in the color picker dialog. Closes #1467.
Originally committed to SVN as r6672.
2012-04-06 15:51:14 +00:00
Thomas Goyne 309bc35af3 Don't accept keyboard focus in the color picker controls which can't be used via the keyboard. Updates #1467.
Originally committed to SVN as r6671.
2012-04-06 15:51:07 +00:00
Thomas Goyne 07eb718fa1 Rearrange control creation in the color picker dialog to get a less weird tab order. Updates #1467.
Originally committed to SVN as r6670.
2012-04-06 15:51:00 +00:00
Thomas Goyne 5f00eb62f4 Fix a case where Recombine Lines would leave an empty line
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.
2012-04-06 15:50:54 +00:00
Thomas Goyne 3403734c00 Update the cached grid colors when the relevant options are changed rather than just repainting the grid. Closes #1466.
Originally committed to SVN as r6668.
2012-04-06 15:50:46 +00:00
Thomas Goyne 9f3fd691e2 Unskip key events handled by the non-command keypress handling in BaseGrid
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.
2012-04-06 03:53:38 +00:00
Thomas Goyne 84e378148e Add platform-specific default configuration files
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.
2012-04-06 01:55:22 +00:00
Thomas Goyne 0d4846d012 Handle the cancel button in the color picker dialog better
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.
2012-04-06 01:55:14 +00:00
Thomas Goyne 6e877b7dea Make some very similar translatable strings identical
Originally committed to SVN as r6658.
2012-04-04 16:46:02 +00:00
Thomas Goyne 566f08f308 Clean up old log files rather than just letting them accumulate forever
Originally committed to SVN as r6654.
2012-04-03 22:44:47 +00:00
Thomas Goyne bd0f6a4c2b Extract the cache cleaning logic from FFmpegSourceProvider
Originally committed to SVN as r6653.
2012-04-03 22:44:40 +00:00
Thomas Goyne 2a324a56e5 Fix crash when opening the Select Lines dialog for the second time
Originally committed to SVN as r6652.
2012-04-03 20:40:39 +00:00
Thomas Goyne 462448c7d1 Add icons to some of the dialogs missing them
Originally committed to SVN as r6651.
2012-04-03 20:40:33 +00:00
Thomas Goyne fe36760872 Use 16x16 icons for dialogs rather than cropping the 24x24 icons to 16x16
Originally committed to SVN as r6650.
2012-04-03 20:40:24 +00:00
Thomas Goyne 4bb707d663 Use "color" in all UI strings
Previously there were 29 instances of "color" and 9 of "colour".

Originally committed to SVN as r6648.
2012-04-03 17:38:50 +00:00
Thomas Goyne b11e3d7f3a gcc 4.7 compilation fixes
Originally committed to SVN as r6647.
2012-04-03 17:38:45 +00:00
Thomas Goyne 582e947c75 Fix errors when reattaching video with some video cards
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.
2012-04-03 17:38:38 +00:00
Thomas Goyne 9f9ada8f8d Fix race condition that could result in a crash when opening video
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.
2012-04-02 04:22:22 +00:00
Thomas Goyne 4d50efc256 Add a help button to the preferences dialog
Originally committed to SVN as r6644.
2012-04-01 02:43:01 +00:00
Thomas Goyne 8f7d3ba8b8 Move audio color schemes to the Colours page
Originally committed to SVN as r6643.
2012-03-31 17:38:33 +00:00
Thomas Goyne da8ea6d220 Reword a few option labels in the preferences dialog
Originally committed to SVN as r6642.
2012-03-31 17:38:27 +00:00
Thomas Goyne 25f5254e1b Let the user set FFMS2 decoding threads to -1
Originally committed to SVN as r6641.
2012-03-31 17:38:22 +00:00
Thomas Goyne 4f32fe2db4 Increase default undo levels to 50
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.
2012-03-31 17:38:16 +00:00
Thomas Goyne 2d9213cdfc Add support for writing unformatted level 1 teletext to the EBU STL subtitle format
Originally committed to SVN as r6638.
2012-03-29 19:05:45 +00:00
Thomas Goyne 7335c520c1 Ensure that the text field is terminated when writing EBU STL files
The text field must be terminated with 0x8F, so write an extra block if
the last block is filled exactly.

Originally committed to SVN as r6637.
2012-03-29 19:05:37 +00:00
Thomas Goyne 4294e5857d Port the EBU STL (tech 3264) subtitle format from 2.1.9
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.
2012-03-29 19:05:26 +00:00
Thomas Goyne 39ca0c1b5b Fix some uses of uninitialized values on startup
Originally committed to SVN as r6634.
2012-03-29 19:05:07 +00:00
Thomas Goyne dd0b1cf5ec Disable the busy cursor while displaying the FPS prompt when exporting subtitles
Originally committed to SVN as r6633.
2012-03-29 19:04:58 +00:00
Thomas Goyne 71776940f6 Rewrite SMPTE timecode handling
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.
2012-03-29 19:04:36 +00:00
Thomas Goyne c7d3c8a5c3 Override CanWriteFile in the transation subtitle format as the default doesn't work for it
Originally committed to SVN as r6630.
2012-03-29 00:05:34 +00:00
Thomas Goyne c4a1a93b97 Center most of the message boxes over their parent windows
Originally committed to SVN as r6629.
2012-03-28 23:59:19 +00:00
Thomas Goyne 31a0146df2 Fix crash when clicking the sort button in the style manager with no styles selected
Originally committed to SVN as r6628.
2012-03-28 23:59:10 +00:00
Thomas Goyne a76fb7c432 Override CanSave in the SRT format to allow supported override tags
Originally committed to SVN as r6627.
2012-03-28 23:59:01 +00:00
Thomas Goyne d49e59653f Add a version of ParseASSTags that returns the blocks rather than mutating the line
Originally committed to SVN as r6626.
2012-03-28 23:58:50 +00:00
Thomas Goyne a03b37bdef Move the CanSave logic to the subtitle formats as it's obviously format-specific
Originally committed to SVN as r6625.
2012-03-28 23:58:40 +00:00
Thomas Goyne 0ae8479ffb Remove the check for timing in AssFile::CanSave as all non-txt formats support timing
Originally committed to SVN as r6624.
2012-03-28 23:58:28 +00:00
Thomas Goyne 6e36a897d0 Don't allow dragging audio markers to negative times
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.
2012-03-27 23:15:20 +00:00
Thomas Goyne e4043e64a3 Add support for omitted parameters in tags to the SRT exporter
Originally committed to SVN as r6622.
2012-03-27 23:15:12 +00:00
Thomas Goyne 87d5b1b943 Fix error when exporting a file with \bord tags to SRT
Originally committed to SVN as r6621.
2012-03-27 23:15:03 +00:00
Thomas Goyne fccec60fec Center the load/unload dialog over the main window
Originally committed to SVN as r6620.
2012-03-27 23:14:42 +00:00
Thomas Goyne d3eaa5af9c Remove some unused options from the config file and preferences dialog
Originally committed to SVN as r6619.
2012-03-27 04:23:54 +00:00
Thomas Goyne 1d289bf8f8 Rework FrameMain::LoadList and OnSubtitlesOpen a bit
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.
2012-03-27 04:23:45 +00:00
Thomas Goyne 3f70491ea6 Eliminate a few unneeded header inclusions
Originally committed to SVN as r6617.
2012-03-27 00:50:03 +00:00
Thomas Goyne b201bee1d1 Don't mark file format filters as translatable
Originally committed to SVN as r6616.
2012-03-27 00:49:53 +00:00
Thomas Goyne fb7638312a Make PrettySize less dumb
Originally committed to SVN as r6615.
2012-03-27 00:49:43 +00:00
Thomas Goyne 30f0a56832 Document some of the utils functions
Originally committed to SVN as r6614.
2012-03-27 00:49:33 +00:00
Thomas Goyne e6f55bdbcb Use a binary search in IsWhitespace rather than linear
Originally committed to SVN as r6613.
2012-03-27 00:49:24 +00:00
Thomas Goyne 1f1e9a700a Use std::binary_search rather than a set in GetWordBoundaries
This is slightly faster and simpler.

Originally committed to SVN as r6612.
2012-03-27 00:49:15 +00:00
Thomas Goyne 909a0ca280 Remove some unused functions
Originally committed to SVN as r6611.
2012-03-27 00:49:05 +00:00
Thomas Goyne 7f427e01df Fix completely wrong results from the Kanji timer
Durations were being set in milliseconds rather than centiseconds.

Originally committed to SVN as r6610.
2012-03-27 00:48:56 +00:00
Thomas Goyne 232bae36e7 Fix crash when the Accept button in the kanji timer is clicked at a time when there's nothing to accept
Originally committed to SVN as r6609.
2012-03-27 00:48:47 +00:00
Thomas Goyne f9e8d89059 Remove some unused stuff in the kanji timer
Originally committed to SVN as r6608.
2012-03-27 00:48:38 +00:00