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
75ae053958
Make some stuff const
...
Originally committed to SVN as r6590.
2012-03-20 00:39:10 +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
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
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
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
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
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
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
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
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
01646d7cf4
Remove StandardPaths::DecodePathMaybeRelative, as it's been deprecated forever
...
Originally committed to SVN as r6232.
2012-01-08 01:34:37 +00:00
Thomas Goyne
15d49fb655
Revamp AssFile::AddLine and related functions to eliminate the statics and hopefully make it less brittle
...
Originally committed to SVN as r6231.
2012-01-08 01:34:30 +00:00
Thomas Goyne
8fdd5d987e
Remove the encoding parameter from AssFile::SaveMemory, as it only supports utf-8, and simplify the implementation
...
Originally committed to SVN as r6220.
2012-01-08 01:33:19 +00:00
Thomas Goyne
0fd475031a
Make default script resolution customizable
...
Originally committed to SVN as r6205.
2012-01-08 01:04:37 +00:00
Thomas Goyne
7adbe07b4e
Silence a bunch of PREFast warnings
...
Originally committed to SVN as r6162.
2011-12-26 22:20:49 +00:00
Thomas Goyne
95ad8c1fba
Fix the single-line-commit optimization
...
Originally committed to SVN as r6138.
2011-12-22 21:31:18 +00:00
Thomas Goyne
71345af81a
Overload operator int() on AssTime and remove GetMS/SetMS
...
Originally committed to SVN as r6123.
2011-12-22 21:28:51 +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
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
2e5cbf079e
Update ?script after save as
...
Originally committed to SVN as r5822.
2011-11-06 17:18:14 +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
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
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
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
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
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
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
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
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
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
ccf9f64818
Make Assfile::SetScriptInfo slightly less slow
...
Originally committed to SVN as r5569.
2011-08-27 06:42:10 +00:00
Thomas Goyne
1cacc33d2d
Simplify version.cpp
...
Originally committed to SVN as r5526.
2011-07-27 22:52:37 +00:00
Thomas Goyne
9ec1e1ba79
Explicitly set Collisions to the default (Normal) in the default file so that opening and closing the properties dialog on the default file is a no-op
...
Originally committed to SVN as r5250.
2011-01-20 05:57:46 +00:00
Thomas Goyne
a8ebc1e456
Make AssFile handle autosaving on every commit itself rather than going through FrameMain
...
Originally committed to SVN as r5247.
2011-01-20 05:57:23 +00:00
Thomas Goyne
7210ea17d8
Add pre-save signal to AssFile and move most of the logic in FrameMain::SaveSubtitles to slots for this signal
...
Originally committed to SVN as r5207.
2011-01-16 07:16:40 +00:00
Thomas Goyne
59300cbc27
Add a subtitle open signal and move most of the logic in FrameMain::LoadSubtitles to slots for this signal.
...
Originally committed to SVN as r5206.
2011-01-16 07:16:33 +00:00
Thomas Goyne
6d2b941e76
Rework how committing changes works
...
Rather than everything having to separately commit changes to the ass
and then tell the subs grid to notify various parts of Aegisub about the
changes, committing the AssFile now triggers an event which objects
listen for.
AssFile::Commit now also has an argument to indicate what sorts of
changes were made to the file. For now these types are very broad.
Originally committed to SVN as r4901.
2010-12-07 19:09:28 +00:00
Thomas Goyne
7d2c7c5881
Don't add garbage AssEntries for blank lines in the file. Fixes some issues with sorting lines.
...
Originally committed to SVN as r4801.
2010-10-11 20:06:04 +00:00
Thomas Goyne
84b8877d1d
Clean up AssFile::Load, eliminating some redundant checks, and fixing a few situations where the undo stack could be left in an inconsistant state
...
Originally committed to SVN as r4785.
2010-09-15 02:46:19 +00:00
Karl Blomster
9108ea9b00
Don't try to coalesce undo operations when there aren't any undo operations to coalesce with. Fixes a crash when opening .txt files.
...
Originally committed to SVN as r4784.
2010-09-15 01:00:18 +00:00
Thomas Goyne
46be23073e
Fix a few gcc warnings
...
Originally committed to SVN as r4722.
2010-08-02 20:25:29 +00:00
Thomas Goyne
c10e9e3a5b
Make video and audio providers throw typed exceptions.
...
Don't display error messages and try other providers when the user
cancels loading a file.
Remove files from the MRU lists if they can't be found.
Closes #717 .
Originally committed to SVN as r4717.
2010-08-02 06:32:01 +00:00