Commit graph

1834 commits

Author SHA1 Message Date
Thomas Goyne
a78417177a Move cajun implementations from .inl files included by the headers to .cpp files
Originally committed to SVN as r6004.
2011-12-22 21:10:10 +00:00
Thomas Goyne
2439381c33 Fix misspelled word in the crash log
Originally committed to SVN as r6002.
2011-12-22 21:09:51 +00:00
Thomas Goyne
34a87b1c1e Silence a pile of /W4 warnings
Originally committed to SVN as r6001.
2011-12-22 21:09:31 +00:00
Thomas Goyne
c0cfe8afce Make Vector2D's default constructor initialize to the invalid value rather than a seemingly valid value. Fixes a few cases where uninitialized vectors were used as if they were initialized.
Originally committed to SVN as r5987.
2011-12-06 23:13:06 +00:00
Thomas Goyne
1a68f12dcb Fix rendering errors with the cross visual tool and detached video
Originally committed to SVN as r5977.
2011-12-06 20:07:57 +00:00
Thomas Goyne
ffa811c8bc Add "App/Auto/Load Linked Files" to the preferences dialog
Originally committed to SVN as r5976.
2011-12-06 19:59:04 +00:00
Thomas Goyne
6ff233b5ac Convert audio samples to doubles rather than floats when using FFTW
Originally committed to SVN as r5975.
2011-12-06 19:58:54 +00:00
Thomas Goyne
5d8a802e8a Allocate memory for fftw with fftw_alloc_real/fftw_alloc_complex rather than fftw_malloc
Originally committed to SVN as r5974.
2011-12-06 19:58:44 +00:00
Thomas Goyne
b4e3208405 Fix off-by-one error causing rendering errors in the vector clip visual tool when bezier curves are used
Originally committed to SVN as r5973.
2011-12-06 18:08:33 +00:00
Thomas Goyne
388580e0cc Add spaces between the components of bezier curves
Originally committed to SVN as r5972.
2011-12-06 18:08:23 +00:00
Thomas Goyne
904e0769b1 Remove unused paramters to VideoDisplay::UpdateSize
Originally committed to SVN as r5971.
2011-12-06 00:18:13 +00:00
Thomas Goyne
880ea8848c Document some of VideoContext's members
Originally committed to SVN as r5970.
2011-12-06 00:18:04 +00:00
Thomas Goyne
e49486201d Eliminate the duplication between VideoContext::videoName and VideoContext::videoFile
Originally committed to SVN as r5969.
2011-12-06 00:17:54 +00:00
Thomas Goyne
2fa16a78c6 Move snapshot saving from VideoContext to the commands
Originally committed to SVN as r5968.
2011-12-06 00:17:45 +00:00
Thomas Goyne
8a7f4038c1 Make the video provider owned solely by ThreadedFrameSource rather than in a shared_ptr stored in several places
Originally committed to SVN as r5967.
2011-12-06 00:17:36 +00:00
Thomas Goyne
59fdab5fe7 Remove VideoContext::nextFrame as it's unused
Originally committed to SVN as r5966.
2011-12-06 00:17:25 +00:00
Thomas Goyne
c26e61f209 Remove the audio resync code from VideoContext. It didn't actually work with the threaded video provider and should be unneccesary as video now always plays back at full speed (dropping frames if needed).
Originally committed to SVN as r5965.
2011-12-05 05:27:05 +00:00
Thomas Goyne
8ab9ba77ae Remove the prohibition against seeking while video is playing and just do Stop; Seek; Play as the slider already did in some cases
Originally committed to SVN as r5964.
2011-12-05 05:26:58 +00:00
Thomas Goyne
f95f1f13cf Don't block key events on the video slider when video is playing, as this makes stopping the video rather awkward and it's unneccesary
Originally committed to SVN as r5963.
2011-12-05 05:26:52 +00:00
Thomas Goyne
2e40652265 Simplify video playback logic
Originally committed to SVN as r5962.
2011-12-05 05:26:45 +00:00
Thomas Goyne
1f534bc757 Kill VideoContext::playMutex. I assume it was a relic from the old threaded video display code as it's completely pointless.
Originally committed to SVN as r5961.
2011-12-05 05:26:38 +00:00
Thomas Goyne
73ee949d55 Fix bounds checking in the rectangular clip visual tool with detached video
Originally committed to SVN as r5960.
2011-12-05 03:22:33 +00:00
Thomas Goyne
009d99407b Force a relayout of the video display after switching visual tools. Fixes a bug where the subtoolbar would sometimes appear in the wrong place.
Originally committed to SVN as r5959.
2011-12-05 01:45:08 +00:00
Thomas Goyne
48d412468e Make the log dialog not insane and crashy
Originally committed to SVN as r5958.
2011-12-02 04:36:06 +00:00
Thomas Goyne
95a329a1e2 Flush the clipboard on exit so that it isn't cleared
Originally committed to SVN as r5957.
2011-12-02 04:35:59 +00:00
Thomas Goyne
59ddcab360 Add Ctrl-Shift-S as a default hotkey for Save As
Originally committed to SVN as r5956.
2011-12-01 21:59:35 +00:00
Thomas Goyne
df3d3cd409 Fix assertion failure when opening the Jump To dialog on 64-bit linux
Originally committed to SVN as r5955.
2011-12-01 04:22:55 +00:00
Thomas Goyne
d6ba00883e Fix infinite loop when opening video with wxgtk
Originally committed to SVN as r5954.
2011-12-01 03:47:19 +00:00
Thomas Goyne
90582c0b15 Use NumValidator to ensure only numbers are typed in the frames box of the jump to dialog. Updates #1319.
Originally committed to SVN as r5953.
2011-12-01 00:43:48 +00:00
Thomas Goyne
157c03ce63 Load the colors for the audio display timeline from the audio colorscheme
Originally committed to SVN as r5952.
2011-11-30 21:04:46 +00:00
Thomas Goyne
7bfdc78b72 Load the colors for the audio display scrollbar from the audio colorscheme
Originally committed to SVN as r5951.
2011-11-30 21:04:37 +00:00
Thomas Goyne
fa15f0800e Make audio color schemes selectable in the preferences dialog
Originally committed to SVN as r5950.
2011-11-30 21:04:28 +00:00
Thomas Goyne
1a4d116617 Add green audio color scheme similar to the default waveform colors in 2.1. Currently only actually usable by manually editing the config file.
Originally committed to SVN as r5949.
2011-11-30 21:04:18 +00:00
Thomas Goyne
9cb7b23345 Get color scheme names from the config rather than hardcoding it
Originally committed to SVN as r5948.
2011-11-30 21:04:09 +00:00
Thomas Goyne
598a85c6cd Move color scheme definitions to the config file
Originally committed to SVN as r5947.
2011-11-30 21:03:57 +00:00
Thomas Goyne
f0e98151f1 Close audio if an error occurs while announcing the opened audio as the program is probably in an inconsistent state
Originally committed to SVN as r5946.
2011-11-30 04:28:03 +00:00
Thomas Goyne
b4d2bba7a2 Fix the name of the Resample Resolution dialog's help page
Originally committed to SVN as r5945.
2011-11-30 03:46:44 +00:00
Thomas Goyne
adb5963fbd Cast size_ts used in format strings to ints instead as there isn't actually a portable way to format them.
Originally committed to SVN as r5944.
2011-11-30 02:44:27 +00:00
Thomas Goyne
f9e8175cb8 Fix wxString::Format assertion failures in 64-bit builds
Originally committed to SVN as r5943.
2011-11-30 02:38:42 +00:00
Thomas Goyne
a47f51080c Also define __STDC_FORMAT_MACROS for commands
Originally committed to SVN as r5942.
2011-11-30 02:16:01 +00:00
Thomas Goyne
9203f17f4d Implement the Lock Scroll on Cursor option in the audio display
Originally committed to SVN as r5941.
2011-11-30 00:40:32 +00:00
Thomas Goyne
c6b97612ae Delay creation of the audio renderer until audio is actually opened
Originally committed to SVN as r5940.
2011-11-30 00:40:22 +00:00
Thomas Goyne
8632d5ce75 Remove some unreachable code in SubtitleFormat::AskForFPS
Originally committed to SVN as r5939.
2011-11-29 23:26:31 +00:00
Thomas Goyne
500b8b66d8 Make a few of FrameMain's members local to InitContents
Originally committed to SVN as r5938.
2011-11-29 23:18:42 +00:00
Thomas Goyne
b993c02dee Move AegisubFileDropTarget to frame_main.cpp. It's under ten lines of code so there's really no point in having two separate files for it.
Originally committed to SVN as r5936.
2011-11-29 23:18:24 +00:00
Thomas Goyne
bad20c2898 Delete aegisub/src/command/header
Originally committed to SVN as r5935.
2011-11-29 23:18:15 +00:00
Thomas Goyne
eaba8eb177 Define __STDC_FORMAT_MACROS for all files in the Makefile and vc10 project, as was already done in the vc9 project. There's a decent number of files which need it and we don't have any naming conflicts with it so there's no reason not to.
Originally committed to SVN as r5933.
2011-11-29 23:17:58 +00:00
Thomas Goyne
0e260409fd Remove unused OnKeyDown method from DialogSearchReplace
Originally committed to SVN as r5932.
2011-11-29 23:17:49 +00:00
Thomas Goyne
19503ef4f8 Simplify HelpButton and add some error handling
Originally committed to SVN as r5931.
2011-11-29 23:17:40 +00:00
Thomas Goyne
3f90614fd0 Delete static_bmp.[h|cpp] as it isn't actually used anywhere
Originally committed to SVN as r5930.
2011-11-29 23:17:31 +00:00
Thomas Goyne
a445512970 Remove out-of-date comment in auto4_lua.cpp
Originally committed to SVN as r5929.
2011-11-29 23:17:20 +00:00
Thomas Goyne
371bda4f2b Move standard windows libraries from setup.cpp to the project. Updates #949.
Originally committed to SVN as r5927.
2011-11-28 22:45:27 +00:00
Thomas Goyne
7e1ef51b8e Remove wx libraries from setup.cpp. Updates #949.
Originally committed to SVN as r5926.
2011-11-28 22:45:16 +00:00
Thomas Goyne
66f3a3ce55 Fix integer overflow in the matroska subtitle loader which resulted in meaningless progress reporting
Originally committed to SVN as r5925.
2011-11-28 22:16:58 +00:00
Thomas Goyne
cce9cb3c47 Fix unintended lowercasing of all strings returned from AssFile::GetScriptInfo
Originally committed to SVN as r5924.
2011-11-28 22:16:50 +00:00
Thomas Goyne
cdf05af92b Refactor out a bunch of duplicated code in DialogProperties
Originally committed to SVN as r5923.
2011-11-28 22:16:41 +00:00
Thomas Goyne
303432a671 Default to zero when the initial value for a NumValidator is ""
Originally committed to SVN as r5922.
2011-11-28 22:16:33 +00:00
Thomas Goyne
ca91097b8f Revamp script resolution setting logic
Rather than setting the default script resolution to 640x480, leave it
unset in new files. When video is opened, if the user has not already
manually set a script resolution, automatically use the video's
resolution as the script resolution. If the user has and the set
resolution is not a multiple of the video resolution, use the old prompt
for updating it.

This eliminates the confusing prompt about mismatched resolutions when
opening video with a new file while hopefully resulting in users using
the correct resolution more often.

Originally committed to SVN as r5921.
2011-11-28 22:16:22 +00:00
Thomas Goyne
f519a493c8 Increment PortAudio refcount even if it's currently initialized
Originally committed to SVN as r5920.
2011-11-28 20:02:07 +00:00
Thomas Goyne
3c83d7e326 Add portaudio device selection to the preferences dialog and filter the list of devices to only output devices
Originally committed to SVN as r5919.
2011-11-28 20:01:58 +00:00
Thomas Goyne
87496b8767 Finish rewriting the PortAudio player
Remove pointless volatiles.

Throw agi::Exception-derived exceptions rather than bare strings.

Eliminate pointless struct which wrapped a few member variables for no
apparent reason.

Use logging statements rather than printf.

Don't set an explicit frame buffer size as the audio providers are fine
with variable sizes and portaudio strongly recommends leaving it up to
the device to decide.

Closes #997.

Originally committed to SVN as r5918.
2011-11-28 20:01:46 +00:00
Thomas Goyne
c55195e11c Non-precomp-header compilation
Originally committed to SVN as r5917.
2011-11-25 22:12:15 +00:00
Thomas Goyne
e5e159d6b1 Throw agi::Exception derived exceptions from the OSS player rather than bare strings
Originally committed to SVN as r5916.
2011-11-25 19:30:42 +00:00
Thomas Goyne
5f7ca1c7a8 Store paths in the last used paths options rather than file names. Updates #1340.
Originally committed to SVN as r5914.
2011-11-25 19:29:46 +00:00
Thomas Goyne
e095dc06cd Hacks for Mac, LC_CTYPE must be "" and a wxSafeYield breaks something during FrameMain construction
Originally committed to SVN as r5913.
2011-11-25 19:29:17 +00:00
Thomas Goyne
0c5cb8e490 Have the "make adjacent" threshold in TPP have the end of the range be inclusive
Originally committed to SVN as r5912.
2011-11-25 19:28:50 +00:00
Thomas Goyne
56e6f7d5b2 Move ASS -> SRT tag conversion to the SRT subtitle format from AssDialogue
Originally committed to SVN as r5911.
2011-11-25 19:28:19 +00:00
Thomas Goyne
0992a839cc Port new SRT parser from 2.1.9. Updates #1301.
Originally committed to SVN as r5910.
2011-11-25 19:27:51 +00:00
Thomas Goyne
1452f1fbe3 Partially remove the Gtk/SCIM locale hack. Updates #1205, #1248.
Originally committed to SVN as r5909.
2011-11-25 19:27:19 +00:00
Thomas Goyne
6152716003 Make a few strings into format strings for translations. Closes #1093.
Originally committed to SVN as r5908.
2011-11-25 19:26:48 +00:00
Thomas Goyne
7b46ce6380 Don't mark y4m tags as translatable
Originally committed to SVN as r5907.
2011-11-25 19:26:21 +00:00
Thomas Goyne
f3c10634d1 Move gl_text's OpenGL header inclusion to the cpp file
Originally committed to SVN as r5906.
2011-11-23 18:33:14 +00:00
Thomas Goyne
df50af52e8 Remove OpenGL headers from video_context as it doesn't touch OpenGL anymore
Originally committed to SVN as r5905.
2011-11-23 18:33:02 +00:00
Thomas Goyne
88b536f824 Make VideoOutGL's error checking even more completely overboard
Originally committed to SVN as r5904.
2011-11-23 18:32:50 +00:00
Thomas Goyne
dc8dbbb535 Make VideoContext::Reset private and use SetVideo to close the video so that the change gets announced properly
Originally committed to SVN as r5903.
2011-11-23 18:32:37 +00:00
Thomas Goyne
eb2a6e14fa Fix a crash caused by the video display recieving a paint event before the first video frame is ready
Originally committed to SVN as r5902.
2011-11-23 18:32:23 +00:00
Thomas Goyne
893ec95841 Don't load the FPS from Aegisub keyframes. The format breaks vfr and setting the fps should be done with timecode files.
Originally committed to SVN as r5900.
2011-11-20 17:35:00 +00:00
Thomas Goyne
908d1cadae Pass the audio renderer absolute coordinates rather than relative so that audio actually scrolls
Originally committed to SVN as r5898.
2011-11-20 04:25:05 +00:00
Thomas Goyne
d67cc6032b Fix portaudio player compilation
Originally committed to SVN as r5897.
2011-11-20 03:43:52 +00:00
Thomas Goyne
cead5f92df fix non-precomp header compilation
Originally committed to SVN as r5896.
2011-11-20 03:30:00 +00:00
Thomas Goyne
7998677612 Fix wxGTK assertion failure
Originally committed to SVN as r5895.
2011-11-19 05:07:41 +00:00
Thomas Goyne
563a544150 Reload audio when the cache type is changed
Originally committed to SVN as r5894.
2011-11-19 04:57:14 +00:00
Thomas Goyne
9a53dc0440 Eliminate some unused variables
Originally committed to SVN as r5893.
2011-11-19 04:46:45 +00:00
Thomas Goyne
236ea4261d Reload audio when the player or provider is changed
Originally committed to SVN as r5892.
2011-11-19 01:14:42 +00:00
Thomas Goyne
43d41def4f Add missing file audio_rendering_style.h
Originally committed to SVN as r5891.
2011-11-19 01:14:33 +00:00
Thomas Goyne
70ba90f024 Clean up the OpenAL audio player a bit
Remove pointless volatile modifiers from member variables (there aren't
even any threads involved).

Eliminate all heap memory allocation during playback.

Move comments into the doxygen comments and add some more.

Throw typed exceptions.

Originally committed to SVN as r5889.
2011-11-19 01:14:13 +00:00
Thomas Goyne
70fcece459 Don't create the audio timing controller until audio is actually opened
Originally committed to SVN as r5888.
2011-11-18 22:58:22 +00:00
Thomas Goyne
92e10c80a2 Add markers and styling ranges in the audio display for inactive lines. Closes #1327.
Originally committed to SVN as r5887.
2011-11-18 22:58:12 +00:00
Thomas Goyne
3cf1718ef6 Add support for the inactive color scheme to the audio renderers
Originally committed to SVN as r5886.
2011-11-18 22:58:02 +00:00
Thomas Goyne
e3b15bf587 Only connect to signals in AudioDisplay when audio is actually open
Originally committed to SVN as r5885.
2011-11-18 22:57:54 +00:00
Thomas Goyne
725a334860 Add Inactive style to Icy Blue
Originally committed to SVN as r5884.
2011-11-18 22:57:45 +00:00
Thomas Goyne
1eedb0c3d4 Replace InitIcyBlue_Normal and InitIcyBlue_Selected with a single method which takes an audio rendering style as a parameter
Originally committed to SVN as r5883.
2011-11-18 22:57:36 +00:00
Thomas Goyne
13a281e9dc Extract the color lookup in AudioColorScheme to a seperate method
Originally committed to SVN as r5882.
2011-11-18 22:57:26 +00:00
Thomas Goyne
262a74dc6f Remove old audio display color options which have been replaced by the audio color schemes
Originally committed to SVN as r5881.
2011-11-18 22:57:17 +00:00
Thomas Goyne
f4a975d64c Remove unnecessary explicit 'inline'
Originally committed to SVN as r5880.
2011-11-18 22:57:07 +00:00
Thomas Goyne
af9be4afa6 Remove #undef min/max as NOMINMAX is now defined by the project
Originally committed to SVN as r5879.
2011-11-18 22:56:58 +00:00
Thomas Goyne
8d28b44773 Get audio styling ranges from the timing controller. Based on a patch by jfs.
Originally committed to SVN as r5878.
2011-11-18 22:56:45 +00:00
Thomas Goyne
262d5195c5 Add access keys for nearly all things which support them and were missing them. Closes #1070.
Originally committed to SVN as r5877.
2011-11-18 18:49:09 +00:00
Thomas Goyne
2c2bb54e11 Add access keys for most entries in the main menu bar and eliminate a few duplicates. Updates #1078.
Originally committed to SVN as r5876.
2011-11-18 05:00:20 +00:00
Thomas Goyne
0db92549d7 Eliminate some probably spurious uninitialized variable warnings
Originally committed to SVN as r5875.
2011-11-18 04:06:03 +00:00
Thomas Goyne
c119d2d84b Don't try to use the active line in a handler for COMMIT_NEW as it may not be valid
Originally committed to SVN as r5874.
2011-11-18 04:04:35 +00:00
Thomas Goyne
28c7e7dec3 Bind wxEVT_SIZE in the video display even when attached. There doesn't seem to be any reason not to and it fixes some bugs with resizing the main window.
Originally committed to SVN as r5873.
2011-11-18 01:20:47 +00:00
Thomas Goyne
ff03168f4c Show decimals in the cross visual tool only when the video resolution is greater than the script resolution
Originally committed to SVN as r5872.
2011-11-17 18:21:30 +00:00
Thomas Goyne
f863e28479 Add Select All to the subtitles menu. Closes #1226.
Originally committed to SVN as r5871.
2011-11-17 03:58:05 +00:00
Thomas Goyne
8831de5774 Modify a few strings to ease translations
Originally committed to SVN as r5870.
2011-11-17 02:21:46 +00:00
Thomas Goyne
bf285cfa50 Make the undo/redo strings more localization-friendly. Closes #1104.
Originally committed to SVN as r5869.
2011-11-17 02:19:10 +00:00
Thomas Goyne
1590b2a65e Add validator to the subtitle save command to check if there are actually unsaved changes
Originally committed to SVN as r5868.
2011-11-16 22:43:56 +00:00
Thomas Goyne
14c9d8ec87 Fix validate method for the subtitle/select/visible command
Originally committed to SVN as r5867.
2011-11-16 22:43:45 +00:00
Thomas Goyne
2cb234b414 Change the default for Video/Check Script Res to 1 (Ask). Closes #1138.
Originally committed to SVN as r5866.
2011-11-16 21:59:48 +00:00
Thomas Goyne
da09d71239 Expand text boxes in the preferences dialog to fill available space
Originally committed to SVN as r5865.
2011-11-16 21:59:39 +00:00
Thomas Goyne
a6ecf821c9 Add some options to the preferences dialog
Originally committed to SVN as r5864.
2011-11-16 21:59:31 +00:00
Thomas Goyne
88e5392d37 Remove a few unused options
Originally committed to SVN as r5863.
2011-11-16 21:59:22 +00:00
Thomas Goyne
0f2cea4226 Fix the option name for max undo levels in the preferences dialog
Originally committed to SVN as r5862.
2011-11-16 21:59:12 +00:00
Thomas Goyne
95a1071a1b Add the script file name to the close confirmation dialog. Closes #879.
Originally committed to SVN as r5861.
2011-11-16 21:58:58 +00:00
Thomas Goyne
de03dfd8a8 Add an option to disable keyframes in the audio display only in karaoke mode. Closes #644.
Originally committed to SVN as r5860.
2011-11-16 19:56:09 +00:00
Thomas Goyne
91a62836a5 Move the keyframe marker provider from the audio controller to the timing controllers
Originally committed to SVN as r5859.
2011-11-16 19:56:00 +00:00
Thomas Goyne
29518f585a Move AudioMarkerProviderKeyframes from audio_controller.cpp to its own header/source files
Originally committed to SVN as r5858.
2011-11-16 19:55:49 +00:00
Thomas Goyne
75d471c538 Remove unneeded overloaded operators for AudioMarkerKeyframe
Originally committed to SVN as r5857.
2011-11-16 19:55:40 +00:00
Thomas Goyne
672f420d6c Fix race conditions in the dsound2 player that occasionally resulted in audio playback stopping instantly
Originally committed to SVN as r5856.
2011-11-16 19:55:31 +00:00
Thomas Goyne
b16f1a0698 Use scoped_ptr to store the worker thread in DirectSoundPlayer2
Originally committed to SVN as r5855.
2011-11-16 19:55:22 +00:00
Thomas Goyne
f45d9f8e2d Make pointlessly protected members of DirectSourcePlayer2 private
Originally committed to SVN as r5854.
2011-11-16 19:55:13 +00:00
Thomas Goyne
539dc2fbe4 Don't try to handle exceptions thrown by delete
Originally committed to SVN as r5853.
2011-11-16 19:55:04 +00:00
Thomas Goyne
a5f6e0588e Move doxygen comments in the dsound2 player to the declarations from the defitions
Originally committed to SVN as r5852.
2011-11-16 19:54:55 +00:00
Thomas Goyne
554a61daf5 Remove redundant wxLogErrors in DirectSoundPlayer2 that the scripted conversion to the new logging system missed
Originally committed to SVN as r5851.
2011-11-16 19:54:45 +00:00
Thomas Goyne
3dd5cbd31d Check for COMMIT_NEW in the visual tools correctly
Originally committed to SVN as r5850.
2011-11-16 19:54:35 +00:00
Thomas Goyne
55fc6c753e Round scales to ints as VSFilter doesn't actually support nonint scales so it's just pointless ugliness
Originally committed to SVN as r5849.
2011-11-16 19:54:25 +00:00
Thomas Goyne
4be9c302d3 Fix rendering of the clip visual tools with detached video
Originally committed to SVN as r5847.
2011-11-12 01:23:40 +00:00
Thomas Goyne
51149104d9 Make all of VideoBox's members private
Originally committed to SVN as r5846.
2011-11-12 01:23:29 +00:00
Thomas Goyne
feb752c24c Store the video display and slider in the context directly rather than going through the video box. Fxes a crash when detaching video.
Originally committed to SVN as r5845.
2011-11-12 01:23:18 +00:00
Thomas Goyne
d4ee9da474 Flip the y axis in the scale tool so that moving the mouse up increases size
Originally committed to SVN as r5843.
2011-11-12 01:22:45 +00:00
Thomas Goyne
c4369a092f Fix wxGTK assertion failure when opening the TPP dialog
Originally committed to SVN as r5842.
2011-11-09 03:47:26 +00:00
Thomas Goyne
a0b74f4424 Fix wxGTK assertion failure in audio_karaoke.cpp
Originally committed to SVN as r5841.
2011-11-09 02:29:36 +00:00
Thomas Goyne
4bd34ee32f Actually compile ffms and libass providers when they're enabled
Originally committed to SVN as r5838.
2011-11-08 06:06:43 +00:00
Thomas Goyne
c763026bfc Explicitly declare a storage location for AudioDisplayScrollbar::min_width
Originally committed to SVN as r5837.
2011-11-08 04:53:51 +00:00
Thomas Goyne
c04af51c86 Include lua.hpp rather than the .h versions on non-windows as lua is normally compiled as C, not C++
Originally committed to SVN as r5831.
2011-11-08 01:18:16 +00:00
Thomas Goyne
89541a949f Actually hide override tags in hide tags mode. Closes #1360.
Originally committed to SVN as r5830.
2011-11-08 00:25:02 +00:00
Thomas Goyne
dc380c5848 Refactor BaseGrid painting a bit
Originally committed to SVN as r5829.
2011-11-08 00:24:53 +00:00
Thomas Goyne
8e81fd07ed Move everything but the subtitle modification utility functions from SubtitlesGrid to BaseGrid. There never has been a clean division of responsibilities between them and the split mostly just made things awkward.
Originally committed to SVN as r5828.
2011-11-08 00:24:41 +00:00
Thomas Goyne
2f394a7792 Fix compilation with clang (but not linking because wxAny is currently broken with it)
Originally committed to SVN as r5826.
2011-11-07 06:18:34 +00:00
Thomas Goyne
8b5545c98f Finish porting the alsa player from 2.1.9 so that it actually compiles
Originally committed to SVN as r5825.
2011-11-07 05:24:46 +00:00
Thomas Goyne
0aa553eb7c compilation fixes
Originally committed to SVN as r5824.
2011-11-07 04:14:09 +00:00
Thomas Goyne
be77dc8307 Mostly rewrite the visual tools and related classes
Convert all coordinates within the visual tools to Vector2D, which has
been significantly extended. Eliminates a lot of issues with accumulated
rounding errors and simplifies a lot of code.

Modernize the visual tools' interactions with the rest of Aegisub by
connecting to signals directly rather than routing everything through
the video display and converting the main visual tool mode toolbar to
the command system.

Extract all references to OpenGL from the visual tools and move them to
OpenGLWrapper as a first step towards making it possible to implement an
alternative video renderer. In the process, eliminate all uses of OpenGL
immediate mode.

Fix a bunch of minor issues and general instability.

Originally committed to SVN as r5823.
2011-11-06 17:18:20 +00:00
Thomas Goyne
2e5cbf079e Update ?script after save as
Originally committed to SVN as r5822.
2011-11-06 17:18:14 +00:00
Thomas Goyne
e9e02539ac Fix crash when setting hotkeys
Originally committed to SVN as r5820.
2011-11-06 17:18:02 +00:00
Thomas Goyne
abaf8fc2c4 Non-precompiled-header compilation fix
Originally committed to SVN as r5819.
2011-11-04 19:42:59 +00:00
Thomas Goyne
84c545b978 Return const references from OptionValue::GetList* rather than taking an output parameter. Eliminates some copies of lists and makes the calling code less awkward.
Originally committed to SVN as r5816.
2011-11-04 19:42:31 +00:00
Thomas Goyne
05059732f9 Replace incorrect uses of bitwise or with logical or
Originally committed to SVN as r5814.
2011-11-04 19:42:12 +00:00
Thomas Goyne
6e2e87c0b5 Fix incorrect lowercasing in AssFile::GetScriptInfo
Originally committed to SVN as r5811.
2011-11-04 19:41:43 +00:00
Thomas Goyne
f48bc59694 Add locks around CSRI operations as VSFilter isn't even vaguely threadsafe
Originally committed to SVN as r5810.
2011-11-04 05:11:31 +00:00
Thomas Goyne
29f0786c81 Update the video box time boxes when the active line changes
Originally committed to SVN as r5809.
2011-11-04 05:11:24 +00:00
Thomas Goyne
4d2a2c618e Set the user agent used for the update checker requests rather than leaving it as 'wxWidgets 2.x'
Originally committed to SVN as r5808.
2011-11-03 22:50:54 +00:00
Thomas Goyne
2cbe7455bb Don't set icons for check and radio menu items as checked icons aren't supported yet
Originally committed to SVN as r5807.
2011-11-03 00:29:23 +00:00
Thomas Goyne
ccebd521c6 Fix errors in update checker resulting from trying to use the wrong option type
Originally committed to SVN as r5805.
2011-10-29 05:12:19 +00:00
Thomas Goyne
dedccc1f58 Handle errors when opening audio via the MRU menu
Originally committed to SVN as r5804.
2011-10-29 04:31:05 +00:00
Thomas Goyne
52a2316934 Don't display an error message if the user cancels audio loading
Originally committed to SVN as r5803.
2011-10-29 04:30:58 +00:00
Thomas Goyne
31a3b9aae0 Do nothing if video is played with no video loaded rather than crashing
Originally committed to SVN as r5802.
2011-10-29 04:30:52 +00:00
Thomas Goyne
402ba0e89d Fix loading subtitles from matroska files
Originally committed to SVN as r5801.
2011-10-29 04:16:31 +00:00
Thomas Goyne
6315192e2b Don't reuse buffers in the audio provider converters, as it isn't thread-safe to do so and making it thread-safe would hurt performance more than the extra allocations
Originally committed to SVN as r5800.
2011-10-29 03:47:02 +00:00
Thomas Goyne
085560b8c8 Use a single class for all audio endian and bit-depth conversion as while it's slower than the specialized ones, it isn't significantly so
Originally committed to SVN as r5798.
2011-10-29 03:46:51 +00:00
Thomas Goyne
f9408031b6 Add support for 24-64 bit audio. Based on a patch by SAPikachu. Updates #1292.
Originally committed to SVN as r5797.
2011-10-29 03:46:44 +00:00
Thomas Goyne
7f06849531 Rewrite the audio format converters, splitting each conversion into its own class
Originally committed to SVN as r5796.
2011-10-29 03:46:36 +00:00
Thomas Goyne
9a8fb66fbf Remove an unused variable in BaseGrid::UpdateMaps
Originally committed to SVN as r5795.
2011-10-28 20:40:53 +00:00
Thomas Goyne
f48f17cd0b Implement the hotkey page of the preferences dialog
Originally committed to SVN as r5794.
2011-10-28 20:40:43 +00:00
Thomas Goyne
6c995e7780 Add support for modifying hotkeys while the program is running
Originally committed to SVN as r5793.
2011-10-28 20:40:32 +00:00
Thomas Goyne
cba0b1edb8 Add a function to get a list of all registered command names
Originally committed to SVN as r5792.
2011-10-28 20:40:20 +00:00
Thomas Goyne
ffa622d698 Fix compilation without precompiled headers
Originally committed to SVN as r5791.
2011-10-28 20:15:10 +00:00
Thomas Goyne
f9f84b18f7 Use the error style for the entire thing-that-can't-be-a-tag-name rather than just the first character when a backslash is followed by garbage in an override block
Originally committed to SVN as r5786.
2011-10-26 02:48:08 +00:00
Thomas Goyne
48070be3a3 Move the audio display mouse wheel handling to the audio box so that it can update the horizontal zoom scrollbar
Originally committed to SVN as r5785.
2011-10-25 20:28:30 +00:00
Thomas Goyne
b4ace668de Only display the cursor time in the audio display when it's enabled
Originally committed to SVN as r5784.
2011-10-25 20:28:19 +00:00
Thomas Goyne
17b9347562 Add mouse wheel forwarding to ScintillaTextCtrl as wxSTC uses the scroll wheel
Originally committed to SVN as r5783.
2011-10-25 19:41:06 +00:00
Thomas Goyne
9ed1653aae Add mouse wheel forwarding code to FrameMain for when focus is on something that doesn't handle scroll events
Originally committed to SVN as r5782.
2011-10-25 19:40:57 +00:00
Thomas Goyne
1741ce93f6 Factor out the mouse wheel forwarding code in the audio display to a function used by the audio display, video display and subtitles grid, and make it actually work
Originally committed to SVN as r5781.
2011-10-25 19:40:45 +00:00
Thomas Goyne
be75262f73 Reload scripts through their manager so that the menu is aware of changes
Originally committed to SVN as r5780.
2011-10-25 19:02:01 +00:00
Thomas Goyne
ec9d50a43a Set shadow_w to the correct value in AssStyle's copy constructor
Originally committed to SVN as r5779.
2011-10-25 19:01:53 +00:00
Thomas Goyne
f6c8c83f5a Obey the option to disable the keyframe markers in the audio display
Originally committed to SVN as r5778.
2011-10-25 19:01:41 +00:00
Thomas Goyne
7476dfd9c6 Use GetScriptInfoAsInt in AssFile::GetResolution
Originally committed to SVN as r5777.
2011-10-25 01:16:56 +00:00
Thomas Goyne
af19dad6ea Remove pointless try\catch in AssFile;GetScriptInfoAsInt (wx functions don't throw exceptions)
Originally committed to SVN as r5776.
2011-10-25 01:16:47 +00:00
Thomas Goyne
2ad0342103 Make AssFile::GetScriptInfo slightly less dumb
Originally committed to SVN as r5775.
2011-10-25 01:16:36 +00:00
Thomas Goyne
5c487ae75f Don't apply the changes from an automation macro if an error occured
Originally committed to SVN as r5774.
2011-10-25 01:15:03 +00:00
Thomas Goyne
3a218c9dd4 Only set video zoom when loading associated video if it's actually present in the file
Originally committed to SVN as r5772.
2011-10-24 20:18:25 +00:00
Thomas Goyne
10464e4617 Kill AegisubApp::OnMouseWheel. It breaks the mouse wheel in dialogs, and it didn't actually work at the moment and isn't really the right way to handle mouse wheel forwarding in the first place
Originally committed to SVN as r5771.
2011-10-24 20:18:16 +00:00
Thomas Goyne
5e01f09b30 Refactor DialogAutomation::OnInfo
Originally committed to SVN as r5770.
2011-10-24 20:18:07 +00:00
Thomas Goyne
7f7aba1bcf Make cmd::Command::name const
Originally committed to SVN as r5769.
2011-10-24 20:17:57 +00:00
Thomas Goyne
4e1e68c88b Allow adding multiple scripts at once in the automation dialog
Originally committed to SVN as r5768.
2011-10-24 20:17:48 +00:00
Thomas Goyne
5cb7bdcbaf Set the event object for colour button click events. Fixes a bug where colour buttons in automation dialogs were completely broken.
Originally committed to SVN as r5767.
2011-10-24 20:17:40 +00:00
Thomas Goyne
374a43cd8b Simplify and speed up the hsl and hsv slider creation code in the color picker dialog
Originally committed to SVN as r5766.
2011-10-24 20:17:30 +00:00
Thomas Goyne
c1de03210d Set the style dropdown's value after undo
Originally committed to SVN as r5763.
2011-10-23 17:00:32 +00:00
Thomas Goyne
f29e889776 Always update column widths after a new line is added or removed
Originally committed to SVN as r5762.
2011-10-23 17:00:26 +00:00
Thomas Goyne
f875938ee4 Don't report a user cancel when the user clicks on the 'Close' button after completion in the progress dialog
Originally committed to SVN as r5761.
2011-10-23 17:00:21 +00:00
Thomas Goyne
1364527681 Fix error when trying to insert to the end of the file from auto4lua
Originally committed to SVN as r5760.
2011-10-23 17:00:14 +00:00
Thomas Goyne
d4e17dde2e Factor out the idea of a pen bound to options to a utility class
Originally committed to SVN as r5759.
2011-10-19 04:19:01 +00:00
Thomas Goyne
62f37772a3 Fix a pile of issues that resulted in the Actor box not working at all
Originally committed to SVN as r5758.
2011-10-19 04:05:09 +00:00
Thomas Goyne
035445e93a When the cursor is in a comment block, insert override tags at the beginning of the block rather than inside the comment
Originally committed to SVN as r5757.
2011-10-19 03:24:10 +00:00
Thomas Goyne
4009d24e73 Return an approriately-sized empty icon from icon::get if no icon exists
Originally committed to SVN as r5756.
2011-10-18 00:10:02 +00:00
Thomas Goyne
1da6f46cb2 Log a warning in icon::get if the icon doesn't exist rather than using printf
Originally committed to SVN as r5755.
2011-10-18 00:09:51 +00:00
Thomas Goyne
c7d0ce60ee Make the style editor commit its own changes. Fixes some issues where changes made in the style editor would fail to update the rest of the program.
Originally committed to SVN as r5754.
2011-10-17 22:00:58 +00:00
Thomas Goyne
36280b7a2b Kill TrivialType_T as it's completely pointless
Originally committed to SVN as r5748.
2011-10-17 21:59:59 +00:00
Thomas Goyne
9dc9047c11 Change json::Object's backing store from a list to a map. Cajun used list to preserve order, but json objects do not guarantee that order will be preserved
Originally committed to SVN as r5747.
2011-10-17 21:59:47 +00:00
Thomas Goyne
2f64a116a7 Make cajun containers implement the STL container interfaces rather than being retarded special snowflakes
Originally committed to SVN as r5746.
2011-10-17 21:59:35 +00:00
Thomas Goyne
2f43ef2fca Clean up the color picker dialog somewhat
Originally committed to SVN as r5744.
2011-10-17 17:52:49 +00:00
Thomas Goyne
04e385b4d5 Fix potential crash when opening the colorpicker dialog caused by use of an uninitialized variable
Originally committed to SVN as r5743.
2011-10-17 17:52:40 +00:00
Thomas Goyne
8daa6cfdc2 When setting the start or end time of a subtitle line to the current video frame, if the resulting line duration would be less than one frame also update the other time
Originally committed to SVN as r5742.
2011-10-17 17:52:31 +00:00
Thomas Goyne
6895e91e7c Fix validation for Make Lines Continuous
Originally committed to SVN as r5741.
2011-10-17 17:52:22 +00:00
Thomas Goyne
cc9cc6d713 Use FFMS_SetOutputFormatV2 with sufficiently recent FFMS2 rather than the deprecated FFMS_SetOutputFormatV
Originally committed to SVN as r5740.
2011-10-17 17:52:11 +00:00
Thomas Goyne
98777eff4e Use the per-platform default audio player from configure rather than always defaulting to portaudio
Originally committed to SVN as r5738.
2011-10-12 23:08:29 +00:00
Thomas Goyne
bb4c10a140 Make the audio play commands stop the video like in 2.1.x
Originally committed to SVN as r5737.
2011-10-12 23:08:20 +00:00
Thomas Goyne
bf5e504c59 Combine duplicated commands time/snap/frame and time/frame/current into one command that actually works
Originally committed to SVN as r5736.
2011-10-12 23:08:11 +00:00
Thomas Goyne
54f359f91b Enable the correct shift amount text box when opening the shift times dialog rather than always enabling the time one
Originally committed to SVN as r5735.
2011-10-12 23:08:02 +00:00
Thomas Goyne
b7efafe3b8 Fix calculation of the time column widths
Originally committed to SVN as r5734.
2011-10-12 23:07:38 +00:00
Thomas Goyne
98786aecba Fix the spelling of 'Choose...' in the preferences dialog
Originally committed to SVN as r5733.
2011-10-11 04:33:41 +00:00
Thomas Goyne
306664d16e Make the browse and font pick buttons in the preferences dialog actually work, and delete BrowseButton as it's no longer used by anything.
Originally committed to SVN as r5732.
2011-10-11 00:06:44 +00:00
Thomas Goyne
a3d9deddb9 Fix endless recursion between SubsTextEditCtrl::UpdateCallTip and UpdateStyle
Originally committed to SVN as r5730.
2011-10-11 00:06:25 +00:00
Thomas Goyne
557e61722b Kill DialogStyleEditor::OnChooseFont, which has been unused for over four years
Originally committed to SVN as r5729.
2011-10-11 00:06:13 +00:00
Thomas Goyne
7dfaa6427c Implement the video position marker in the audio display
Originally committed to SVN as r5728.
2011-10-10 21:04:23 +00:00
Thomas Goyne
a260a998b3 Convert newlines to \N when pasting rather than trying to clean them up later
Originally committed to SVN as r5727.
2011-10-10 20:59:04 +00:00
Thomas Goyne
6e30ff633c Fix compilation without precompiled headers
Originally committed to SVN as r5726.
2011-10-10 19:30:11 +00:00
Thomas Goyne
fdf74309a5 Don't revert changes to the filename made when undoing. Updates #1345.
Originally committed to SVN as r5725.
2011-10-10 17:29:35 +00:00
Thomas Goyne
eb947b3914 Remove dead code in AssFile::CanSave
Originally committed to SVN as r5724.
2011-10-10 17:29:26 +00:00
Thomas Goyne
e91834d667 Fix a few colourbutton issues in DialogStyleEditor
Originally committed to SVN as r5723.
2011-10-10 17:29:17 +00:00
Thomas Goyne
bd18ad11cb Fix bug making it impossible to modify styles via the style editor
Originally committed to SVN as r5722.
2011-10-10 17:29:09 +00:00
Thomas Goyne
882ee76d59 Eliminate large amounts of duplicated code in DialogStyleEditor
Originally committed to SVN as r5721.
2011-10-10 17:28:59 +00:00
Thomas Goyne
cbcc581cea Use PersistLocation for saving and restoring DialogStyleEditor's position
Originally committed to SVN as r5720.
2011-10-10 17:28:48 +00:00
Thomas Goyne
9ccd06b610 Uninvert playing the first/last 500ms of the selection
Originally committed to SVN as r5709.
2011-10-01 18:35:37 +00:00
Thomas Goyne
ac37a080c4 Change edit/search_replace to edit/find_replace in the default menu
Originally committed to SVN as r5708.
2011-10-01 18:35:31 +00:00
Thomas Goyne
a8caf35ebe Fix flipped subtitles with libass + avisynth
Originally committed to SVN as r5707.
2011-10-01 18:35:25 +00:00
Thomas Goyne
8624f923d9 Add edit box font face and size to the preferences dialog
Originally committed to SVN as r5706.
2011-10-01 18:35:19 +00:00
Thomas Goyne
3ff8591c22 Add a third period to ellipses with only two
Originally committed to SVN as r5705.
2011-10-01 18:35:12 +00:00
Thomas Goyne
9b00fad2fc Include the column headers in the column width calculations in BaseGrid
Originally committed to SVN as r5704.
2011-10-01 18:35:06 +00:00
Thomas Goyne
3dc0ed6c56 Use CmdDown in BaseGrid rather than #ifdefs
Originally committed to SVN as r5703.
2011-10-01 18:35:00 +00:00
Thomas Goyne
c199bd6d18 Only forward scroll wheel events to siblings and not parents to work around wx weirdness
Originally committed to SVN as r5702.
2011-10-01 18:34:49 +00:00
Thomas Goyne
5be401a1de Rename edit/search_replace to edit/find_replace for consistency
Originally committed to SVN as r5701.
2011-09-30 23:51:41 +00:00
Thomas Goyne
76467584bb Rearrange FrameMain's constructor so that the frame is shown before the updates check and files are loaded. Fixes some ugliness and a bug where the detached video dialog wasn't being parented correctly
Originally committed to SVN as r5700.
2011-09-30 20:43:04 +00:00
Thomas Goyne
e2ea5598fc Remove a pointless sizer around the video box
Originally committed to SVN as r5699.
2011-09-30 20:42:55 +00:00
Thomas Goyne
87290be48e Use Close rather than Destroy when closing the detached video dialog via the command
Originally committed to SVN as r5698.
2011-09-30 20:42:46 +00:00
Thomas Goyne
da6a208062 Bind wxEVT_LEFT_DCLICK in VideoDisplay so the cross and drag visual tools work
Originally committed to SVN as r5697.
2011-09-30 20:42:37 +00:00
Thomas Goyne
ce1783a868 Fix crash on commit in karaoke mode when autocommit is off
Originally committed to SVN as r5696.
2011-09-30 20:42:28 +00:00
Thomas Goyne
529f61e655 Allow overriding the aspect ratio when video is detached
Originally committed to SVN as r5695.
2011-09-30 20:42:20 +00:00
Thomas Goyne
3776051f96 Make the karaoke syllable table from aegisub.parse_karaoke_data zero-based for backward compatibility
Originally committed to SVN as r5694.
2011-09-30 20:42:09 +00:00
Thomas Goyne
5c75c9f708 Implement the audio scroll commands
Originally committed to SVN as r5693.
2011-09-30 20:41:56 +00:00
Thomas Goyne
597dd4bb8e Don't try to detach on video open if the video is already detached
Originally committed to SVN as r5692.
2011-09-30 20:41:44 +00:00
Thomas Goyne
bdcc2ec170 Defriend VideoContext and AudioProvider
Originally committed to SVN as r5691.
2011-09-30 20:41:33 +00:00
Thomas Goyne
ea2525cd00 Remove unneccesary forward declarations from video_context.h
Originally committed to SVN as r5690.
2011-09-30 20:41:22 +00:00
Thomas Goyne
8bda12596a Increase the minimum width of the thumb in the audio display scrollbar
Originally committed to SVN as r5689.
2011-09-30 20:41:10 +00:00
Thomas Goyne
8f918a59c2 Add some missing customizable subtitle grid colors to the preferences dialog
Originally committed to SVN as r5688.
2011-09-30 20:40:58 +00:00
Thomas Goyne
d5c4a9bec6 Get line start and end marker colors in dialogue mode from options
Originally committed to SVN as r5687.
2011-09-30 20:40:44 +00:00
Thomas Goyne
c4544839e9 Explicitly set the size of ColourButton as the default looks somewhat odd with wx trunk
Originally committed to SVN as r5686.
2011-09-29 20:27:50 +00:00
Thomas Goyne
546ced012a Fix option names for syntax highlighting colors
Originally committed to SVN as r5685.
2011-09-29 20:27:40 +00:00
Thomas Goyne
0f8bafb432 Change default color for the end of line marker in the audio display to blue
Originally committed to SVN as r5684.
2011-09-29 20:27:32 +00:00
Thomas Goyne
62181365b9 Default to 25 FPS if there are too few frames in a video to compute the FPS
Originally committed to SVN as r5683.
2011-09-29 20:27:23 +00:00
Thomas Goyne
32463efb08 Fix crash when trying to open audio from file with no audio tracks
Originally committed to SVN as r5682.
2011-09-29 20:27:13 +00:00
Thomas Goyne
7b1dea1a7a Eliminate flickering when moving the mouse over the karaoke split/join bar
Originally committed to SVN as r5681.
2011-09-29 18:17:37 +00:00
Thomas Goyne
ab52f9a441 Move most of the autosave logic to AssFile and only autosave if there's actually been changes since the last autosave
Originally committed to SVN as r5680.
2011-09-29 18:17:27 +00:00
Thomas Goyne
00dd477a40 Remove unused method FrameMain::OnSubtitlesSave
Originally committed to SVN as r5679.
2011-09-29 18:17:17 +00:00
Thomas Goyne
08307674a0 Make AudioBox responsible for showing and hiding the karaoke bar, and make it shift the subs box down rather than shrink the audio display
Originally committed to SVN as r5678.
2011-09-29 05:33:10 +00:00
Thomas Goyne
094a6d081c Move the audio box height management code from FrameMain to AudioBox
Originally committed to SVN as r5677.
2011-09-29 05:33:04 +00:00
Thomas Goyne
c211975b65 Remove unused window IDs in AudioBox
Originally committed to SVN as r5676.
2011-09-29 05:32:58 +00:00
Thomas Goyne
fca7657e60 Don't let the user drag the audio sash below the bottom of the window as it's rather hard to drag back afterwards
Originally committed to SVN as r5675.
2011-09-29 04:38:34 +00:00
Thomas Goyne
a00a3047cb Save and restore the height of the audio display across sessions
Originally committed to SVN as r5674.
2011-09-29 04:38:27 +00:00
Thomas Goyne
6beb266c15 Use the end of line marker style for the end marker in karaoke mode rather than the start of line style
Originally committed to SVN as r5673.
2011-09-29 04:38:22 +00:00
Thomas Goyne
9b9482b96f Set the subs box's style and size correctly
Originally committed to SVN as r5672.
2011-09-29 04:38:15 +00:00
Thomas Goyne
9ad1434f37 Don't rely on ADL for std algorithms called on wxArrayInt as wxArrayInt doesn't always inherit from std::vector
Originally committed to SVN as r5671.
2011-09-29 02:33:22 +00:00
Thomas Goyne
c328bdfa5f Fix typo that resulted in automation macros not being able to set undo points
Originally committed to SVN as r5669.
2011-09-29 00:10:22 +00:00
Thomas Goyne
0f605b358f Make the automation dialog resizable
Originally committed to SVN as r5668.
2011-09-28 21:38:18 +00:00
Thomas Goyne
5411a57b3c Add the command name for macros to the information popup in the automation dialog
Originally committed to SVN as r5666.
2011-09-28 19:52:37 +00:00
Thomas Goyne
dbca576d50 Require that macros defined in a single script have unique names
Originally committed to SVN as r5665.
2011-09-28 19:52:28 +00:00
Thomas Goyne
c632a662b2 Change the naming scheme for lua commands to 'automation/lua/[Script File Name]/[Macro Name]'
Originally committed to SVN as r5664.
2011-09-28 19:52:20 +00:00
Thomas Goyne
799c18e22d Remove unused includes in auto4_lua.cpp
Originally committed to SVN as r5663.
2011-09-28 19:52:11 +00:00
Thomas Goyne
1e13670c70 Improve error handling in LuaModuleLoader and don't keep trying to load modules after one has been found
Originally committed to SVN as r5662.
2011-09-28 19:52:02 +00:00
Thomas Goyne
d3ea9236cf Correct closing audio in FrameMain::OnSubtitlesOpen
Originally committed to SVN as r5661.
2011-09-28 19:51:53 +00:00
Thomas Goyne
77d02d269d Eliminate a use of VideoContext::Get in AudioMarkerProviderKeyframes
Originally committed to SVN as r5660.
2011-09-28 19:51:44 +00:00
Thomas Goyne
6bf4a95428 Add a subtitles save slot to AudioController which stores the audio URI in the subtitles
Originally committed to SVN as r5659.
2011-09-28 19:51:35 +00:00
Thomas Goyne
74ae9189a2 Set ?audio to the path to the currently open audio file
Originally committed to SVN as r5658.
2011-09-28 19:51:26 +00:00
Thomas Goyne
9fc0b33cdf Add opened audio files to the audio mru list
Originally committed to SVN as r5657.
2011-09-28 19:51:18 +00:00
Thomas Goyne
d863d4379b Implement Audio/Auto/Scroll option
Originally committed to SVN as r5656.
2011-09-28 19:51:09 +00:00
Thomas Goyne
976061747d Fix setting of filename when saving the subtitles
Originally committed to SVN as r5655.
2011-09-28 19:50:59 +00:00
Thomas Goyne
5a49abb2eb Fix bug in BaseGrid::GetSelection that resulted in row 0 always being selected
Originally committed to SVN as r5653.
2011-09-28 19:50:41 +00:00
Thomas Goyne
bb72ec980e Actually select the new line when a new dialogue line is added due to the user switching to the next line from the edit box
Originally committed to SVN as r5652.
2011-09-28 19:50:32 +00:00
Thomas Goyne
94998f4283 Update ths column widths in BaseGrid when the number of digits in the row number changes
Originally committed to SVN as r5651.
2011-09-28 19:50:24 +00:00
Thomas Goyne
b55ff3f803 Switch auto4lua to a transactional model which applies changes to the subtitle file only if a macro runs to completion without errors or the user cancelling. Significantly improves behavior when the user cancels and fixes a race condition caused by committing on threads other than the GUI thread.
Originally committed to SVN as r5650.
2011-09-28 19:50:14 +00:00
Thomas Goyne
28afc48ca5 Eliminate an uninitialized variable warning
Originally committed to SVN as r5649.
2011-09-28 19:50:06 +00:00
Thomas Goyne
d419c7a447 Implement the Automation menu
Originally committed to SVN as r5648.
2011-09-28 19:49:56 +00:00
Thomas Goyne
5bb5f146a7 Make the project context available to lua C functions so that they can use that instead of VideoContext::Get()
Originally committed to SVN as r5647.
2011-09-28 19:49:47 +00:00
Thomas Goyne
dfef9191f9 Move the creation of the progress dialog for the audio caches to AudioProvider and just pass the BackgroundRunner to the caches. This still isn't the right place to be creating it, but this removes the UI-dependency for both caches.
Originally committed to SVN as r5646.
2011-09-28 19:49:37 +00:00
Thomas Goyne
a9dc1f045d Remove "Config" from the name of ScriptConfigDialog and friends as they're used for more than just config, and clean up the implementations.
Originally committed to SVN as r5645.
2011-09-28 19:49:27 +00:00
Thomas Goyne
59d11f4cc4 Make it so auto4lua macros can have an IsActive function. Probably not very useful at the moment.
Originally committed to SVN as r5644.
2011-09-28 19:49:18 +00:00
Thomas Goyne
60ea67661a Do a better job of setting the module load path in LuaAssFile
Originally committed to SVN as r5643.
2011-09-28 19:49:09 +00:00
Thomas Goyne
8ba559b7f7 Clean up Automation4::ScriptManager
Originally committed to SVN as r5642.
2011-09-28 19:48:58 +00:00
Thomas Goyne
eec3d64221 Make automation macros standard commands and remove the Automation4::Feature base class as it's no longer a useful abstraction.
Originally committed to SVN as r5641.
2011-09-28 19:48:47 +00:00
Thomas Goyne
492a0d3046 Make Automation4::Script mostly pure abstract and clean up the implementation of LuaScript
Originally committed to SVN as r5640.
2011-09-28 19:48:37 +00:00
Thomas Goyne
c09259c93d Throw typed exceptions in automation rather than strings
Originally committed to SVN as r5639.
2011-09-28 19:48:28 +00:00
Thomas Goyne
6d0e44baad Use LocalScriptManager::Reload rather than looping over the scripts manually in the am/manager command
Originally committed to SVN as r5638.
2011-09-28 19:48:20 +00:00
Thomas Goyne
af9315f1aa Remove some lingering unused automation things in frame_main
Originally committed to SVN as r5637.
2011-09-28 19:48:11 +00:00
Thomas Goyne
f970508e67 Add the ability to unregister commands and clarify who owns command objects
Originally committed to SVN as r5636.
2011-09-28 19:48:02 +00:00
Thomas Goyne
8aca250fd0 Kill cmd::id and friends. It didn't work correctly as ids weren't stable and only VideoBox still used it
Originally committed to SVN as r5635.
2011-09-28 19:47:53 +00:00
Thomas Goyne
53b6765dd8 Redesign DialogProgress
Add agi::ProgressSink and agi::BackgroundRunner interfaces to libaegisub
which represent a generic progress sink and a thing which calls funtions
that need progress sinks. Make DialogProgress implement
agi::BackgroundRunner, invoking the passed function on a worker thread
and giving it a progress sink to update the dialog with.

Rewrite Automation4::ProgressSink, LuaThreadedCall and all related
classes to be based on agi::ProgressSink. Automation now simply uses
DialogProgress (although that's merely an implementation detail) and
adds a single method to route dialog opening from the worker thread to
the GUI thread.

Originally committed to SVN as r5634.
2011-09-28 19:47:40 +00:00
Thomas Goyne
5439c6dae6 Remove some old video options from default_config.json
Originally committed to SVN as r5633.
2011-09-28 19:47:31 +00:00
Thomas Goyne
f341a63f14 Delete all the unused things in MatroskaWrapper (i.e. most of it), fix some derpy things, and make it throw typed exceptions.
Originally committed to SVN as r5632.
2011-09-28 19:47:21 +00:00
Thomas Goyne
2ca9392942 Set more finely-grained commit types from LuaAssFile rather than always using COMMIT_NEW
Originally committed to SVN as r5631.
2011-09-28 19:47:12 +00:00
Thomas Goyne
08a61c7fd4 Refactor LuaAssFile's implementation
Switch to 1-based indices to match Lua rather than converting back and
forth all over the place.

Eliminate a bunch of duplicated code.

Fix a few memory leaks.

Automatically set an undo point at the end of a macro if there are any
uncommited changes.

Originally committed to SVN as r5630.
2011-09-28 19:47:03 +00:00
Thomas Goyne
df100fb5a5 Pass a project context to AssExportFilter::GetConfigDialogWindow so that export filters don't have to use things like AssFile::top and VideoContext::Get
Originally committed to SVN as r5629.
2011-09-28 19:46:53 +00:00
Thomas Goyne
9ce579e187 Document and clean up a bunch of exporter related things. Break some friendships, and add a getter for export filter names.
Originally committed to SVN as r5628.
2011-09-28 19:46:41 +00:00
Thomas Goyne
dfc18afd34 Replace custom karaoke parsing code in LuaAssFile with AssKaraoke
Originally committed to SVN as r5626.
2011-09-28 19:46:23 +00:00
Thomas Goyne
1329245a21 Clean up the automation dialog and don't let the user load the same script twice
Originally committed to SVN as r5625.
2011-09-28 19:46:14 +00:00
Thomas Goyne
53c0b6ff3a Clean up and document ScriptFactory, and add a function to get the full wildcard string for all registered automation engines
Originally committed to SVN as r5624.
2011-09-28 19:46:05 +00:00
Thomas Goyne
7680d6c246 Move the local script logic from FrameMain to a new LocalScriptManager
Originally committed to SVN as r5623.
2011-09-28 19:45:55 +00:00
Thomas Goyne
3029436a2d Drop some AS5-specific stuff in LuaAssfile
Originally committed to SVN as r5622.
2011-09-28 19:45:47 +00:00
Thomas Goyne
0a91be1c7c Unconditionally enable building automation even if there are no enabled engines as there isn't really any reason not to and the defines uglify the code.
Originally committed to SVN as r5621.
2011-09-28 19:45:35 +00:00
Thomas Goyne
66e826edb3 Split LuaProgressSink into its own cpp file to cut down on the bloatedness of auto4_lua.cpp
Originally committed to SVN as r5620.
2011-09-28 19:45:25 +00:00
Thomas Goyne
0b6ef72242 Rewrite LuaScriptReader, making it simpler and adding support for more charsets
Originally committed to SVN as r5619.
2011-09-28 19:45:16 +00:00
Thomas Goyne
432abc309b Remove WITH_OLD_HUNSPELL. 1.2.0 is four years old and the configure script doesn't even support older versions that would require WITH_OLD_HUNSPELL
Originally committed to SVN as r5618.
2011-09-28 19:45:07 +00:00
Thomas Goyne
4ec507f814 Clean up SubtitleFormat
Document all of the SubtitleFormat methods.

Add default implementations of CanReadFile and CanWriteFile that check
against the appropriate wildcard list.

Clean up and simplify a lot of very odd code.

Throw typed exceptions in all subtitle readers rather than strings.

Originally committed to SVN as r5617.
2011-09-28 19:44:53 +00:00
Thomas Goyne
156885b56d Make AudioTimingControllerDialogue operate on a project context
Originally committed to SVN as r5616.
2011-09-28 19:44:44 +00:00
Thomas Goyne
a25c5c1909 Rewrite the subtitles edit control's syntax highlighting
Simplify and clean up the parsing code to better represent how VSFilter
actually handles many odd edge cases as well as making it significantly
faster.

Use an enum for syntax style IDs rather than magic numbers.

Add styles for comments, draw mode and karaoke templater variables
rather than reusing other styles and move some hardcoded style
information to the config file.

Operate on the utf-8 representation of the edit box text rather than a
wxString, as it's both faster and simpler.

Originally committed to SVN as r5615.
2011-09-28 19:44:34 +00:00
Thomas Goyne
67ab06e830 Add an optional argument to AssFile::Commit which indicates that only a single line was changed. Currently used only to cut down on file copies when coalescing.
Originally committed to SVN as r5614.
2011-09-28 19:44:24 +00:00
Thomas Goyne
c936306593 Rewrite nearly everything related to karaoke
Move most karaoke parsing/serializing/editing code to AssKaraoke rather
than being scattered all over the place, and add much better support for
non-karaoke override tags and comments.

Add a karaoke timing controller.

Redesign the karaoke syllable split/join interface to have a single mode
from which both splitting and joining can be done rather than separate
split and join modes.

Only show the karaoke split/join bar when karaoke mode is enabled.

Closes #886, #987, #1190.

Originally committed to SVN as r5613.
2011-09-28 19:44:07 +00:00
Thomas Goyne
cc147d1660 Eliminate uses of c_str made unnecessary by changed to wxString::Format in wx 2.9
Originally committed to SVN as r5612.
2011-09-28 19:43:48 +00:00
Thomas Goyne
d990bbbb99 Eliminate all unnecessary uses of L and _T
Originally committed to SVN as r5611.
2011-09-28 19:43:11 +00:00
Thomas Goyne
088976554c Fix non-precomp-header compilation
Originally committed to SVN as r5602.
2011-09-15 06:12:26 +00:00
Thomas Goyne
d70fb7fe2d Fix compilation errors
Originally committed to SVN as r5601.
2011-09-15 06:03:13 +00:00
Thomas Goyne
683dd6c0a9 Kill BaseGrid::SelectVisible
Originally committed to SVN as r5600.
2011-09-15 05:17:43 +00:00
Thomas Goyne
11c40188c2 Eliminate some old selection code in BaseGrid
Originally committed to SVN as r5599.
2011-09-15 05:17:36 +00:00
Thomas Goyne
05da23b22f Mostly detangle the edit box from the subtitles grid
Originally committed to SVN as r5598.
2011-09-15 05:17:29 +00:00
Thomas Goyne
3c4191e649 Kill SubtitlesGrid::SetSubsToVideo
Originally committed to SVN as r5597.
2011-09-15 05:17:22 +00:00
Thomas Goyne
0c4eb020a4 Rewrite the shift times dialog, detangling it from the grid and making it modeless, and add support for characters outside the local charset in the shift history file path. Closes #1269.
Originally committed to SVN as r5596.
2011-09-15 05:17:14 +00:00
Thomas Goyne
1f095b0a01 Remove the SubsEditBox from the context in favor of the SubsEditTextCtrl as it was the only public member of SubsEditBox
Originally committed to SVN as r5595.
2011-09-15 05:17:07 +00:00
Thomas Goyne
d022d2ae56 Eliminate pointless (and slow) setting of the edit box to its current text
Originally committed to SVN as r5594.
2011-09-15 05:17:00 +00:00
Thomas Goyne
5b3b821696 Always keep the active line visible in the grid
Originally committed to SVN as r5593.
2011-09-15 05:16:54 +00:00
Thomas Goyne
1cc5d4001a Rewrite the selection dialog, detangling it from SubtitlesGrid and making it modeless
Originally committed to SVN as r5592.
2011-09-15 05:16:47 +00:00
Thomas Goyne
584f36a744 Detangle the spellchecker dialog from the subtitles grid, make it modelss, and fix a lot of edges cases
Originally committed to SVN as r5591.
2011-09-15 05:16:41 +00:00
Thomas Goyne
934a5b24eb Refine the commit types
Switch to a bitmask with much more finely-grained information about what
changed in the commit, fixing a few potential correctness problems and
significantly improving the performance of several scenarios where commits
are spammed very frequently.

Originally committed to SVN as r5590.
2011-09-15 05:16:32 +00:00
Thomas Goyne
3f05fe6b3e Add support for labels in the audio display
Originally committed to SVN as r5589.
2011-09-15 05:16:26 +00:00
Thomas Goyne
3e708eab10 Slightly simplify parts of AudioDisplay
Originally committed to SVN as r5588.
2011-09-15 05:16:18 +00:00
Thomas Goyne
e5d660e281 Hide visual tools while video is playing. Closes #1336.
Originally committed to SVN as r5586.
2011-09-02 00:03:40 +00:00
Thomas Goyne
182b57bd0f Fix compilation with precompiled headers off
Originally committed to SVN as r5579.
2011-08-31 04:23:18 +00:00
Thomas Goyne
d82e2bb496 Use wxEVT_CONTEXT_MENU for context menus rather than right button down so that the context menu key works correctly. Updates #1238.
Originally committed to SVN as r5578.
2011-08-31 04:17:37 +00:00
Thomas Goyne
1c4410bb87 Make middle-click on the audio display seek the video to the clicked on time
Originally committed to SVN as r5577.
2011-08-31 04:17:31 +00:00
Thomas Goyne
02d4ee0cec Revert when the dialogue timing controller is created to avoid broken behavior when leaving karaoke mode
Originally committed to SVN as r5576.
2011-08-31 04:17:24 +00:00
Thomas Goyne
7155ace1d9 Fix merge error in ass_file.h
Originally committed to SVN as r5573.
2011-08-27 07:28:04 +00:00
Thomas Goyne
0de3ce42d5 Speed up BlockCache::Age somewhat
Originally committed to SVN as r5572.
2011-08-27 06:52:49 +00:00
Thomas Goyne
03d7849d12 Significantly speed up grid painting, especially when only some columns need to be repainted
Originally committed to SVN as r5571.
2011-08-27 06:52:42 +00:00
Thomas Goyne
b8a1674c27 Remove some cruft from ScintillaTextCtrl and make SetUnicodeStyling significantly faster
Originally committed to SVN as r5570.
2011-08-27 06:52:35 +00:00
Thomas Goyne
ccf9f64818 Make Assfile::SetScriptInfo slightly less slow
Originally committed to SVN as r5569.
2011-08-27 06:42:10 +00:00
Thomas Goyne
e12bcc6aef Bind VideoContext::OnFileSave to the file save signal rather than the commit signal
Originally committed to SVN as r5568.
2011-08-27 06:42:03 +00:00
Thomas Goyne
b14b2eceea Update the Makefile and vc2010 project
Originally committed to SVN as r5567.
2011-08-27 06:37:03 +00:00
Thomas Goyne
2006995645 Revert pending changes when audio is opened to fix problems with stale data
Originally committed to SVN as r5566.
2011-08-27 06:30:56 +00:00
Thomas Goyne
a45b971b3a Redesign ToggleBitmap to operate on a command
Originally committed to SVN as r5565.
2011-08-27 06:30:49 +00:00
Thomas Goyne
3ecfd34bd3 Convert the audio toolbar over to the new dynamic toolbar system
Originally committed to SVN as r5564.
2011-08-27 06:30:42 +00:00
Thomas Goyne
fc0db4fc36 Convert the VideoDisplay context menu over to the new menu system
Originally committed to SVN as r5563.
2011-08-27 06:30:35 +00:00
Thomas Goyne
e2f464c94f Add commands for the video display context menu items
Originally committed to SVN as r5562.
2011-08-27 06:30:29 +00:00
Thomas Goyne
ca6d5b1f3e Rearrange VideoDisplay's privates to make them a bit less randomly ordered and switch from auto_ptr to scoped_ptr
Originally committed to SVN as r5561.
2011-08-27 06:30:23 +00:00