Commit graph

2466 commits

Author SHA1 Message Date
Thomas Goyne
50d1b3ed2d Rewrite the ass parsing code in visual_tool.cpp, eliminating a lot of repeated code and making it better at finding the correct values.
Originally committed to SVN as r4573.
2010-06-24 01:23:43 +00:00
Amar Takhar
4bb8e8ea22 Merge r4550: remove wx headers.
Originally committed to SVN as r4572.
2010-06-23 13:20:24 +00:00
Thomas Goyne
a40b9c4b91 Simplify and speed up AssFile's copy constructor and assignment operator.
Originally committed to SVN as r4565.
2010-06-22 00:03:33 +00:00
Thomas Goyne
7958f85ef3 Remove pointless call to AssDialogue::SetEntryData in AssFile::CompressForStack; makes pushing files onto the undo stack about 50% faster
Originally committed to SVN as r4564.
2010-06-22 00:03:28 +00:00
Thomas Goyne
5ed401d23d Use vector<int> instead of vector<bool> for tracking which rows are selected. Makes undo roughly twice as fast.
Originally committed to SVN as r4563.
2010-06-22 00:03:22 +00:00
Thomas Goyne
358b2734da Fix crash when pasting over
Originally committed to SVN as r4562.
2010-06-22 00:03:16 +00:00
Thomas Goyne
8756dc1800 Add copy constructor to AssDialogue and use it in Clone
Originally committed to SVN as r4561.
2010-06-22 00:03:11 +00:00
Thomas Goyne
fe9aa56d10 Remove pointless IntSwap function from utils.h
Originally committed to SVN as r4560.
2010-06-22 00:03:03 +00:00
Niels Martin Hansen
e5eb91a269 * Fix bug in SRT parsing: In some cases a blank line too much is counted.
* Make SRT no longer coalesce line breaks, Aegisub will now write SRT files with blank lines in subtitles.
Updates #1213.

Originally committed to SVN as r4558.
2010-06-20 19:42:13 +00:00
Niels Martin Hansen
2fc8420ee9 Rewrite SRT parsing to use more flexible algorithm, allow more freeform files. Updates #1213.
Originally committed to SVN as r4557.
2010-06-20 19:07:43 +00:00
Niels Martin Hansen
4c01f9a36b Declare a SubtitleFormatParseError exception, its ancestry might not be final yet. (I'm thinking it needs a file format error class as base, which in turn inherits from agi::InvalidInput.) Updates #1213 in preparation for the actual patch.
Originally committed to SVN as r4556.
2010-06-20 19:04:58 +00:00
Niels Martin Hansen
5bd0981a72 Make AssFile::Load catch agi::Exception and report it properly. The catching of reading/parsing errors probably doesn't really belong there, but just making things work for now. Updates #1213 in preparation for the actual patch.
Originally committed to SVN as r4555.
2010-06-20 19:03:05 +00:00
Thomas Goyne
363198b2fa Add missing config:: in windows-specific code and move appname setting back before config file loading
Originally committed to SVN as r4549.
2010-06-18 07:23:17 +00:00
Thomas Goyne
cfa1758d2a Improve the handling of selected features in the vector clip tool and moderately improve performance
Originally committed to SVN as r4548.
2010-06-18 07:14:23 +00:00
Thomas Goyne
227f6b1d69 In the vector clip tool, draw the line to be inserted between the right points when there are multiple paths in the clip
Originally committed to SVN as r4547.
2010-06-18 07:14:17 +00:00
Thomas Goyne
6830fbe1ba Fix bug where the color spectrum sometimes would not repaint when it changed
Originally committed to SVN as r4546.
2010-06-18 07:14:11 +00:00
Thomas Goyne
3376a2d76a Always repaint the video display when the mouse enters it if visual tools are only shown on mouseover
Originally committed to SVN as r4545.
2010-06-18 07:14:06 +00:00
Thomas Goyne
961365dfff Make rotation and scale tools set all selected lines rather than just the active one
Originally committed to SVN as r4544.
2010-06-18 07:14:00 +00:00
Thomas Goyne
afec51c4ed Include config.h in lagi_pre.h so that the conditional inclusion of sys/time.h actually works
Originally committed to SVN as r4543.
2010-06-18 06:59:55 +00:00
Amar Takhar
8ee9737b6f Move mru,opt objects out of the main singleton and into a global config:: namespace. With exception of the log object these are initialised during startup to ensure they are initalised after the log object.
Originally committed to SVN as r4538.
2010-06-18 02:23:27 +00:00
Thomas Goyne
75bd20a6dd Fix the rest of the build errors when not using precompiled headers
Originally committed to SVN as r4530.
2010-06-17 00:23:44 +00:00
Thomas Goyne
61138e9b5d Add configure check for sys/time.h
Originally committed to SVN as r4529.
2010-06-16 07:49:35 +00:00
Thomas Goyne
d6b68dfb25 Kill VideoContext::Refresh's arguments; one has never actually done anything and the other is the same in all places where Refresh is called.
Originally committed to SVN as r4528.
2010-06-16 06:20:39 +00:00
Thomas Goyne
faf2e562cd Rename FrameMain::SubsBox to SubsGrid for consistency with the rest of Aegisub.
Originally committed to SVN as r4527.
2010-06-16 06:20:33 +00:00
Thomas Goyne
43f3502043 Eliminate double inclusion of frame_main.h and remove #pragma once
Originally committed to SVN as r4526.
2010-06-16 06:20:27 +00:00
Thomas Goyne
392ce99083 Kill AssDialogue::UpdateData, which last had a non-empty body 3.5 years ago
Originally committed to SVN as r4525.
2010-06-16 06:20:19 +00:00
Thomas Goyne
8086fae633 Document AssFile's public methods
Originally committed to SVN as r4524.
2010-06-16 06:20:14 +00:00
Thomas Goyne
166c95975b Templatize VariableData's getters and setters
Originally committed to SVN as r4523.
2010-06-16 06:20:06 +00:00
Thomas Goyne
c7ea710267 Use VideoContext::JumpToTime where appropriate
Originally committed to SVN as r4522.
2010-06-16 06:19:49 +00:00
Niels Martin Hansen
0e155767ae Add missing includes to MSVC libaegisub project
Originally committed to SVN as r4519.
2010-06-14 21:35:57 +00:00
Karl Blomster
fec1f47501 Make configure not break on testing for newer ffmpeg's by hardcoding a #define into the test program. This is pretty dumb but I don't know about autotools to fix it properly and it's not like it matters. Why is it compiling C code as extern "C" with a C++ compiler, anyway?
Originally committed to SVN as r4516.
2010-06-14 21:11:01 +00:00
Karl Blomster
0061a58210 Fix the ffmpeg configure test so it doesn't try to use a function that has been deprecated for well over a fucking year and a half (since before 0.5, in fact).
Originally committed to SVN as r4515.
2010-06-14 20:55:35 +00:00
Thomas Goyne
5338a60cdb Fix compilation errors when not using precompiled headers
Originally committed to SVN as r4511.
2010-06-14 19:26:27 +00:00
Amar Takhar
340cc1d7f1 Fix compilation with precompiled headers disabled.
Originally committed to SVN as r4504.
2010-06-14 18:02:58 +00:00
Amar Takhar
6989daa086 Merge r4497 to unbreak the build
Originally committed to SVN as r4498.
2010-06-13 06:21:43 +00:00
Amar Takhar
461616a47f Hook up default_path.json to the build
Originally committed to SVN as r4491.
2010-06-13 01:43:19 +00:00
Amar Takhar
f497144525 Fix syntax errors
Originally committed to SVN as r4490.
2010-06-13 01:42:50 +00:00
Amar Takhar
d8a9bac4b0 Handle the lack of a pre-existing config file.
Originally committed to SVN as r4489.
2010-06-13 01:29:32 +00:00
Karl Blomster
0a590aea04 Add the __STDC_CONSTANT_MACROS define to the ffms2 CFLAGS. Fixes compilation with newer ffmpeg's.
Originally committed to SVN as r4488.
2010-06-12 14:52:13 +00:00
Karl Blomster
ea6dac551e Update ffms2 to r312. Fixes a bunch of rather critical bugs.
Originally committed to SVN as r4487.
2010-06-12 14:51:33 +00:00
Amar Takhar
60b9e5dee6 Define _X86_ so univeralchardet builds properly, this eventually needs to be fixed to use the autodetection code already in configure.in
Originally committed to SVN as r4486.
2010-06-12 07:04:46 +00:00
Amar Takhar
cbdb906da0 Build universalchardet before libaegisub.
Originally committed to SVN as r4485.
2010-06-12 07:04:12 +00:00
Amar Takhar
b1a0142c93 Fix r4483, close conditionals (i was a bit zealous in cutting.)
Originally committed to SVN as r4484.
2010-06-12 06:51:25 +00:00
Amar Takhar
74905e5f4d FFMPEG A/V providers were removed a long time ago, also add OSS as the alternative global before PA.
Originally committed to SVN as r4483.
2010-06-12 05:50:27 +00:00
Amar Takhar
cd62441b70 Fix some status outputs, updates #1170, requires merging
Originally committed to SVN as r4482.
2010-06-12 05:48:02 +00:00
Amar Takhar
c95eb3fcce universalchardet is no longer optional.
Originally committed to SVN as r4481.
2010-06-12 05:29:01 +00:00
Karl Blomster
62b63ca5b6 Fix a missing property sheet in the libaegisub vcproj
Originally committed to SVN as r4480.
2010-06-11 23:45:23 +00:00
Thomas Goyne
ccdc863496 Fix copy/paste error in r4244
Originally committed to SVN as r4479.
2010-06-11 02:25:40 +00:00
Thomas Goyne
40da39e1c8 Make updating the subtitle preview window roughly 50% faster
Originally committed to SVN as r4478.
2010-06-11 02:25:34 +00:00
Thomas Goyne
4ef9d41601 Don't require that subtitles passed to SubtitlesProvider::LoadSubtitles be a copy that can be deleted
Originally committed to SVN as r4477.
2010-06-11 02:25:28 +00:00
Thomas Goyne
72cbf4939f Fix flickering in color picker
Originally committed to SVN as r4476.
2010-06-11 02:25:23 +00:00
Thomas Goyne
8c8e668758 Only include libresrc.h once rather than once per file packed
Originally committed to SVN as r4475.
2010-06-11 02:25:18 +00:00
Thomas Goyne
de974fb723 Cast the correct parameter when ICONV_POSIX is defined
Originally committed to SVN as r4474.
2010-06-11 02:25:13 +00:00
Thomas Goyne
612b583e2b Move cajun includes into the cpp files rather than headers so that only files in libaegisub include them.
Originally committed to SVN as r4473.
2010-06-11 02:25:07 +00:00
Thomas Goyne
c290b6b811 Silence some prefast warnings
Originally committed to SVN as r4472.
2010-06-11 02:24:59 +00:00
Amar Takhar
bc40eeb827 Don't use a wxChar for exception messages.
Originally committed to SVN as r4471.
2010-06-10 04:52:47 +00:00
Amar Takhar
2c703a3baa Remove instances of ^USER and swap them with ^CONFIG, ^USER will still exist but won't be in the default config. Also add 'last opened' paths.
Originally committed to SVN as r4470.
2010-06-09 23:45:05 +00:00
Thomas Goyne
d278c99652 Make the color picker dialog update the color instantly when used from the style editor, rather than waiting for the dialog to be closed, and revert if the dialog is cancelled. Updates #355.
Originally committed to SVN as r4469.
2010-06-09 08:14:50 +00:00
Amar Takhar
ea577f8245 Re-work types.h for the second time, this is most likely not the final version, it's difficult to figure out a solution that makes the most sense when most of the code hasn't been written/moved over yet.
Originally committed to SVN as r4468.
2010-06-09 02:07:43 +00:00
Amar Takhar
9a3e1c58f0 Use an std::string for now when printing messages.
Originally committed to SVN as r4467.
2010-06-09 02:06:37 +00:00
Amar Takhar
3516b4ce74 Add a vsprops file to bring in include files for iconv, and in the future other contrib headers.
Originally committed to SVN as r4466.
2010-06-09 01:11:38 +00:00
Amar Takhar
931cc7f461 * Remove all instances of wxLogDebug and replace them with LOG_W, LOG_D, LOG_E and LOG_D_IF as required.
* Add LOG_(D|W|I)_IF for conditional logging.

Originally committed to SVN as r4465.
2010-06-08 23:21:39 +00:00
Amar Takhar
653ce8b13d Fix misspelled option name
Originally committed to SVN as r4464.
2010-06-08 12:07:56 +00:00
Thomas Goyne
f361d1a67b Add support for rendering vector clips with multiple 'm' commands.
Originally committed to SVN as r4463.
2010-06-08 06:09:19 +00:00
Thomas Goyne
c7da8d9f61 Store OptionValues used by VideoContext
Originally committed to SVN as r4462.
2010-06-08 06:09:13 +00:00
Thomas Goyne
a12ec002c6 Fix crash when framestepping caused by an incorrect option name.
Originally committed to SVN as r4461.
2010-06-08 06:09:08 +00:00
Thomas Goyne
ae099a3363 Vector clip tool always needs to repaint in modes 1-4.
Originally committed to SVN as r4460.
2010-06-08 06:09:02 +00:00
Thomas Goyne
b867eec7f3 Make the vector clip visual tool use vertex arrays rather than immediate mode to render the spline
Originally committed to SVN as r4458.
2010-06-07 07:24:43 +00:00
Thomas Goyne
fae2af36fc Only draw the line to the cursor in the rotatez tool if the cursor is over the video display.
Originally committed to SVN as r4457.
2010-06-07 07:24:37 +00:00
Thomas Goyne
83e35ac63d Only rerender the video display on mouse events if display will actually change
Originally committed to SVN as r4456.
2010-06-07 07:24:30 +00:00
Thomas Goyne
1b27b77ac3 Add glext.h to the precompiled header
Originally committed to SVN as r4455.
2010-06-07 07:24:25 +00:00
Thomas Goyne
303f4990a5 Update glext.h to a version that isn't four years old
Originally committed to SVN as r4454.
2010-06-07 07:24:18 +00:00
Amar Takhar
ad0241e3df Add default_menu.json for safe keeping, I'm not sure if this is the final format.. whatever it ends up being this will be close.
Originally committed to SVN as r4453.
2010-06-07 06:40:19 +00:00
Amar Takhar
d8f5d3bff0 Sigh, revert r4451, I checked this before I comitted but the reason it worked was due to a typo (in this case failure was what i was looking for): to do the const check the values must be initialised otherwise (all/most?) compilers will ignore keywords in a signature check unless you actually try to give it a real value.
Originally committed to SVN as r4452.
2010-06-06 03:24:01 +00:00
Amar Takhar
576d7dd8cc Unlike the other tests the iconv const check is just looking for the actual function signature it doesn't use it, we don't need to initialise anything..
Originally committed to SVN as r4451.
2010-06-06 03:11:41 +00:00
Amar Takhar
059a554d95 Include ../config.h to get AGI_ICONV_CONST from acconf.h.
Originally committed to SVN as r4450.
2010-06-06 03:01:04 +00:00
Thomas Goyne
b49ea0af6f Conditionally const_cast source pointers passed to iconv to avoid invalid cast warnings
Originally committed to SVN as r4449.
2010-06-06 02:53:02 +00:00
Amar Takhar
aa895f9a26 Follow previous conventions and change ICONV_CONST to AGI_ICONV_CONST as wx' defines ICONV_CONST.
Originally committed to SVN as r4448.
2010-06-06 02:46:36 +00:00
Amar Takhar
b249faf6ce Use uintptr_t which is guaranteed to fit a pointer unlike int.
Originally committed to SVN as r4447.
2010-06-06 02:41:04 +00:00
Amar Takhar
4d9ff8d626 * Set ICONV_CONST to 1 if iconv is const or not, aparrantly this differs between versions (annoying!)
* Remove -fpermissive, this was required long ago but now there are only a couple of trivial fixes to make.

Originally committed to SVN as r4446.
2010-06-06 02:40:29 +00:00
Amar Takhar
2aeb0bdffb Sigh, -ansi isn't the solution since other compilers may define 'unix', for now the namespace has been called u_nix, hopefully this is safe but who knows...
Originally committed to SVN as r4445.
2010-06-06 02:32:50 +00:00
Amar Takhar
acc9e53714 Remove stray ;'s
Originally committed to SVN as r4444.
2010-06-05 23:44:07 +00:00
Amar Takhar
b01855ecbd Add -ansi to CPPFLAGS which stops GCC from being stupid and defining unprefixed pp macros (such as "unix"), while i'm here add -pedantic
Originally committed to SVN as r4443.
2010-06-05 23:42:49 +00:00
Thomas Goyne
3fbdf5b7e5 Make the vector clip tool mask based on winding number so that the masking matches VSFilter's clipping.
Originally committed to SVN as r4442.
2010-06-05 22:40:16 +00:00
Niels Martin Hansen
ff34a08afd Make update checker use a compile-time list of tags to determine the appropriate updates to list, instead of a hard-coded OS check. The list of accepted tags is defined by the UPDATE_CHECKER_ACCEPT_TAGS macro. If this macro is undefined, the update checker will still compile, but will reject all updates with tags.
Updates #1132.

Originally committed to SVN as r4440.
2010-06-05 20:16:30 +00:00
Amar Takhar
2d9eee4ea9 Add struct tm which mimics the struct on unix. Also setup the types file into seperate namespaces for clarity. The corrosponding change to windows/utils.cpp snuck into r4437.
Originally committed to SVN as r4438.
2010-06-05 18:17:55 +00:00
Amar Takhar
1a7052040a Remove useless whitespace, I need to setup msvc to disable all it's auto-indentation features which are terrible.
Originally committed to SVN as r4437.
2010-06-05 18:16:16 +00:00
Amar Takhar
1c3f6ed111 Remove rpath hardcoding it's no longer needed.
Originally committed to SVN as r4434.
2010-06-04 13:04:50 +00:00
Amar Takhar
abe6c734f4 Add dependency on iconv.
Originally committed to SVN as r4433.
2010-06-04 13:01:31 +00:00
Amar Takhar
083f1175a6 Remove iconv library dependency as this is brought in from libaegisub.
Originally committed to SVN as r4432.
2010-06-04 12:59:49 +00:00
Thomas Goyne
eff4dcf404 Fix might-as-well-be-inifinite loop in VisualToolVectorClip
Originally committed to SVN as r4431.
2010-06-04 03:08:10 +00:00
Thomas Goyne
38d922c57a Remove time-consuming reparsing of the line in VisualTool::SetOverride
Originally committed to SVN as r4430.
2010-06-04 03:08:04 +00:00
Thomas Goyne
88f6bca9d7 Make ASS tag parsing ~50% faster.
Originally committed to SVN as r4429.
2010-06-04 03:07:58 +00:00
Thomas Goyne
f001651865 Replace AssDialogueBlock::GetAsOverride etc. with dynamic_cast
Originally committed to SVN as r4428.
2010-06-04 03:07:52 +00:00
Thomas Goyne
fe65f778b1 Don't set the line color for every visual feature as it's always the same
Originally committed to SVN as r4427.
2010-06-04 03:07:46 +00:00
Thomas Goyne
2659b79036 Update the edit box less often during visual tool drags, making drags ~20% faster.
Originally committed to SVN as r4426.
2010-06-04 03:07:41 +00:00
Thomas Goyne
625ce943f5 Cache OptionValue objects used by the video display
Originally committed to SVN as r4425.
2010-06-04 03:07:33 +00:00
Thomas Goyne
3d04db9e90 Fix build error when wx was not built with wxUSE_STL
Originally committed to SVN as r4424.
2010-06-03 20:54:46 +00:00
Thomas Goyne
b6d29443a3 Move most character set conversion code to libaegisub and make everything use the new conversion functionality.
Originally committed to SVN as r4423.
2010-06-03 20:32:25 +00:00
Thomas Goyne
7337a11745 Explicitly set the charset to binary when loading subtitles from the video
Originally committed to SVN as r4422.
2010-06-03 20:32:17 +00:00