Commit Graph

4393 Commits

Author SHA1 Message Date
Thomas Goyne a679d91304 Write the bytes as unsigned chars rather than signed in respack, as the array is declared as unsigned
Originally committed to SVN as r6649.
2012-04-03 20:40:18 +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 e6697b1923 Fix fallbacks for invalid characters when converting charsets
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.
2012-03-31 00:28:55 +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 028fd3b4ba Add line-wrapping logic to libaegisub
Originally committed to SVN as r6635.
2012-03-29 19:05:16 +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 f31d9a5a8b Add converter to ISO-6937-2
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.
2012-03-29 19:04:49 +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
Thomas Goyne 2ef193e197 Remove pointless translatable strings that are never actually displayed
Originally committed to SVN as r6607.
2012-03-27 00:48:28 +00:00
Thomas Goyne 52b1a74f12 Remove todo comment from DirectSoundPlayer, as the player was rewritten entirely instead (years ago)
Originally committed to SVN as r6606.
2012-03-25 04:05:51 +00:00
Thomas Goyne 7218c04d52 Kill AudioPlayer::displayTimer
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.
2012-03-25 04:05:44 +00:00
Thomas Goyne 2840fc0aea Replace most remaining uses of std::auto_ptr with agi::scoped_ptr
Originally committed to SVN as r6604.
2012-03-25 04:05:38 +00:00
Thomas Goyne 55f9ccc18d Remove AudioPlayer::GetProvider()
There's really no reason why anything should ever be getting the audio
provider from an audio player.

Originally committed to SVN as r6603.
2012-03-25 04:05:31 +00:00
Thomas Goyne e120bec4f0 Clean up AegisubLocale a bit
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.
2012-03-25 04:05:25 +00:00
Thomas Goyne 0b9a21bf82 Hide SinkMessage's copy constructor and assignment operator
Originally committed to SVN as r6601.
2012-03-25 04:05:20 +00:00
Thomas Goyne b32515da80 Strip trailing whitespace from all cpp and h files
Originally committed to SVN as r6600.
2012-03-25 04:05:06 +00:00
Thomas Goyne 1077b9b5c4 Rewrite the Resample Resolution dialog
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.
2012-03-25 04:04:59 +00:00
Thomas Goyne 6f167e9293 Add functions for converting between SSA and ASS aligns to AssStyle
Originally committed to SVN as r6598.
2012-03-25 04:04:54 +00:00
Thomas Goyne 2036712acb Don't display an error when the user cancels an export
Originally committed to SVN as r6597.
2012-03-25 04:04:48 +00:00
Thomas Goyne ae5d6edaed End the batch if the Paste Over dialog is cancelled rather than horribly breaking everything
Originally committed to SVN as r6596.
2012-03-25 04:04:42 +00:00
Thomas Goyne ddc70bcd9c Add Paste Over to the default grid context menu
Originally committed to SVN as r6595.
2012-03-23 21:47:55 +00:00
Thomas Goyne a815d35f51 Unswap preserve and estimate times when splitting lines at the cursor
Originally committed to SVN as r6594.
2012-03-23 03:45:35 +00:00
Thomas Goyne 73e81c3dca Rewrite the overscan mask logic so that it works with blackbarred detached video
Originally committed to SVN as r6593.
2012-03-20 00:39:42 +00:00
Thomas Goyne d86d56d816 Move bicubic point interpolation logic to SplineCurve
Originally committed to SVN as r6592.
2012-03-20 00:39:33 +00:00
Thomas Goyne ca76c5cf21 Delete some declarations for nonexistent methods
Originally committed to SVN as r6591.
2012-03-20 00:39:25 +00:00
Thomas Goyne 75ae053958 Make some stuff const
Originally committed to SVN as r6590.
2012-03-20 00:39:10 +00:00
Thomas Goyne 36d962931d Eliminate overly-early rounding that resulted in the waveform renderer being significantly wrong at some zoom levels
Originally committed to SVN as r6589.
2012-03-18 18:41:48 +00:00
Thomas Goyne 4d2623bc2a Really fix crash when switching lines with the drag visual tool active
Originally committed to SVN as r6588.
2012-03-15 00:25:54 +00:00
Thomas Goyne cbf9ee463e Remove export_clean_info.h/cpp from the vcproj
Originally committed to SVN as r6587.
2012-03-12 23:39:51 +00:00
Thomas Goyne 9f43f9f041 Rewrite the Clean Script Info export filter in lua
This makes it easy to make it a macro in addition to an export filter,
and simplifies the implementation.

Originally committed to SVN as r6586.
2012-03-12 23:35:56 +00:00
Thomas Goyne 2fa054b48b Extract strings from the lua scripts for translation
Originally committed to SVN as r6585.
2012-03-12 23:35:47 +00:00
Thomas Goyne f4c1fb441e Mark the names and descriptions of included lua macros as translatable
Originally committed to SVN as r6584.
2012-03-12 23:35:37 +00:00
Thomas Goyne 55eb230ef6 Add aegisub.gettext to get translations of strings
Originally committed to SVN as r6583.
2012-03-12 23:35:29 +00:00
Thomas Goyne f66c772130 Ensure the hotkey descriptions in the translation and styling assistants actually get marked as translatable
Originally committed to SVN as r6582.
2012-03-12 23:35:20 +00:00
Thomas Goyne 4153bbc10b Fix pointlessly different strings in the translation and styling assistant
Originally committed to SVN as r6581.
2012-03-12 23:35:11 +00:00
Thomas Goyne 212013ccdf Add Delete line to the hotkeys listed in the translation assistant
Originally committed to SVN as r6580.
2012-03-12 23:35:03 +00:00
Thomas Goyne d0150d6b6d Handle external changes in the translation assisant
As all program hotkeys are now allowed while the translation assistant
is active, it can no longer assume that it's the only thing modifying
the file.

Originally committed to SVN as r6579.
2012-03-12 23:34:54 +00:00
Thomas Goyne 7e5b241260 Use SubsTextEditCtrl in the translation assistant
This gives spellchecking and thesaurus support for the translation (and
syntax highlighting, but that usually won't be useful).

Originally committed to SVN as r6578.
2012-03-12 23:34:45 +00:00
Thomas Goyne de9cc755d2 Stop key event propagation when checking for hotkeys to avoid checking keypresses that aren't hotkeys several times
Originally committed to SVN as r6577.
2012-03-12 23:34:34 +00:00
Thomas Goyne 14274a7672 Forward Cut/Copy/Paste to all text areas, not just the main subs edit box
Originally committed to SVN as r6576.
2012-03-12 23:34:25 +00:00
Thomas Goyne 42b1d4d4eb Fix some misleading variable shadowing
Originally committed to SVN as r6575.
2012-03-12 23:34:16 +00:00
Thomas Goyne 29fcf9de44 Fix new[]/delete mismatch
Originally committed to SVN as r6574.
2012-03-12 23:34:05 +00:00
Thomas Goyne 4a151ca995 Set all selected lines on clicks in dialogue mode rather than just the active line
Originally committed to SVN as r6573.
2012-03-12 00:07:33 +00:00
Thomas Goyne dcffc3fd38 Show all selected lines in the audio display in dialogue mode
Originally committed to SVN as r6572.
2012-03-12 00:07:27 +00:00
Thomas Goyne a48190871b In karaoke mode use the Selected style for the portion of the active line not in the active syllable
Originally committed to SVN as r6571.
2012-03-12 00:07:22 +00:00
Thomas Goyne aba0b5db11 Add support for the Selected style to the audio renderers
Originally committed to SVN as r6570.
2012-03-12 00:07:16 +00:00
Thomas Goyne 812e2e8025 Document a few classes
Originally committed to SVN as r6569.
2012-03-12 00:07:09 +00:00
Thomas Goyne 30d7a18e97 Add missing spaces after colons in error messages
Originally committed to SVN as r6568.
2012-03-11 23:51:10 +00:00
Thomas Goyne 175443d7a6 Fix int overflow in DAR calculation
Originally committed to SVN as r6567.
2012-03-11 23:51:04 +00:00
Thomas Goyne 77e755d109 Allow duplicated timestamps as real files do have them; simply skip all but the last frame with the same timestamp
Originally committed to SVN as r6566.
2012-03-11 23:05:08 +00:00
Thomas Goyne ebe32890fb Don't scroll to the beginning of the audio when switching to an untimed line
Originally committed to SVN as r6565.
2012-03-11 23:05:02 +00:00
Thomas Goyne 1d4c0c0712 Apply bounds checking to AssTimes generated from strings
Originally committed to SVN as r6564.
2012-03-11 23:04:56 +00:00
Thomas Goyne 43f461e846 Delete the dialog manager before the main frame as having modeless dialogs disappear after the main window is ugly
Originally committed to SVN as r6563.
2012-03-11 23:04:49 +00:00
Thomas Goyne 284eac1c93 Fix check for Darwin in the tests makefile
Originally committed to SVN as r6562.
2012-03-11 23:04:42 +00:00
Thomas Goyne 3e3a853a89 Fix iterator increment after erase in VisualToolDrag
Originally committed to SVN as r6561.
2012-03-10 02:16:38 +00:00
Thomas Goyne 29662749db Fix case-insensitive regular expressions in the Select Lines dialog
Originally committed to SVN as r6560.
2012-03-10 02:16:28 +00:00
Thomas Goyne 12511901a9 Fix bad string concatenation in a json parse error message
Originally committed to SVN as r6559.
2012-03-10 02:16:20 +00:00
Thomas Goyne 759b8433c1 Silence some clang warnings
Originally committed to SVN as r6558.
2012-03-10 02:16:08 +00:00
Thomas Goyne fed2a91598 Non-precomp header compilation
Originally committed to SVN as r6557.
2012-03-10 02:15:58 +00:00
Thomas Goyne 7f8aecd7fa Use int64_t for progress reporting rather than int as it's what ffms2 requires. Fixes magic jumping progress bars during indexing.
Originally committed to SVN as r6556.
2012-03-10 01:00:13 +00:00
Thomas Goyne 8ec478db36 Make the fonts collector dialog modeless
Originally committed to SVN as r6555.
2012-03-09 00:24:01 +00:00
Thomas Goyne 6b141f2bd3 Fix gcc compilation errors
Originally committed to SVN as r6554.
2012-03-09 00:23:53 +00:00
Thomas Goyne 36548b93b1 Add a dialog manager for modeless dialogs so that they don't have to all be stuffed into the context
Originally committed to SVN as r6553.
2012-03-09 00:23:41 +00:00
Thomas Goyne 41f2f67042 Make the automation manager dialog modeless
Originally committed to SVN as r6552.
2012-03-09 00:23:30 +00:00
Thomas Goyne 931de846ae Ignore \an and \a tags with out of bounds values rather than doing odd things
Originally committed to SVN as r6551.
2012-03-09 00:23:22 +00:00
Thomas Goyne eea914fa48 Don't select the start handle when a line is selected due to a click on the end handle in the drag visual tool
Originally committed to SVN as r6550.
2012-03-09 00:23:14 +00:00
Thomas Goyne 229daa9874 Update the color of the drag handles in the drag visual tool immediately when the selection changes
Originally committed to SVN as r6549.
2012-03-09 00:23:04 +00:00
Thomas Goyne d8e0038333 Fix SVN revision check with SVN 1.7 when the aegisub directory is not the top level directory of the working copy. Patch by Larso. Closes #1458.
Originally committed to SVN as r6548.
2012-03-08 05:07:15 +00:00
Thomas Goyne 59447a942d Make the style manager dialog modeless
Originally committed to SVN as r6547.
2012-03-08 04:17:42 +00:00
Thomas Goyne 83faddfdb6 Refactor New/Copy/Edit in the style manager a bit and do a better job of selecting the right style in the lists
Originally committed to SVN as r6546.
2012-03-08 04:17:36 +00:00
Thomas Goyne b5a71587ff Move more of the style storage management logic to AssStyleStorage
Originally committed to SVN as r6545.
2012-03-08 04:17:29 +00:00
Thomas Goyne a09d96df1f Make AssStyleStorage keep track of the current catalog name
Originally committed to SVN as r6544.
2012-03-08 04:17:23 +00:00
Thomas Goyne fa06033762 Ensure that there is always at least one style catalog existing and selected so that the style manager doesn't have to check if there is one
Originally committed to SVN as r6543.
2012-03-08 04:17:17 +00:00
Thomas Goyne a0b4da90f7 Add commands and menu entries to sort only the selected lines. Closes #1457.
Originally committed to SVN as r6542.
2012-03-07 22:41:12 +00:00
Thomas Goyne c84c9fe6b8 Fix issues with audio auto scrolling and lines longer than the display
Clicking on the audio display (to change line timing) now never scrolls
the display, rather than jumping around if the line is too long to fit
on the display.

Dragged markers are now always kept visible in the display, even if auto
scroll is off.

Originally committed to SVN as r6541.
2012-03-07 22:41:03 +00:00
Thomas Goyne 9f6bb17379 Fix bug where the Actor box would get incorrectly set to the placeholder text
Originally committed to SVN as r6540.
2012-03-07 22:40:54 +00:00
Thomas Goyne b64e1f925c Coalesce typing in the Actor box (but not selections from the dropdown)
Originally committed to SVN as r6539.
2012-03-07 22:40:45 +00:00
Thomas Goyne 94b3764a91 Coalesce changes made in the Effect box
Originally committed to SVN as r6538.
2012-03-07 22:40:35 +00:00
Thomas Goyne 49ce5275d1 Only prompt to update references to a renamed style if there actually are any
Originally committed to SVN as r6537.
2012-03-07 22:40:26 +00:00
Thomas Goyne f4e1b28c9f Rework handling of copied styles in the style manager a bit
Generate the new name in the style manager rather than the editor so
that the naming scheme of copies is consistent between the Copy buttons
and pasting styles.

Name the second copy of style X "X - Copy (2)" rather than "X - Copy -
Copy", and so on for further copies. (Copies of style "X - Copy" would
still be named "X - Copy - Copy").

Select the new style when a copy is created.

Originally committed to SVN as r6536.
2012-03-07 22:40:15 +00:00
Thomas Goyne 366baff2f8 Add option to force all video opened with FFMS2 to BT.601 for VSFilter compatibility
Originally committed to SVN as r6535.
2012-03-07 04:25:46 +00:00
Thomas Goyne bb9859c70f Fix crash when selecting pure black in the color picker when the recent colors list isn't full
Originally committed to SVN as r6534.
2012-03-07 01:31:04 +00:00
Thomas Goyne 110c2358a6 Use validators for reading values from all lua controls
Fixes some issues with control values not being read back correctly.

Originally committed to SVN as r6533.
2012-03-07 01:30:52 +00:00
Niels Martin Hansen 95fe56d41b Fix compilation with dummy font file lister (i.e. without FT2/FC.)
Originally committed to SVN as r6532.
2012-03-03 01:51:14 +00:00
Niels Martin Hansen 2ddde60efd Stop MSBuild warning about two different specifications of output file name for executables being different.
This prevented the VS debugger from launching properly.

Originally committed to SVN as r6531.
2012-03-03 01:49:42 +00:00
Thomas Goyne d9c0f79910 Add wxwin.m4 to m4macros as it changes very rarely and people are terrible at setting their aclocal paths correctly
Originally committed to SVN as r6527.
2012-02-29 01:24:24 +00:00
Thomas Goyne af58db5b9e Fix reindexing of files on every open
FFMS_IndexBelongsToFile returns 0 when the index belongs to the file,
not 1.

Originally committed to SVN as r6526.
2012-02-29 01:24:16 +00:00
Thomas Goyne d53bb22d2b Split the "am/manager" command into several subcommands so that it can be hotkeyed usefully
Originally committed to SVN as r6525.
2012-02-29 01:24:04 +00:00
Thomas Goyne b9fc28b44d Implement min, max and step for floatedit in lua dialogs
Originally committed to SVN as r6524.
2012-02-28 01:23:24 +00:00
Thomas Goyne 27144a7ef7 Fix min/max for lua intedit controls
Originally committed to SVN as r6523.
2012-02-28 01:23:15 +00:00
Thomas Goyne 24fbf25882 Fix duplication of source syllables when linking in the kanji timer
Originally committed to SVN as r6522.
2012-02-28 01:23:07 +00:00
Thomas Goyne 0d703cff69 Don't save empty hotkeys
Originally committed to SVN as r6521.
2012-02-28 01:22:58 +00:00
Thomas Goyne 95a1e187a0 Combine the Subtitles and Interface pages of the preferences dialog as they both have subs edit box and subs grid options
Originally committed to SVN as r6520.
2012-02-28 01:22:49 +00:00
Thomas Goyne 70261b6466 Disable the controls for mutally exclusive and unused options in the preferences dialog
Originally committed to SVN as r6519.
2012-02-28 01:22:40 +00:00
Thomas Goyne c4cba875b4 Always index all tracks when "Video/Open Audio" is enabled, as it'll always double-index otherwise
Originally committed to SVN as r6518.
2012-02-28 01:22:29 +00:00
Thomas Goyne 93d3895a2a Include font_file_lister.h in font_file_lister.cpp, not font_file_lister_fontconfig.h
Originally committed to SVN as r6517.
2012-02-25 02:58:23 +00:00
Thomas Goyne d942663316 Remove the "Link commiting of times" option
It doesn't actually do anything anymore due to that changed to the time
boxes are committed automatically.

Originally committed to SVN as r6516.
2012-02-25 02:58:14 +00:00
Thomas Goyne 451b262672 Increment iterators before erasing them rather than after
Originally committed to SVN as r6515.
2012-02-25 02:58:04 +00:00
Niels Martin Hansen 45da185a43 A bunch of fixes to the MSBuild projects.
Originally committed to SVN as r6514.
2012-02-24 22:48:52 +00:00
Thomas Goyne 5fd05762bd Remove all references to QuickTime, as the QuickTime provider is long gone
Originally committed to SVN as r6513.
2012-02-23 19:28:29 +00:00
Thomas Goyne 5f82f5b2d7 OS X compilation fixes
Originally committed to SVN as r6512.
2012-02-23 19:28:19 +00:00
Thomas Goyne 45dbc8bd15 Fix checks for which OpenGL headers to include on OS X
Originally committed to SVN as r6511.
2012-02-23 19:28:08 +00:00
Thomas Goyne 0d45f98ae8 Cast time_ts passed to printf to a known type
Originally committed to SVN as r6510.
2012-02-23 19:28:00 +00:00
Thomas Goyne 9e6d782339 Remove invalid spaces in the OSX link command
Originally committed to SVN as r6509.
2012-02-23 19:27:51 +00:00
Thomas Goyne 6cf122dea2 Remove the time_t overload of UnknownElement and just cast to int64_t
Originally committed to SVN as r6508.
2012-02-23 19:27:42 +00:00
Thomas Goyne f54d381f94 Don't skip the OS X OpenGL check when X is detected
Originally committed to SVN as r6507.
2012-02-23 19:27:32 +00:00
Thomas Goyne ea130d9af2 Automatically set the aspect ratio when opening anamorphic video with ffms
Originally committed to SVN as r6506.
2012-02-23 01:30:59 +00:00
Thomas Goyne 7e87e95526 Send text updated events when pasting into time edits
Originally committed to SVN as r6505.
2012-02-23 00:46:33 +00:00
Thomas Goyne 7992009392 Treat an unclosed override block as plain text in the syntax highlighter to match vsfilter
Originally committed to SVN as r6504.
2012-02-22 22:36:55 +00:00
Thomas Goyne 7e9608cf7a Adjust syntax highlighting of template lines to match how karaoke templater parses the line
Originally committed to SVN as r6503.
2012-02-22 22:36:45 +00:00
Thomas Goyne d5577b994c Move lead in/out logic to the timing controllers
This makes adding lead in/out work correctly when autocommit is
disabled, and improves the behavior of adding lead-in when in karaoke
mode.

Originally committed to SVN as r6502.
2012-02-22 22:00:54 +00:00
Thomas Goyne c4daf860e5 Add a lua module for reading from/writing to the clipboard
Originally committed to SVN as r6501.
2012-02-22 20:47:34 +00:00
Thomas Goyne 74fcf68fe2 Improve the error message when autoload scripts fail to load
Remove a reference to errors "above" as the message appears both above
and below the actual errors.

Shorten the message a bit to reduce the chance of it getting truncated
by wx.

Fix the name of the button in the automation manager dialog.

Originally committed to SVN as r6500.
2012-02-22 20:47:24 +00:00
Thomas Goyne b59b3c56fc Add lua bindings for open and save standard dialogs
Originally committed to SVN as r6499.
2012-02-22 04:17:16 +00:00
Thomas Goyne 048fc44cfa Add aegisub.file_name() to get the file name of the subtitles file
If called during a macro processing or validation function when the
subtitles have a valid file name (i.e. they've been saved and are not
Untitled), this returns the name of the file, without the path. If
called at any other time, it returns nil.

Originally committed to SVN as r6498.
2012-02-21 23:32:58 +00:00
Thomas Goyne 2dd01747f8 Fix crash on underrun in the alsa player
Originally committed to SVN as r6497.
2012-02-20 18:22:43 +00:00
Thomas Goyne fb6d3daf8b Eliminate all uses of volatile in the alsa player and just lock reads instead
Originally committed to SVN as r6496.
2012-02-20 18:22:37 +00:00
Thomas Goyne df73e15f0f Include C++ versions of C headers rather than the C versions
Originally committed to SVN as r6495.
2012-02-20 18:22:31 +00:00
Thomas Goyne 3fdb50925e Explicitly flag the precompiled header as a C++ header to silence a clang warning
Originally committed to SVN as r6494.
2012-02-20 18:22:25 +00:00
Thomas Goyne f79e933ac9 Bump required version of ffms2 to 2.16
Originally committed to SVN as r6493.
2012-02-20 18:22:20 +00:00
Thomas Goyne 17b0d83831 Use scoped_holder in a handful of places
Originally committed to SVN as r6492.
2012-02-20 18:22:12 +00:00
Thomas Goyne b9ddf00ead Add a scoped holder similar to scoped_ptr for handles that may or may not be pointers
Originally committed to SVN as r6491.
2012-02-20 18:22:04 +00:00
Thomas Goyne ad7d7c2be3 Don't return a dummy icon when no icon is found for a command
The hotkey editor initially required this, but now that we've using
fully custom renderers they're no longer needed, and the blank icons
didn't work correctly on wxGTK.

Originally committed to SVN as r6490.
2012-02-20 05:41:54 +00:00
Thomas Goyne 113c85bda0 Fix crash on aegisub.log(0, nil)
Originally committed to SVN as r6489.
2012-02-20 05:15:18 +00:00
Thomas Goyne 53c2c8821b Redesign BlockCache's age tracking to run in constant time
Speeds up spectrum painting by 40-90% depending on how much of the audio
data is being read from the cache.

Originally committed to SVN as r6488.
2012-02-20 05:15:10 +00:00
Thomas Goyne ffa7e70f5c Fix compilation on 64-bit linux with clang
Originally committed to SVN as r6487.
2012-02-20 05:15:00 +00:00
Thomas Goyne 8e0f6c8d25 Add KP_Enter to the default hotkeys for commit in the translation assistant and styling assistant. Closes #1414.
Originally committed to SVN as r6486.
2012-02-18 00:41:18 +00:00
Thomas Goyne 7f513e675d Replace newlines with \N when modifying text via the translation assistant. Updates #1414.
Originally committed to SVN as r6485.
2012-02-18 00:41:08 +00:00
Thomas Goyne b1930f06e5 Actually set the volume/audio zoom to the saved values rather than just setting the slider positions
Originally committed to SVN as r6484.
2012-02-18 00:40:58 +00:00
Thomas Goyne 72ee3efdc3 Rename the audio rendering style enum values to reflect how they're actually used
Originally committed to SVN as r6483.
2012-02-17 00:14:45 +00:00
Thomas Goyne 57b6a1f03a Remove the nonfunctional Restore Defaults button from the preferences dialog
Originally committed to SVN as r6482.
2012-02-17 00:14:35 +00:00
Thomas Goyne 46254613c8 Batch up log messages in DialogProgress and append them in OnIdle
This signficantly improves performance with spammy automation macros
(karaoke templater with the log level set to Trace is 10-15x faster),
and helps ensure that clicks on the Cancel button are actually processed
in a timely manner.

Originally committed to SVN as r6481.
2012-02-16 21:22:04 +00:00
Thomas Goyne a3ef701f17 Add a [Script Info] section in SetScriptInfo if none exists
Originally committed to SVN as r6480.
2012-02-16 21:21:55 +00:00
Thomas Goyne e5e2b84b15 Ensure that loaded files always have a style and dialogue line
Fixes crashes and general brokenness when opening invalid files.

Originally committed to SVN as r6479.
2012-02-16 21:21:35 +00:00
Thomas Goyne fc64bcaa36 Don't normalize syllable durations when parsing karaoke for automation
Originally committed to SVN as r6478.
2012-02-16 05:21:00 +00:00
Thomas Goyne 6339df3521 Correct the calculation for the position of right-aligned lines in the visual tools
Originally committed to SVN as r6477.
2012-02-16 03:52:50 +00:00
Thomas Goyne 9b69ce7a27 Add support for noncontiguous selections to the duplicate lines commands
Originally committed to SVN as r6476.
2012-02-15 22:14:10 +00:00
Thomas Goyne d4e1c90a04 Force a repaint of the window after opening files from the command line. Closes #1419.
Originally committed to SVN as r6475.
2012-02-15 21:24:00 +00:00
Thomas Goyne a2872158a9 Remember the last used audio zoom and volume and restore it
Originally committed to SVN as r6474.
2012-02-15 21:23:52 +00:00
Thomas Goyne 5bf7342019 Add a Lua binding for wxRegEx
Lua's built in regular expression engine is rather limited in features
compared to wx's, and operates on bytes rather than characters due to
not being unicode-aware.

Originally committed to SVN as r6473.
2012-02-15 21:23:42 +00:00
Thomas Goyne 1c2fb01f0a Copy the cached entry data in AssStyle's operator=. Closes #1453.
Originally committed to SVN as r6472.
2012-02-14 00:35:41 +00:00
Thomas Goyne 17b293865b Override CanWriteFile in the Encore subtitle format as the default extension check doesn't work for the weird filename format
Originally committed to SVN as r6471.
2012-02-14 00:35:33 +00:00
Thomas Goyne 3252503eaa Check for updates after loading files passed on the command line as the update checker dialog interacts poorly with the loading modal dialogs
Originally committed to SVN as r6470.
2012-02-14 00:35:25 +00:00
Thomas Goyne 105a6bd68a Force Encore subtitles to UTF-8 as Encore doesn't like non-unicode encodings
Originally committed to SVN as r6469.
2012-02-14 00:35:16 +00:00
Thomas Goyne fae7261bd0 Make AssTime::ParseASS a constructor overload instead
Originally committed to SVN as r6468.
2012-02-14 00:35:06 +00:00
Thomas Goyne 26b7970ed0 Add missing milliseconds to samples conversion that resulted in audio playback stopping when the start or end time of the line was changed
Originally committed to SVN as r6467.
2012-02-12 04:16:21 +00:00
Thomas Goyne 437cd47cd3 Don't block editing storage styles with the same name as a style on the current script
Originally committed to SVN as r6466.
2012-02-12 04:16:14 +00:00
Thomas Goyne 952bc02c07 Enable lua stack checking in debug builds
Originally committed to SVN as r6465.
2012-02-10 02:16:49 +00:00
Thomas Goyne 3fd457ac68 Fix memory corruption after automation macro errors
Originally committed to SVN as r6464.
2012-02-10 01:41:22 +00:00
Thomas Goyne fbc93bb98a Fix non-precomp header compilation
Originally committed to SVN as r6463.
2012-02-10 00:04:42 +00:00
Thomas Goyne 30e1679a78 Create a new line when committing the last line via the audio display when Next Line on Commit is enabled, as in 2.1.x
Originally committed to SVN as r6462.
2012-02-10 00:04:34 +00:00
Thomas Goyne 47cf5c8629 Support dragging multiple markers at once in the dialogue timing controller
When ctrl is held down and the user clicks on one of the active line's
markers, all markers at the same position as the clicked marker (for
both active and inactive lines) are now moved along with the clicked
marker.

Closes #20.

Originally committed to SVN as r6461.
2012-02-10 00:04:24 +00:00
Thomas Goyne 32c8cc0974 Modify the TimingController interface to support dragging more than one marker at once. Updates #20.
Originally committed to SVN as r6460.
2012-02-10 00:04:13 +00:00
Thomas Goyne 51a3831794 Remove charset detection from AssFile::Load
All of the subtitle formats also already do charset detection when
needed, so doing it in it AssFile::Load is pointless and results in
performing the auto-detection even when it's pointless (because the
format isn't text-based or always uses a single encoding).

Originally committed to SVN as r6459.
2012-02-10 00:04:05 +00:00
Thomas Goyne e20bc09052 colorspace.(cpp|h) cosmetics
Originally committed to SVN as r6458.
2012-02-10 00:03:56 +00:00
Thomas Goyne 16627dbfe7 Clean up DialogVersionCheck a bit
Originally committed to SVN as r6457.
2012-02-10 00:03:46 +00:00
Thomas Goyne de7df882e9 Seek audio to the line on double-click in the grid in addition to video
Originally committed to SVN as r6456.
2012-02-07 23:17:26 +00:00
Thomas Goyne 07327c2b65 Add position information to the error message when aegisub.log is called with bad arguments
Originally committed to SVN as r6455.
2012-02-07 23:17:06 +00:00
Thomas Goyne 003322813e Clean up VideoProviderCache a bit
Originally committed to SVN as r6454.
2012-02-07 23:16:41 +00:00
Thomas Goyne 1075b71976 Prompt to update uses of the style when "Default" is renamed
As far as I can tell, Default was only excluded to avoid prompting when
creating a new style, but whether or not a style is new is now an
explicit parameter to the editor so it's unneeded.

Originally committed to SVN as r6453.
2012-02-07 20:42:44 +00:00
Thomas Goyne fcffb010b9 Fix check for \i?clip in cleantags. Updates #1450.
Originally committed to SVN as r6452.
2012-02-07 01:23:00 +00:00
Thomas Goyne 26f3bb26ba Remove some incorrect uses of ellipses
Ellipses are used to indicate that a command will require additional
input from the user, not that a dialog will be opened.

Originally committed to SVN as r6451.
2012-02-07 01:22:50 +00:00
Thomas Goyne b262a07180 Don't mark paths as translatable
Originally committed to SVN as r6450.
2012-02-07 01:22:42 +00:00
Thomas Goyne 5e96d6e8c3 Remove periods from single-sentence tooltips
Originally committed to SVN as r6449.
2012-02-07 01:22:32 +00:00
Thomas Goyne 38c905d32a Call Validate before invoking commands via hotkeys
Originally committed to SVN as r6448.
2012-02-07 01:22:23 +00:00
Thomas Goyne 51cbc353b3 Fix crashes after reloading automation scripts
Originally committed to SVN as r6447.
2012-02-07 01:22:15 +00:00
Thomas Goyne 489d5bbec6 Ignore the Maximize option for dialogs which aren't supposed to be maximizable. Closes #1451.
Originally committed to SVN as r6446.
2012-02-07 01:22:06 +00:00
Thomas Goyne 813f23e762 Check whether the dialog is maximized rather than whether it's not iconized in PersistLocation. Updates #1451.
Originally committed to SVN as r6445.
2012-02-07 01:21:56 +00:00
Thomas Goyne 5a53aa5511 Delete aegisub.h. It's been a few years since it last had anything in it.
Originally committed to SVN as r6444.
2012-02-07 01:21:47 +00:00
Thomas Goyne 68c9989c89 Clean up DummyVideoProvider a bit
Originally committed to SVN as r6443.
2012-02-07 01:21:37 +00:00
Thomas Goyne f48ccc0640 Make the version check dialog a bit wider
Originally committed to SVN as r6442.
2012-02-03 00:54:09 +00:00
Thomas Goyne bd38cfc305 Only age the renderer caches when a new block is created
Originally committed to SVN as r6441.
2012-02-02 22:58:15 +00:00
Thomas Goyne fc932dddc7 Convert BlockCache from LFU to LRU
In practice there were usually <10 calls to Get per call to Age,
resulting in everything but the most recently used block having an
access count of 0. This resulted in it having essentially random
eviction, which worked decently due to the size of the cache, but with a
significant speed overhead for the LFU tracking.

Originally committed to SVN as r6440.
2012-02-02 22:58:06 +00:00
Thomas Goyne 7ca0ad3233 Repaint the entire audio display when style ranges change
In practice, painting audio from the cache isn't all that expensive, so
the limited refreshing was just introducing places for bugs without
improving performance all that much.

Closes #1432.

Originally committed to SVN as r6439.
2012-02-02 22:57:53 +00:00
Thomas Goyne ddc8dc9eca Only wrap the avisynth-using part of AvisynthVideoProvider's constructor with try/catch so that avisynth is still initialized when the catch handler runs, which is required to actually get an error message. Closes #1444.
Originally committed to SVN as r6438.
2012-02-02 20:51:07 +00:00
Thomas Goyne c5c829357d Use wxAutoBufferedPaintDC for ToggleButton
Originally committed to SVN as r6437.
2012-02-02 20:50:56 +00:00
Thomas Goyne bd7f338115 Don't copy fonts which appear in styles but are never actually used
Originally committed to SVN as r6436.
2012-02-02 19:31:37 +00:00
Thomas Goyne da61e75f75 Skip inline comments when gathering things to collect fonts for
Originally committed to SVN as r6435.
2012-02-02 19:31:27 +00:00
Thomas Goyne 6652ef40e9 Increase the amount of information reported when fonts can't be found
List the styles using the font along with lines which use the font via
overrides, and add a warning at the end when some glyphs could not be
found to reduce the chance of the user failing to notice it.

Originally committed to SVN as r6434.
2012-02-02 19:18:40 +00:00
Thomas Goyne 6c365f0e6a Remove VideoProvider::GetPosition, as it's unused and unneeded
Originally committed to SVN as r6433.
2012-02-02 19:18:30 +00:00
Thomas Goyne 6717334c12 Fix crash when trying to seek to keyframes via the video slider with no keyframes loaded, and use wxAutoBufferedPaintDC rather than manual double-buffering
Originally committed to SVN as r6432.
2012-02-02 19:18:21 +00:00
Thomas Goyne b8a7c6cb1e Remove scoped_ptr::swap
Originally committed to SVN as r6431.
2012-02-02 19:18:10 +00:00
Thomas Goyne d68a7e81b0 Add (optional) overlapping line correction to the timing postprocessor
Trying to use this at the same time as adding lead in/out will probably
not have useful results.

Originally committed to SVN as r6430.
2012-02-01 23:59:40 +00:00
Thomas Goyne eebcf34edb Don't decode audio URIs stored on the script as it currently always stores the absolute path and the decoding breaks dummy audio URIs
Originally committed to SVN as r6429.
2012-02-01 23:59:32 +00:00
Thomas Goyne 3d6e5e7d39 Fix incorrect styling of overlapping inactive lines
Originally committed to SVN as r6428.
2012-02-01 23:59:23 +00:00
Thomas Goyne aaf7285a6e Remove UI-related responsibilities from AudioController
Keeping track of audio markers and labels to be shown in the audio
display is not particularly related to AudioController's primary
responsiblity of controlling the playback of audio.

Originally committed to SVN as r6427.
2012-02-01 23:59:12 +00:00
Thomas Goyne 01b92aa4e3 Change AudioController's public API from samples to milliseconds
The sample rate of the currently open audio is not something that things
which do not interact with the raw audio data should have to care about,
or even know about.

Originally committed to SVN as r6426.
2012-02-01 23:58:58 +00:00
Thomas Goyne bba825ed0d Clear the error color when an automation script which previously failed to load loads successfully
Originally committed to SVN as r6425.
2012-02-01 18:47:47 +00:00
Thomas Goyne 9dbfe5d8e5 Update the visual tool buttons when the active tool is changed via hotkey
Originally committed to SVN as r6424.
2012-02-01 18:47:37 +00:00
Thomas Goyne 4ea45627b5 Remove periods from the end of help strings
Originally committed to SVN as r6423.
2012-02-01 18:47:26 +00:00
Thomas Goyne 2dcd4ff2a6 Mark the style name collision messages as translatable
Originally committed to SVN as r6422.
2012-02-01 18:47:18 +00:00
Thomas Goyne 439b1272b0 Select current style when the style manager is opened
Originally committed to SVN as r6421.
2012-02-01 18:47:10 +00:00
Thomas Goyne f0933ecb1a When adding new hotkeys, automatically select and start editing the new hotkey
Originally committed to SVN as r6420.
2012-02-01 18:47:00 +00:00
Thomas Goyne 499a9b2869 Set thread priorty between Create() and Run()
Originally committed to SVN as r6419.
2012-02-01 14:23:52 +00:00
Thomas Goyne fbe00eabe8 Bump up the size of the log window in the font collector dialog so that it can actually fit font names without wrapping
Originally committed to SVN as r6418.
2012-02-01 04:17:39 +00:00
Thomas Goyne db7924d646 Add a warning in the fontconfig font collector when the chosen font does not have glyphs for some of the characters used in that font
Originally committed to SVN as r6417.
2012-02-01 04:17:33 +00:00
Thomas Goyne 98b51e2c23 Clean up DialogStyleManager a bit, eliminating a decent amount of duplicated code and fixing issues with the logic for enabling and disabling the buttons.
Originally committed to SVN as r6416.
2012-02-01 00:48:50 +00:00
Thomas Goyne c6ac746215 Kill DialogStyleManager::OnClose as it just does the default thing
Originally committed to SVN as r6415.
2012-02-01 00:48:42 +00:00
Thomas Goyne b48436c5de Skip unprocessed key events in the style manager
Originally committed to SVN as r6414.
2012-02-01 00:48:33 +00:00
Thomas Goyne 3be4693480 Uncrustify AssStyleStorage a bit
Originally committed to SVN as r6413.
2012-02-01 00:48:24 +00:00
Thomas Goyne ac5af24014 Remove pointless #ifdef __APPLE__ around CmdDown()
The entire point of CmdDown is that it calls ControlDown on non-OS X, so
the ifdefs are completely pointless.

Originally committed to SVN as r6412.
2012-02-01 00:48:16 +00:00
Thomas Goyne 7bd0691bd7 In PersistLocation get the new location of the dialog directly from the dialog rather than from the event as the data in the event is wrong
Originally committed to SVN as r6411.
2012-02-01 00:48:07 +00:00
Thomas Goyne 04cc422391 Close the spell checker after all lines have been checked rather than only once there are no errors remaining. Closes #1442.
Originally committed to SVN as r6410.
2012-02-01 00:47:57 +00:00
Thomas Goyne 3af57cdbcd Copy the source line's group in AssDialogue's copy constructor as copying wxStrings is far faster than constructing new ones
Originally committed to SVN as r6409.
2012-02-01 00:47:49 +00:00
Thomas Goyne a7d54f3d69 Make AssEntry::group const as it really should never change
Originally committed to SVN as r6408.
2012-02-01 00:47:38 +00:00
Thomas Goyne 8bef1eb874 Destruct AssFiles on a background thread as it's rather slow with large files
Originally committed to SVN as r6407.
2012-02-01 00:47:28 +00:00
Thomas Goyne 64553dd633 Handle commands which change types at runtime. Closes #1413.
Originally committed to SVN as r6406.
2012-01-31 04:04:02 +00:00
Thomas Goyne 983ffc1e83 Add some dumb heuristics to detect binary files in the charset detector to avoid taking forever feeding hundreds of MB through it. Closes #1438.
Originally committed to SVN as r6405.
2012-01-31 04:03:55 +00:00
Thomas Goyne d68a395499 Open files in binary mode for charset detection
Originally committed to SVN as r6404.
2012-01-31 04:03:50 +00:00
Thomas Goyne fc96f1bd28 Swallow cancel exceptions thrown from opening audio from the script so that unrelated things aren't canceled
Originally committed to SVN as r6403.
2012-01-31 04:03:44 +00:00
Thomas Goyne f774f21903 Explicitly do nothing when an empty container is passed to delete_clear as it's oddly slow otherwise
Originally committed to SVN as r6402.
2012-01-31 00:44:55 +00:00
Thomas Goyne c2d3c910c7 Replace some uses of "" with wxString()
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.
2012-01-31 00:44:43 +00:00
Thomas Goyne 3b0d2ae8e6 Add effect and actor to the things that lines can be sorted by
Originally committed to SVN as r6400.
2012-01-31 00:44:34 +00:00
Thomas Goyne a114238396 Use AssTime::GetASSFormated for the video position display
Originally committed to SVN as r6399.
2012-01-31 00:44:26 +00:00
Thomas Goyne 725820efc0 Add support for setting the active line from automation macros
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.
2012-01-31 00:44:16 +00:00
Thomas Goyne dad803e956 Set the start and end times of syllables relative to the line's start time rather than time 0 to match 2.1.x's behavior. Closes #1440.
Originally committed to SVN as r6397.
2012-01-31 00:44:07 +00:00
Thomas Goyne 4c4ea92d0f Update all spellcheckers after adding a word
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.
2012-01-31 00:43:59 +00:00
Thomas Goyne 57fc4145d9 Always use the same language for all spellchecker instances as having different languages in different places is weird
Originally committed to SVN as r6395.
2012-01-31 00:43:49 +00:00
Thomas Goyne e205f9d51b Make the 'Add to dictionary' button in the spellchecker dialog actually do something. Closes #1441.
Originally committed to SVN as r6394.
2012-01-31 00:43:40 +00:00
Thomas Goyne aa49a4eb0f Factor out the options lookups from BaseGrid::GetRowStrings so that they aren't pointlessly checked every row
Originally committed to SVN as r6393.
2012-01-31 00:43:32 +00:00
Thomas Goyne 1af19fb42e Make AssTime::GetASSFormated roughly an order of magnitude faster
Originally committed to SVN as r6392.
2012-01-31 00:43:23 +00:00
Thomas Goyne 0c972886fb Cache most of the brushes used in grid painting
Originally committed to SVN as r6391.
2012-01-31 00:43:15 +00:00
Thomas Goyne cf1425f9d1 Don't get the strings for hidden columns when painting the grid. Speeds up grid painting by up to 25%.
Originally committed to SVN as r6390.
2012-01-31 00:43:06 +00:00
Thomas Goyne b34d2c547f Use wxAutoBufferedPaintDC rather than manual double-buffering in BaseGrid, as it's simpler and slightly faster
Originally committed to SVN as r6389.
2012-01-31 00:42:58 +00:00
Thomas Goyne e5f1719d8f Use DC clipping in AudioRenderer rather than wxMemoryDC + Blit
In addition to being far simpler, this is marginally faster as
wxMemoryDC has a decent amount of overhead.

Originally committed to SVN as r6388.
2012-01-31 00:42:47 +00:00
Thomas Goyne 0bff490b7e Enable/disable the OK button in the TPP dialog when styles are (un)checked
Originally committed to SVN as r6387.
2012-01-27 23:35:31 +00:00
Thomas Goyne 049c730813 Fix handling of autosave and autobackup paths that don't end in a slash
Originally committed to SVN as r6386.
2012-01-27 21:32:48 +00:00
Thomas Goyne e258e8c25f Fix crash on empty lines in karaoke mode
Originally committed to SVN as r6385.
2012-01-27 20:04:31 +00:00
Thomas Goyne 9e3f280cda Fix bug where opening audio with audio already open would resize the audio display
Originally committed to SVN as r6384.
2012-01-27 20:04:22 +00:00
Thomas Goyne ef4c1b369d Adjust the label for the history box in the shift times dialog to suggest that old shifts can now be loaded
Originally committed to SVN as r6383.
2012-01-27 20:04:14 +00:00
Thomas Goyne 642a9df2bf Correct the tooltip for 'Shift to Current Frame'
Originally committed to SVN as r6382.
2012-01-27 20:04:05 +00:00
Thomas Goyne 78f1198426 Fix error when adding a word to the dictionary when the user dictionary file doesn't already exist
Originally committed to SVN as r6381.
2012-01-27 20:03:55 +00:00
Thomas Goyne bc9c521cfd Apply the 'Subs Edit Box' hotkey handling to all of the text boxes in the subs edit area rather than just the main text edit. Closes #1431.
Originally committed to SVN as r6380.
2012-01-27 19:23:35 +00:00
Thomas Goyne 0dc0135f9a Select the appropriate entry in the zoom dropdown when the zoom is changed externally so that keyboard navigation works. Updates #1433.
Originally committed to SVN as r6379.
2012-01-27 19:23:26 +00:00
Thomas Goyne 2d5df24fd6 Update the zoom on Enter in the zoom box. Updates #1433.
Originally committed to SVN as r6378.
2012-01-27 19:23:16 +00:00
Thomas Goyne 772c8dee3b Fix accelerator conflict between Redo and Find and Replace
Originally committed to SVN as r6377.
2012-01-27 19:23:07 +00:00
Thomas Goyne 16db1eb4dd Add more menu accelerators and fix a conflict between View and Video. Patch by catntabile. Closes #1434.
Originally committed to SVN as r6376.
2012-01-27 19:22:57 +00:00
Thomas Goyne d01c0cf501 Fix crash when drawing a vector clip that does not start with a move. Closes #1430.
Originally committed to SVN as r6375.
2012-01-27 19:22:46 +00:00
Thomas Goyne 4746ae8a1d Really unhardcode the Paste Over dialog's height rather than just the width
Originally committed to SVN as r6374.
2012-01-26 23:23:41 +00:00
Thomas Goyne a54983a9bc Fix a few minor issues with the Paste Over dialog
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.
2012-01-26 23:21:19 +00:00
Thomas Goyne 8c246e1cb8 Make shift-scrollwheel scroll the grid a page at a time. Closes #1407.
Originally committed to SVN as r6372.
2012-01-26 22:46:09 +00:00
Thomas Goyne 6d550b4a5d Repaint the entire grid on timing changes
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.
2012-01-26 22:27:57 +00:00
Thomas Goyne a1ad0fa585 Use Scintilla's logic for deciding when to coalesce edit box changes
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.
2012-01-26 22:13:39 +00:00
Thomas Goyne d55f1622f1 Fix backwards-compatibilty break in the lua karaoke parser
Insert an empty syllable at the beginning of the karaoke syllable table
to better mimick 2.1.x's behavior.

Originally committed to SVN as r6369.
2012-01-26 21:19:25 +00:00
Thomas Goyne 0aec0a9d59 Add an option to skip over commented lines in the spell checker. Closes #1428.
Originally committed to SVN as r6368.
2012-01-26 20:51:08 +00:00
Thomas Goyne 92ae4a616e Fix truncation of all float fields in styles
Originally committed to SVN as r6367.
2012-01-26 20:17:31 +00:00
Thomas Goyne 99a7eece9c Significantly speed up duplicating multiple lines
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.
2012-01-26 20:08:54 +00:00
Thomas Goyne 15a4eca7ce Fix crash on (auto)save when using CSRI and video is open
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.
2012-01-26 20:08:38 +00:00
Thomas Goyne d001d66b12 Add support for the scale parameter of vector clips. Closes #1415.
Originally committed to SVN as r6364.
2012-01-26 00:29:08 +00:00
Thomas Goyne 214079af58 Load Shift Times settings from history on double-click
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.
2012-01-25 23:09:45 +00:00
Thomas Goyne 2094814077 Save the current row and scroll position in the file and restore it when the file is reopened. Closes #1417.
Originally committed to SVN as r6362.
2012-01-25 19:07:36 +00:00
Thomas Goyne 71a4e38c7d Fix over-escaping that resulted in Recombine Lines stripping 't' rather than tabs. Closes #1418.
Originally committed to SVN as r6361.
2012-01-25 19:07:27 +00:00
Thomas Goyne a4eb7ef528 Fix crash with empty hotkeys. Closes #1420.
Originally committed to SVN as r6360.
2012-01-25 19:07:18 +00:00
Thomas Goyne e9dcbf66f3 Fix compilation errors when wxUSE_ON_FATAL_EXCEPTION is not enabled. Updates #1423.
Originally committed to SVN as r6359.
2012-01-25 19:07:07 +00:00
Thomas Goyne d798d69849 Enable the dummy audio provider in release builds. Closes #1425.
Originally committed to SVN as r6358.
2012-01-25 19:06:56 +00:00
Thomas Goyne e7307d249e Fix odd behavior when switching active lines with the Effect or Actor boxes focused
Originally committed to SVN as r6357.
2012-01-25 05:49:00 +00:00
Thomas Goyne f8c27feedb Skip unprocessed key events. Updates #1408.
Originally committed to SVN as r6356.
2012-01-25 05:48:53 +00:00
Thomas Goyne 26c3e13340 Fix poor synchronization between mouse and keyboard modifications to the selection
Combining Shift+Up/Down (or Home/End or Page Up/Page Down) with
shift-clicking had very odd results due to that they used separate
variables to decide where to extend from (and even when only one was
used they were handled incorrectly in some cases).

Closes #1311.

Originally committed to SVN as r6355.
2012-01-25 04:59:17 +00:00
Thomas Goyne e6d86a1af4 Don't remove audio files from the recently used files list when loading is cancelled
Originally committed to SVN as r6354.
2012-01-25 04:59:11 +00:00
Thomas Goyne bce29f5a9a Fix bug where "Play current line" would not stop at the end of the line if video was already playing
Originally committed to SVN as r6353.
2012-01-25 00:40:21 +00:00
Thomas Goyne a24f1692be Let macros update their help string from the validate function
If the second return value from the validate function exists and is a
non-empty string, replace the macro's help text with that string.

Revert r6327, as this is a better solution to the same problem.

Closes #1413.

Originally committed to SVN as r6352.
2012-01-25 00:21:37 +00:00
Thomas Goyne 3140d902da Report the endianness of detected UTF-16 and UTF-32
'UTF-16' is big-endian UTF-16, so returning it for UTF-16LE is incorrect
and results in line_iterator failing on UTF-16LE.

Originally committed to SVN as r6351.
2012-01-25 00:21:27 +00:00
Thomas Goyne 1034d16e4b Auto-apply AssFixStylesFilter when sending subtitles to the renderer
Originally committed to SVN as r6350.
2012-01-24 01:46:29 +00:00
Thomas Goyne 1c14740d51 Fix check for 'start after' and 'end after' keyframe snapping in the TPP
Originally committed to SVN as r6349.
2012-01-24 01:28:26 +00:00
Thomas Goyne df9f46b49c Actually read the values from the TPP dialog before applying processing
Originally committed to SVN as r6348.
2012-01-23 23:53:26 +00:00
Thomas Goyne 3b5bc88285 Write the video's colorspace to the script info section
Originally committed to SVN as r6347.
2012-01-23 23:07:35 +00:00
Thomas Goyne f2aadc7439 Add automatic host API selection to the portaudio player
Portaudio defaults to using the most stable widely available host API,
rather than the highest performance or quality, and as a result the
default host API on windows (MME) is really quite bad. As such, add
logic to select the best host API for the selected output device.

Closes #1375.

Originally committed to SVN as r6346.
2012-01-23 21:14:32 +00:00
Thomas Goyne e6252ae11b Fix adding lead in/out in the timing postprocessor
The wrong set of lines were being checked for overlaps resulting in
completely broken results.

Originally committed to SVN as r6345.
2012-01-23 21:01:57 +00:00
Thomas Goyne 2d3e505193 Port 2.1.9's installer scripts to 3.0.0
The upgrade installer still needs some updating as it only supports
upgrading from 2.1.8

Originally committed to SVN as r6344.
2012-01-23 19:09:14 +00:00
Thomas Goyne 0b7d018287 Delete the unused preferences dialog pages
Originally committed to SVN as r6343.
2012-01-23 19:02:25 +00:00
Thomas Goyne 8eaf4a6a8e Add most of the remaining "hidden" options to the preferences dialog. Closes #1022.
Originally committed to SVN as r6342.
2012-01-23 19:02:15 +00:00
Thomas Goyne 2e37ba8246 Remove redundant OSS device option
Originally committed to SVN as r6341.
2012-01-23 19:02:05 +00:00
Thomas Goyne 1f8005d8d1 Add option to hide the main toolbar. Updates #1399.
Originally committed to SVN as r6340.
2012-01-22 23:44:24 +00:00
Thomas Goyne c8099decf3 Fix infinite loop in ALSA player when playing zero-length audio
Updates #1394.

Originally committed to SVN as r6339.
2012-01-22 18:18:07 +00:00
Thomas Goyne e026d2a60a Fix copy/paste error that made the end time and duration boxes not work
Originally committed to SVN as r6338.
2012-01-22 18:18:00 +00:00
Thomas Goyne 0287edaa33 Suppress creation of multiple separators in a row in toolbars
If an entire group of commands in a toolbar is missing (such as with
AssDraw on non-windows), the duplicate separator should go as well to
avoid ugliness. A better solution here would be platform-specific
default toolbars, which should probably be done as part of #495.

Closes #1398.

Originally committed to SVN as r6337.
2012-01-22 17:15:36 +00:00
Thomas Goyne 7da57b38dc Bind wxEVT_LEAVE_WINDOW in AudioDisplay so the track cursor actually gets removed when the mouse leaves the display
Originally committed to SVN as r6336.
2012-01-22 17:15:31 +00:00
Thomas Goyne c0b599fbae Only play audio on next/prev line in karaoke mode
Originally committed to SVN as r6335.
2012-01-22 17:15:25 +00:00
Thomas Goyne e10055cb59 Don't try to create an OpenGL context until video is loaded
Creating it during startup triggers a few valgrind errors in vbox's gl
driver that may or may not matter.

Originally committed to SVN as r6334.
2012-01-22 05:59:43 +00:00
Thomas Goyne 6c879c12f1 Move the visual tool submode buttons to the main visual tool toolbar
Creating an entire toolbar for one button in the drag mode is a
pointless waste of space and source of ugliness. The secondary toolbar
was more reasonable for the vector clip tool, but it's still a bit
pointless as there's enough space for it on the main toolbar at any
reasonable zoom level.

Closes #1401.

Originally committed to SVN as r6333.
2012-01-22 05:59:36 +00:00
Thomas Goyne d273255814 Use wxDataViewCtrl::EditItem rather than StartEditor when using 2.9.4 as StartEditor is deprecated
Originally committed to SVN as r6332.
2012-01-22 05:59:31 +00:00
Thomas Goyne 6d4a56d391 Delete most of VideoBox's members
VideoBox is down to one method so it doesn't actually need to be able to
reference most of the stuff it constructs.

Originally committed to SVN as r6331.
2012-01-22 05:59:23 +00:00
Thomas Goyne d1d4d7840b Obey the icon size option in the visual subtoolbars rather than always using 24x24 icons
Originally committed to SVN as r6330.
2012-01-20 23:42:33 +00:00
Thomas Goyne d253620a96 Remove duplicate *.mov from video format filters
Originally committed to SVN as r6329.
2012-01-20 22:36:11 +00:00
Thomas Goyne c83135cb9b Add a few more a/v formats to the filters. Updates #1397.
Originally committed to SVN as r6328.
2012-01-20 22:20:08 +00:00
Thomas Goyne a939732d9c Add auto4lua support for dynamic help strings
Rather than passing a string as the second argument to
aegisub.register_macro, they can now pass a function which will be
called (with no arguments) to get a help string.

Originally committed to SVN as r6327.
2012-01-20 21:33:39 +00:00
Thomas Goyne b0c1ef2d6b Add support for commands with dynamic help strings
Originally committed to SVN as r6326.
2012-01-20 21:33:30 +00:00
Thomas Goyne 64c7043123 Add aegisub.cancel(), which immediates ends macro execution without applying any of the changes that have been made
Originally committed to SVN as r6325.
2012-01-20 21:33:20 +00:00
Thomas Goyne 632a02bcc9 Disable keyboard scrolling in the preferences dialog as it eats unrelated key events on wxGTK
Originally committed to SVN as r6324.
2012-01-20 15:14:47 +00:00
Thomas Goyne 2e2d896ea9 Fix the font pick buttons in the preferences dialog with wxGTK
wxGTK doesn't generate spin events when the value of a spin control is
set programmatically, so generate the event ourseleves.

Originally committed to SVN as r6323.
2012-01-20 15:14:41 +00:00
Thomas Goyne 2bc43eb886 Fix use of uninitialized variable when setting margins to an empty string
Originally committed to SVN as r6322.
2012-01-20 05:14:56 +00:00
Thomas Goyne 4675dbb29d Factor out the placeholder text behavior from SubsEditBox and make it work better
Handle switching from placeholder/normal mode when the value is changed
externally (such as from the active line changing) in addition to on
focus/blur, and improve behavior when the user sets the text to the
placeholder text.

Originally committed to SVN as r6321.
2012-01-20 05:14:50 +00:00
Thomas Goyne 1ce9b0d31b Refactor SubsEditBox a bit to make the constructor less of a monolithic behemoth and eliminate some duplicated code.
Originally committed to SVN as r6320.
2012-01-20 05:14:44 +00:00
Thomas Goyne 8e1ffb7898 Fix off-by-one error in logic for when to reannounce karaoke style ranges
Originally committed to SVN as r6319.
2012-01-20 01:49:41 +00:00
Thomas Goyne a249cfcc35 Add an option to disable autosave as setting the interval to zero isn't very obvious
Originally committed to SVN as r6318.
2012-01-20 01:04:24 +00:00
Thomas Goyne 6e09fb1abf Reset syntax highlighter state at the end of override blocks correctly
With incomplete (or possibly incomplete for \r and \fn) tags at the end
of an override block, the text at the beginning of the next override
block was being incorrectly parsed as part of that tag.

Originally committed to SVN as r6317.
2012-01-19 19:46:09 +00:00
Thomas Goyne 6a091e3ba2 Don't save the file in the 'opened a new file' commit when 'App/Auto/Save on Every Change' is enabled as it's not actually a change
Originally committed to SVN as r6316.
2012-01-19 19:46:01 +00:00
Thomas Goyne e4b2f1b509 Set the minimum undo levels to 2, as things get weird without a valid undo stack
Originally committed to SVN as r6315.
2012-01-19 19:45:49 +00:00
Thomas Goyne c75fb1d069 Add the OSS player to the vcproj
It's never used on Windows, but it's useful to have all of the files in
the project, and the other non-Windows audio players are already in the
project.

Originally committed to SVN as r6314.
2012-01-19 00:43:43 +00:00
Thomas Goyne a72fb8f5bf Quote the path to gtestd.lib so that it works with spaces
Originally committed to SVN as r6313.
2012-01-18 23:39:52 +00:00
Thomas Goyne 6414a6ffcb Add the Ctrl/Alt/Shift-Left/Right hotkeys to the subtitle grid
Originally committed to SVN as r6312.
2012-01-18 22:51:37 +00:00
Thomas Goyne be07cca9f6 Change keyframe snapping distance from frames to milliseconds
Snapping based on frames works poorly with VFR, and is pointlessly
different from the other adjustments.

Originally committed to SVN as r6311.
2012-01-18 22:51:28 +00:00
Thomas Goyne f6c3be4776 Clean up a bunch of stuff in DialogTimingProcessor
Factor out most of the duplicated code and fix a lot of ugly stylistic
things.

Originally committed to SVN as r6310.
2012-01-18 22:51:17 +00:00
Thomas Goyne e40e42ff1c Modernize DialogTextImport
Originally committed to SVN as r6309.
2012-01-18 20:08:53 +00:00
Thomas Goyne b36c70ca7d Move a pile of things that shouldn't be in headers out of the headers
Originally committed to SVN as r6308.
2012-01-18 20:08:42 +00:00
Thomas Goyne b38851bb93 Make the avisynth providers store an AvisynthWrapper rather than inherit from it
Originally committed to SVN as r6307.
2012-01-18 20:08:32 +00:00
Thomas Goyne 46986c6944 Fix new[]/delete mismatch
Originally committed to SVN as r6306.
2012-01-18 20:08:24 +00:00
Thomas Goyne 8cf71ddd8d Fix crash when seeking to previous keyframe with no keyframes loaded
Originally committed to SVN as r6305.
2012-01-18 20:08:16 +00:00
Thomas Goyne 9ac2f93bf0 Fix some mostly unimportant uses of uninitialized memory
Originally committed to SVN as r6304.
2012-01-18 20:08:06 +00:00
Thomas Goyne 2109d677a7 Handle unicode in string lists in the preferences dialog
Originally committed to SVN as r6303.
2012-01-17 03:03:13 +00:00
Thomas Goyne 96211b79cf Focus the frame number field of the Jump To dialog when it's opened
Originally committed to SVN as r6302.
2012-01-17 02:47:37 +00:00
Thomas Goyne cf6f54720d Change the default hotkey for the Jumo To dialog to Ctrl-G
The hotkey should only be Ctrl-J on OS X (where Ctrl-G is taken by Find
Next), but platform-specific hotkeys aren't implemented yet.

Originally committed to SVN as r6301.
2012-01-17 02:47:31 +00:00
Thomas Goyne f463bf4bd9 Derive the custom hotkey renderers from wxDataViewCustomRenderer
Deriving from the more specialized renderes reduces the amount of code
required, but it depends on implementation details of the specific
implementations, resulting in the custom renderers not working with
wxGTK. In addition, this makes it possible to bypass the default
handling for 'Enter' which made it impossible to set it as a hotkey.

Originally committed to SVN as r6300.
2012-01-17 02:47:25 +00:00
Thomas Goyne 4055100734 Implement 'make dist'
Originally committed to SVN as r6299.
2012-01-14 18:46:49 +00:00
Thomas Goyne 3ed84ba70d Update distdir generation
The list of files to include was out of date and only included files
for dependencies which were actually enabled, and the script was
FreeBSD-specific.

Originally committed to SVN as r6298.
2012-01-14 18:46:43 +00:00
Thomas Goyne a586e7e58f Write svn_revision when getting the revision from git
Originally committed to SVN as r6297.
2012-01-14 18:46:38 +00:00