Commit graph

203 commits

Author SHA1 Message Date
Thomas Goyne
a9f83663e8 Revert "Return the ifstream from agi::io::Open by move"
This reverts commit 1f5484fedb.

Move constructors for fstreams are not implemented yet in libstdc++.

Closes #1578.
2013-02-16 19:47:31 -08:00
Thomas Goyne
1f5484fedb Return the ifstream from agi::io::Open by move 2013-02-12 15:51:59 -08:00
Thomas Goyne
f0054f61bc Fix crash on exit from the dispatch thread pool 2013-02-06 13:38:35 -08:00
Thomas Goyne
6cb9665202 Support extensions with multiple dots in agi::fs::HasExtension 2013-02-06 13:38:34 -08:00
Thomas Goyne
47c36c9033 Use ICU/boost.locale for case-insensitive searching
Do proper unicode case-folding for case-insensitive searching rather
than converting only ascii characters to lowercase. The Turkish 'i' is
still not handled correctly (since it's the only place where
case-folding is locale-dependent), but that's probably not worth caring
about as long as we don't have a Turkish UI translation.

This affects both the find/replace dialog and the select lines dialog.

Closes #1342.
2013-02-06 13:38:33 -08:00
Thomas Goyne
bc5417de4a Give all of the Aegisub-created threads names 2013-02-06 13:22:32 -08:00
Thomas Goyne
5092ab20c9 Do logging on a background thread
Makes logging actually thread-safe and slightly improves performance.
2013-02-06 13:22:17 -08:00
Thomas Goyne
a942687050 Use a circular buffer to store only the last 250 log messages 2013-02-06 13:22:16 -08:00
Thomas Goyne
c6005be4a1 Write log files incrementally so that they actually exist for crashes 2013-02-06 13:22:16 -08:00
Thomas Goyne
101721863a Make log messages a little saner 2013-02-06 13:22:16 -08:00
Thomas Goyne
69e1744fc7 Make agi::util::time_log less insane 2013-02-06 13:22:16 -08:00
Thomas Goyne
1e0f08c0ed Mostly purge wxWidgets from non-UI stuff
Use boost::filesystem::path for all paths, and std::string for all other
strings, converting to/from wxString as close to the actual uses of wx
as possible.

Where possible, replace the uses of non-UI wxWidgets functionality with
the additions to the standard library in C++11, or the equivalents in
boost.

Move the path token management logic to libaegisub (and rewrite it in
the process).

Add a basic thread pool based on asio and std::thread to libaegisub.

This touches nearly every file in the project and a nontrivial amount of
code had to be rewritten entirely, so there's probably a lot of broken
stuff.
2013-02-06 13:22:15 -08:00
Thomas Goyne
cec5f2256c Add agi::util::try_parse 2013-01-03 17:36:50 -08:00
Thomas Goyne
eab11666a9 Remove some cruft from option.h 2012-12-17 09:32:42 -08:00
Thomas Goyne
cccd95941d Fix syntax highlighting for multiple karaoke templater expression blocks 2012-12-07 18:20:09 -08:00
Thomas Goyne
d3fc4dcb25 Remove things used in one (or zero) files from agi_pre.h 2012-12-02 06:33:30 -08:00
Thomas Goyne
96cf5ea7ed Kill the #ifndef AGI_PRE guards
They don't actually improve compilation performance and make it more
annoying to modify what things are in the precompiled header.
2012-12-02 06:33:29 -08:00
Thomas Goyne
0b19908e7b Use std::prev and std::next where applicable 2012-11-30 10:54:57 -08:00
Thomas Goyne
0483c1cfbe Fix string vs color logic in the option parsing 2012-11-24 16:24:00 -08:00
Thomas Goyne
b055abae44 Fix compliation with gcc 4.7 2012-11-15 18:15:40 -08:00
Thomas Goyne
47c678bd63 Make UCDetect a little less insane 2012-11-13 08:46:31 -08:00
Thomas Goyne
2dd1da8333 Use C++11 stuff in libaegisub 2012-11-13 08:46:30 -08:00
Thomas Goyne
6212afb314 Add karaoke templater support to the syntax highlighter 2012-11-12 18:35:27 -08:00
Thomas Goyne
238356406f Extract calltip logic from the edit ctrl to libaegisub 2012-11-12 18:35:25 -08:00
Thomas Goyne
1848aad5c1 Fix compilation with C++ 11/libc++ 2012-11-12 18:35:21 -08:00
Thomas Goyne
ebd56f2163 Include cstdint rather than stdint.h 2012-11-10 18:05:57 -08:00
Thomas Goyne
0893ed3f0a Remove references to tr1 2012-11-10 18:05:57 -08:00
Thomas Goyne
9d4be82be8 Replace syntax highlighting logic with new stuff in libaegisub 2012-11-10 18:05:57 -08:00
Thomas Goyne
47bafe4b9f Add a lexer for the body of dialogue lines to libaegisub 2012-11-10 18:05:56 -08:00
Thomas Goyne
08983adc96 Move agi::Color parsing to its own file
Keeping all uses of boost.spirit in a single translation unit helps
avoid having it murder compile times, which requires that it be off by
itself.
2012-11-10 18:05:56 -08:00
Thomas Goyne
ea5428b65f Replace AssColor with agi::Color
Add agi::Color, and replace AssColor and all uses of wxColor that are
not immediately passed to/from wx with it.
2012-11-10 18:05:56 -08:00
Thomas Goyne
e44c47c863 Remove $Id$ markers since git doesn't support them 2012-10-25 17:39:49 -07:00
Thomas Goyne
67c01d11f6 Delete unfinished and unused stuff from libaegisub 2012-10-25 17:39:49 -07:00
Thomas Goyne
decbf06de3 Timestamp temporary files to reduce the chance of name collisions 2012-10-21 15:29:52 -07:00
Thomas Goyne
b43f27396e Verify that creating the temp file for saving actually succeeded 2012-10-21 15:29:52 -07:00
Thomas Goyne
da79178cc9 Add _tmp before the extension when saving
This makes it easier to open the temporary file if an error occurs at
some point in the saving process.
2012-10-21 08:04:06 -07:00
Thomas Goyne
c7fb6a57a4 Remove the platform-specific agi::io implementations since they were nearly identical 2012-10-21 08:00:02 -07:00
Thomas Goyne
938ccfe39b Mark TimecodeRange::operator< as const 2012-10-16 15:53:49 -07:00
Thomas Goyne
682c7d5371 Fix an occasional crash on startup on Windows debug builds
Some of the debug iterator code seems to not like 'delete map[key]', so
change things a little to do things in a way that appears to be fine.
2012-10-16 09:51:31 -07:00
Thomas Goyne
863e041d4d Honor the configured MRU limits
Actually use the limits set in the preferences dialog rather than always
limiting the MRU lists to 16.

Currently only the Find and Replace limits can be set to above 16 due to
how the open recent items commands are implemented.

Closes #1528.
2012-10-11 10:19:49 -07:00
Thomas Goyne
e945c02151 Fix some warnings
Originally committed to SVN as r6919.
2012-06-25 14:21:32 +00:00
Thomas Goyne
bdafd8f201 Reset to the platform-specific default option values rather than the global defaults
Originally committed to SVN as r6692.
2012-04-11 04:10:56 +00:00
Thomas Goyne
e6697b1923 Fix fallbacks for invalid characters when converting charsets
r6632 made ConverterImpl have a vtable, which makes the iconv_fallbacks
parent no longer the first thing in the object, so add an explicit cast.

Originally committed to SVN as r6639.
2012-03-31 00:28:55 +00:00
Thomas Goyne
f31d9a5a8b Add converter to ISO-6937-2
glibc's iconv implementation supports ISO-6937-2, but libiconv doesn't
due to that these days the only place it's used is in a few old subtitle
formats. As a result, on everything but linux we need our own converter.

Conversion from ISO-6937-2 is currently not supported.

Originally committed to SVN as r6632.
2012-03-29 19:04:49 +00:00
Thomas Goyne
71776940f6 Rewrite SMPTE timecode handling
Move SMPTE handling to agi::vfr::Framerate to get all of the interesting
logic dealing with timcodes in one place, and to make it testable.

Completely rewrite the SMPTE time conversions as testing them reveals
that they were incorrect in some cases.

Originally committed to SVN as r6631.
2012-03-29 19:04:36 +00:00
Thomas Goyne
77e755d109 Allow duplicated timestamps as real files do have them; simply skip all but the last frame with the same timestamp
Originally committed to SVN as r6566.
2012-03-11 23:05:08 +00:00
Thomas Goyne
12511901a9 Fix bad string concatenation in a json parse error message
Originally committed to SVN as r6559.
2012-03-10 02:16:20 +00:00
Thomas Goyne
6cf122dea2 Remove the time_t overload of UnknownElement and just cast to int64_t
Originally committed to SVN as r6508.
2012-02-23 19:27:42 +00:00
Thomas Goyne
b8a7c6cb1e Remove scoped_ptr::swap
Originally committed to SVN as r6431.
2012-02-02 19:18:10 +00:00
Thomas Goyne
983ffc1e83 Add some dumb heuristics to detect binary files in the charset detector to avoid taking forever feeding hundreds of MB through it. Closes #1438.
Originally committed to SVN as r6405.
2012-01-31 04:03:55 +00:00