Commit Graph

34 Commits

Author SHA1 Message Date
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
Thomas Goyne fde4a7815d Make the subtitle edit box auto-commit all changes
This happens to fix most of the undo issues, as it's now much harder to
have uncommitted changes to the file.

Closes #355 and #586.

Originally committed to SVN as r4699.
2010-07-20 03:11:11 +00:00
Thomas Goyne 4a8abae3a3 Kill options.h and options.cpp, which have been empty for a while
Originally committed to SVN as r4676.
2010-07-12 21:49:48 +00:00
Thomas Goyne 002aad0b29 Don't call CompressForStack on copied AssFiles as the parsed data isn't copied in the first place.
Originally committed to SVN as r4671.
2010-07-11 03:31:19 +00:00
Thomas Goyne 2e5dc176db Rewrite Undo/Redo code
Make the undo and redo stacks non-static members of AssFile, making it
theoretically possible to have multiple open AssFiles with working undo.

Slightly improve tracking of whether the file is modified: saving,
making a change, then undoing the change now results in the file being
shown as unmodified as with most programs with undo.

Add basic undo coalescing support.

Originally committed to SVN as r4667.
2010-07-09 07:31:34 +00:00
Thomas Goyne acba2c6b63 Rewrite VFR handling in Aegisub.
Kill vfr.h and vfr.cpp and use the libaegisub versions of them instead.

Rather than the globals VFR_Input and VFR_Output, everything related to
frame rate is now part of the video context. Most things which used to
use VFR_Output now call VideoContext::TimeAtFrame etc.; video providers,
rather than modifying VFR_Input directly, now have getters for their
frame rates which VideoContext calls. Read-only public access to
VFR_Input and VFR_Output are still provided (hopefully temporarily) for
a few things which were awkward to do through VideoContext.

The Avisynth provider now might correctly handle VFR MKVs which can be
opened with DirectShowSource but not DSS2.

Rework keyframe handling as well, so that it continues to match the vfr
handling in design and implementation.

Originally committed to SVN as r4662.
2010-07-08 04:29:04 +00:00
Thomas Goyne e2f8e69612 Beat some semblance of sanity into ass_override and related files. Fixes a pile of crashes when tags are missing expected parameters.
Originally committed to SVN as r4581.
2010-06-24 01:24:43 +00:00
Thomas Goyne 627d423017 Fix memory leak in VariableData
Originally committed to SVN as r4577.
2010-06-24 01:24:21 +00:00
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
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
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
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 8086fae633 Document AssFile's public methods
Originally committed to SVN as r4524.
2010-06-16 06:20:14 +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 c290b6b811 Silence some prefast warnings
Originally committed to SVN as r4472.
2010-06-11 02:24:59 +00:00
Thomas Goyne f064624ecd Simplify charset detection
Originally committed to SVN as r4419.
2010-06-03 20:31:43 +00:00
Amar Takhar 40e12403d5 Merge all changes from the libaegisub branch into trunk, the effective range is r4175:4330. All options have been re-done and now use Cajun to support a json-backed format.
Initial support for low-level access and file I/O methods are included as well.

Originally committed to SVN as r4331.
2010-05-21 01:13:36 +00:00
Thomas Goyne 94bffb5b9d Fix compile error in gcc introduced in r4307 (instantiating templates with private inner types is a msvc extension)
Originally committed to SVN as r4311.
2010-05-19 03:24:07 +00:00
Thomas Goyne 008d59d71e As we require RTTI anyway, kill AssEntry::GetAsDialogue/Style/Attachment and just use dynamic_cast
Originally committed to SVN as r4308.
2010-05-19 00:44:52 +00:00
Thomas Goyne 2124a1dbd3 Rework how sorting works and add sorting by style
Rather than going through a ton of work to ensure that every AssEvent
has a sensible start time that happens to leave it in the right place
after sorting, simply sort only consecutive blocks of AssDialogues and
leave everything else untouched. Note that this results in different
behavior when there are multiple [Events] sections in a file -- rather
than moving lines between sections and keeping the number of lines per
section constant, each section keeps the lines it had.

As it's now easy to do, also add sorting by style name and end time.

Closes #614.

Originally committed to SVN as r4307.
2010-05-19 00:44:44 +00:00
Thomas Goyne ba088237d7 Add some documentation for AegisubCSConv and TextFileReader.
Originally committed to SVN as r4036.
2010-01-24 18:56:51 +00:00
Niels Martin Hansen f805ec707e Merge r3951 from 2.1.8 back in: fixing old URLs
Originally committed to SVN as r3952.
2010-01-06 05:23:58 +00:00
Amar Takhar d348b4e33e Fix all the headers in *.cpp, this includes:
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
 * Sorting alphabetically.

Originally committed to SVN as r3515.
2009-09-10 13:06:40 +00:00
Amar Takhar 2fd9b9d7e3 Fix a whole bunch of Doxygen warnings.
Originally committed to SVN as r3325.
2009-07-30 03:36:53 +00:00
Amar Takhar 6ee2f98349 Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs.  This isn't the actual document in itself but empty documentation using any old documentation if it was there.

This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.

Some notes:
 * Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
 * Some multiline comments may have been munged into single line comments
 * Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
 * Enum comments can go after the enumeration itself '[value] /// comment'
 * include/aegisub/*.h haven't been converted yet, this will be done in a later commit
 * Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.

See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.

Originally committed to SVN as r3312.
2009-07-29 22:59:22 +00:00
Amar Takhar 12aa34088a Switch all headers to using Doxygen and cleanup contact info
* Swap old email + website address with 'Aegisub Project http://www.aegisub.org/'
 * Set categories for all files (jfs)
 * Add descriptions for each file (jfs)
 * Add $Id$ keyword

Originally committed to SVN as r3310.
2009-07-29 05:43:02 +00:00
harukalover 614f2ef559 Fixed a memory leak that occurred when using undo/redo, fixes #330
Originally committed to SVN as r3007.
2009-06-03 19:55:39 +00:00
Niels Martin Hansen 8ca726119f Fix #825 for good, I hope. Get some sense worked into the handling of AssEntry::StartMS and AssDialogue::Start using some private members and virtual getter/setter functions.
Originally committed to SVN as r2931.
2009-05-14 23:45:20 +00:00
Amar Takhar 91d73ec8ea SVN Transition Step 3/7
1. cd aegisub/
  2. svn mv *cpp *h src/
  3. svn mv Makefile.am MatroskaParser.c auto4_perldata.inc bitmaps boost \
     changelog.txt config gl include libosxutil libresrc md5.c msvc mythes.cxx \
     mythes.hxx res.rc src/
  4. cd ..
  5. svn mv FFmpegSource2/ INSTALL Makefile.am README  acinclude.m4 \
     autogen.sh automation/ bin build configure.in desktop dummy.txt lib \
     libass/ m4macros/ packages/ po/ scripts/ universalchardet/ aegisub/
  6. mkdir -p docs/wiki_convert
  7. svn add docs/wiki_convert
  8. cd docs
  9. svn mv aegisub_convert_docs.pl convert.bat output wiki_convert/

* See r2749 for full description.

Originally committed to SVN as r2752.
2009-03-08 08:30:39 +00:00