Thomas Goyne
10f0f5fc7b
Kill AssFile::AddComment and just add it when writing the file
2012-11-10 18:05:55 -08:00
Thomas Goyne
6c2ccd8639
Don't display an error when opening read-only formats
2012-10-29 06:29:45 -07:00
Thomas Goyne
e44c47c863
Remove $Id$ markers since git doesn't support them
2012-10-25 17:39:49 -07:00
Thomas Goyne
ff6394c95e
Throw only real exceptions from subtitle io stuff
2012-10-25 17:39:49 -07:00
Thomas Goyne
56ced22c63
Mark autosave files with the current date and time
...
This makes it so that autosave files are (almost) never overwritten, so
that opening an old version of the file won't result in the autosaves
from a newer version being replaced.
Clean up old autosave files on startup to limit the total to 100
files/100 MB. Maybe make this configurable in the future?
Closes #1155 .
2012-10-25 07:50:31 -07:00
Thomas Goyne
9547bc4ef2
Move some stuff from AssFile::Load to FrameMain::LoadSubtitles
...
This is still not a very good place for it, but AssFile really shouldn't
be mucking around in global program state.
2012-10-16 09:53:28 -07:00
Thomas Goyne
a53432736c
Get wxMessageBox out of AssFile
2012-10-16 09:52:47 -07:00
Thomas Goyne
33dd0abc7f
Kill AssFile::GetWildcardList
...
It did not actually simplify or clarify any of the code that called it.
2012-10-16 09:52:47 -07:00
Thomas Goyne
c7fd04a739
Rename ASS -> Ass in symbol names
...
Most types and functions used Ass, but a decent number used ASS, so make
them consistent.
2012-10-16 09:52:19 -07:00
Thomas Goyne
006f820aea
Move ass parsing logic from AssFile to ASSSubtitleFormat
2012-10-16 09:52:19 -07:00
Thomas Goyne
a1fad1f947
Drop support for ASS2
...
It is very unlikely that anyone has ever actually used ASS2 for
anything, and in practice it was not usable anyway as the bottom margin
was always either ignored or blindly overwritten.
2012-10-12 14:54:08 -07:00
Thomas Goyne
a0c92f83f9
Fix some PVS-Studio warnings
2012-10-12 14:51:30 -07:00
Thomas Goyne
11a4ede9a0
Add Layer to the things lines can be sorted by
...
Originally committed to SVN as r6939.
2012-07-23 00:44:44 +00:00
cantabile
597b92bb7f
Silence three gcc warnings ("ambiguous else")
...
Originally committed to SVN as r6799.
2012-05-15 14:06:49 +00:00
Thomas Goyne
bc74dfc33b
Update the video matrix tagging scheme
...
Write the color range and color space used to convert video to RGB to
the YCbCr Matrix field, or None if no non-RGB video was opened. See
http://code.google.com/p/xy-vsfilter/issues/detail?id=91 for related
discussion.
Originally committed to SVN as r6762.
2012-05-11 14:38:44 +00:00
Thomas Goyne
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
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
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