Commit graph

988 commits

Author SHA1 Message Date
Thomas Goyne
ebc76c8a11 Update ffmpeg and ffms2 2018-11-23 09:22:18 -08:00
Ryan Lucia
26ccf0b8e5 Divorce stored TPP lead-in/out values from config
There's no real reason to link these as far as I can tell, and plenty of
valid reasons not to
2018-11-17 19:27:25 -05:00
Ryan Lucia
08ebcf4693 Remove assdraw from default toolbar 2018-11-17 17:54:17 -05:00
Ryan Lucia
a9eba14df5 Remove assdraw and forums from default menu
Reflects changes previously made to remove those elements from Aegisub
2018-11-17 15:57:48 -05:00
Jan Beich
d8336d2fed Keep using std::distance after Boost 1.68
src/search_replace_engine.cpp:256:14: error: call to
      'distance' is ambiguous
                                count += distance(
                                         ^~~~~~~~
/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter =
      boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >]
distance(_InputIter __first, _InputIter __last)
^
/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator =
      boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >]
        distance(SinglePassIterator first, SinglePassIterator last)
        ^
2018-07-09 20:17:59 +00:00
Ryan Lucia
fe0dd3e095 Merge remote-tracking branch 'upstream/master' into tstools 2018-05-31 04:26:15 -04:00
Ryan Lucia
d4e99700d4 Remove ambiguity over distance function call 2018-05-31 04:22:43 -04:00
Marcin Kurczewski
a4bde47c5c Fix MRU menus (#48)
Broken in 9bbfdddde0. I don't understand
why the author made such a change, so I left their solution with #ifdef
guard.
2018-05-28 21:24:23 +02:00
Thomas Goyne
4fdc5efb69 Explicitly declare DataBlockCache as moveable to make vs17 happy 2018-05-25 22:32:27 +02:00
Ryan Lucia
a621072e7d Add support for WWXD keyframes in qpfile format 2018-05-10 03:28:51 -04:00
Ryan Lucia
747525142a Pass 0 to FFMS_Init
The argument is no longer used, and the docs specify to pass a value of 0 to avoid confusion
2018-05-07 19:24:47 -04:00
Ryan Lucia
3eaa56fc18 Point users at a functional bug tracker 2018-05-07 18:09:42 -04:00
Ryan Lucia
e516ab6e32 Fix line order when splitting after current frame 2018-05-07 18:09:42 -04:00
Ryan Lucia
4d048e3c90 Add configuration options for colors in visual typesetting tools 2018-05-07 18:09:40 -04:00
Ryan Lucia
50a18c7942 Use proper event for DoubleUpdater
Previously changes weren't recognized because the event bound was for integers
2018-04-30 02:38:14 -04:00
Ryan Lucia
dbd7dd8ba1 Remove shitty joke
The default message here is an old joke in extremely poor taste, and best replaced in the config
2018-04-30 02:38:14 -04:00
Ryan Lucia
2f500cd480 Remove dead forums link 2018-04-30 02:38:14 -04:00
Ryan Lucia
95d96f938b Make translation assistant skipping whitespace an explicit setting 2018-04-30 02:38:14 -04:00
Ryan Lucia
3bcc7269be Remove Force BT.601 option and update color matrix guessing 2018-04-30 02:38:14 -04:00
Ryan Lucia
10814a7d0b Add support for setting status bar text from Lua 2018-04-30 02:38:11 -04:00
Ryan Lucia
8cc3a35dd4 Update default config to modern standards 2018-04-29 16:36:21 -04:00
sidneys
d4461f65be fix(updated-macos-build): prefix icu method calls (icu::BreakIterator, icu::Locale, icu::UnicodeString) 2018-03-31 02:58:27 +02:00
therealfun
f6a2ac08a6 Makefiles: replace the use of subst macro with patsubst (#56)
$(subst .c,.o,...) replaces '.c' with '.o' everywhere in pathnames. For
example, renaming the "Aegisub" folder to "Aegisub.cool" will make the
build system generate "Aegisub.oool/.../.o" objects.

https://www.gnu.org/software/make/manual/make.html#Text-Functions
2018-03-05 09:28:29 -08:00
rr-
4791222ab3 Add support for reading waveform selection in LUA 2018-03-03 12:51:49 -08:00
rr-
21f704f138 Fix joining as karaoke 2018-03-03 12:50:01 -08:00
Rodger Combs
61028916c8 main: fix warning 2018-01-27 11:35:18 -08:00
Rodger Combs
16d57dac79 OpenAL: destroy context when not in use
This prevents the CoreAudio thread from spinning when paused on macOS
2018-01-27 11:34:58 -08:00
Rodger Combs
5a3b7301c6 find/replace: handle enter key in input fields 2018-01-27 11:34:24 -08:00
Rodger Combs
a88835e253 find/replace: bring window to front when activated 2018-01-27 11:34:05 -08:00
Thomas Goyne
3bc5e8f04f Remove pointless explicit heights for the audio sliders
The containing sizer overrides them instantly, but for whatever reason
supplying them breaks things on macOS.
2017-07-07 16:46:52 -07:00
Thomas Goyne
70edb03b2a Fix some audio display rendering quirks on retina OS X 2017-07-04 10:51:08 -07:00
Martin Herkt
8d3ad9ff68 dialog_about: only include build date with credit (#45)
The build date is largely irrelevant and prevents reproducible builds.
Make it optional.
2017-05-22 07:43:30 -07:00
Maxime Gauduin
dd67db47cb Fix compilation against icu 59.1 (#46) 2017-05-08 19:01:47 -07:00
Martin Herkt
3594ade719 build: sort wildcard results for repeatable builds (#44) 2017-03-30 10:08:30 -07:00
Ryan Lucia
3e2c165852 Properly set colorspace when loading video
FFMS2 originally would automatically attempt to guess the color space
if not manually specified, but this was removed in
7c2e08109d
and Aegisub never adapted to the change
2017-03-25 12:13:10 -07:00
Niels Martin Hansen
b118fe7e7a Fix STL header writing (really)
The vsnprintf call must be passed the buffer size, not the target string size. Shortening the string to field length happens in the memcpy.
2016-05-18 21:56:34 +02:00
Thomas Goyne
0e8bc44539 Work around more places where VC++ generates null pointers-to-members 2016-04-09 08:36:50 -07:00
Thomas Goyne
101cd8e1e5 Fix compilation with old versions of ffms2 2016-04-08 13:29:32 -07:00
Thomas Goyne
7a6da26be6 Fix compilation on X11-using platforms 2016-04-08 12:14:28 -07:00
Thomas Goyne
dba8f1c062 Use Uniscribe to check glyph coverage of non-BMP characters rather than just skipping them 2016-04-08 11:24:26 -07:00
Thomas Goyne
15adac519d Update to the new indicator API for Scintilla as 3.4 dropped the old one 2016-04-08 11:24:25 -07:00
Thomas Goyne
1aa9215e7f Use FFMS_DoIndexing2 when using a recent version of ffms2
And clean up the audio track selection logic a bit.
2016-04-08 11:24:21 -07:00
Thomas Goyne
95f3f30d53 Remove pointless braces 2016-04-08 11:24:16 -07:00
Thomas Goyne
b8fa7e010b Don't init COM for FFMS2
FFMS2 no longer uses COM for anything.
2016-04-08 11:24:14 -07:00
Thomas Goyne
8823476275 Work around bad codegen from VC++2015 update 2 2016-04-08 11:24:11 -07:00
Thomas Goyne
2720d8c0dc Fix OS X compilation 2016-03-18 19:42:32 -07:00
Thomas Goyne
9bbfdddde0 Add the standard OS X "Window" menu 2016-03-13 16:33:53 -07:00
Thomas Goyne
cac4ba910d Fix more incorrect sizer flags 2016-03-13 16:33:53 -07:00
Thomas Goyne
26fea0e123 Fix skipping over existing spaces when exporting to EBU STL
ac5f40a543 made it so that the N in \N was
skipped, but broke the space case, resulting in two spaces between each
word.

Closes #1887.
2016-03-05 16:35:01 -08:00
Thomas Goyne
b2687e893b Fix member variable initialization order 2016-03-05 16:35:01 -08:00
Thomas Goyne
4c15d0ba84 Add support for running respack.lua with system Lua 2016-03-05 10:51:26 -08:00
Thomas Goyne
0ed6dd46fb Add support for using system LuaJIT rather than the bundled copy
Closes #1904.
2016-03-05 10:51:16 -08:00
Thomas Goyne
45315476bd Switch to a maintained fork of universalchardet 2016-02-09 20:29:29 -08:00
Thomas Goyne
a315ce6903 Fix assert failure when opening with no args 2016-02-08 06:59:49 -08:00
Thomas Goyne
28eb475fc2 Actually use the list of filenames in AegisubApp::OpenFiles() 2016-01-10 19:47:26 -08:00
Thomas Goyne
bb3e0de728 Handle i/o errors when indexing fonts for GDI 2016-01-10 19:47:25 -08:00
Thomas Goyne
3c381b6c55 Handle fonts that are marked as bold but have the same weight as the normal variant 2016-01-02 15:42:26 -08:00
Thomas Goyne
761a121452 Fix the weight of fonts that use 1-10 2016-01-02 15:42:26 -08:00
Thomas Goyne
596332763b Use the Windows Family Name for family name matching 2016-01-02 15:42:26 -08:00
Thomas Goyne
e13a39f302 Try to better match GDI's weight penalty 2016-01-02 15:42:26 -08:00
Thomas Goyne
b9a56cb870 Prioritize family name matches over postscript name matches 2016-01-02 15:42:25 -08:00
Thomas Goyne
278b7621cf Assume that fonts which CT won't give the OS/2 table for are Regular 2016-01-02 15:42:25 -08:00
Thomas Goyne
f2b3b69b3f Read the weight from the OS/2 table rather than asking CoreText
The weights reported by CT are only occasionally correlated with the
OS/2 weights, and GDI uses the latter.
2016-01-02 15:42:25 -08:00
Thomas Goyne
f824d2c56b Remove OS X and Windows support from the fontconfig file lister 2016-01-02 15:42:25 -08:00
Thomas Goyne
b1cb16c7f8 Do a better job of picking the best match from CoreText 2016-01-02 15:42:25 -08:00
Thomas Goyne
d152af1f14 Deduplicate matched paths from CoreText 2016-01-02 15:42:25 -08:00
Thomas Goyne
2527204515 Get the filesystem representation of urls rather than an absolute url 2016-01-02 15:42:25 -08:00
Thomas Goyne
63bb585db6 Enable ARC for the coretext font lister 2016-01-02 15:42:24 -08:00
Thomas Goyne
973f0b09fc Add a basic CoreText-based fonts collector backend 2016-01-02 15:42:24 -08:00
Thomas Goyne
f8c3504898 Remove the OS X fontconfig init logic from the libass provider 2016-01-02 15:42:24 -08:00
Thomas Goyne
9b815ac8cc Fix a crash when reattaching video
The window close event propagates up to the detached window's parent, so
the handler for the parent window closing needs to filter it out.
2016-01-02 13:48:00 -08:00
Thomas Goyne
0b2d0d40d5 Ensure that the fonts collector destination label gets wrapped on OS X 2015-12-29 20:12:52 -08:00
Thomas Goyne
4f34784370 Set the initial control state when the fonts collector dialog is opened correctly 2015-12-29 20:12:32 -08:00
Thomas Goyne
f481a7f5fb Use the correct upper bound for restoring the font collector modes 2015-12-29 20:12:29 -08:00
Thomas Goyne
e8cdfc57a9 Make FcMode an enum class and simplify the data flow 2015-12-29 20:12:24 -08:00
Thomas Goyne
e5a6abd215 Add a GDI-based font selector for libass
This deliberately doesn't perform any font substitutions as the sort of
people that use libass on Windows tend to perfer to manually pick
fonts with the correctly glyphs.
2015-12-29 20:08:07 -08:00
Thomas Goyne
e06385b6d4 Remove unused includes from subtitles_provider_libass.cpp 2015-12-29 20:08:05 -08:00
Thomas Goyne
913b8438f3 Fix Windows x64 compilation 2015-12-29 19:55:58 -08:00
Thomas Goyne
3b13260ca1 Use murmur3 to explicitly hash the font index keys
This significantly improves performance by avoiding the need to
construct std::strings of the things to be hashed, eliminating a bunch
of memory allocations and copies.
2015-12-29 12:38:01 -08:00
Thomas Goyne
879661a379 Only index the first kilobyte of font files to speed up indexing 2015-12-29 12:38:00 -08:00
Thomas Goyne
82f250dbbb Fix the checks for fake bold/italic
EnumFontFamiliesEx doesn't actually use the lfItalic andlfWeight fields,
so we have to check separately.
2015-12-29 12:38:00 -08:00
Thomas Goyne
ddc5cd155f Add a GDI-based fonts collector backend 2015-12-29 12:38:00 -08:00
Thomas Goyne
afed3dca21 Fix compilation on Linux 2015-12-21 19:57:49 -08:00
Thomas Goyne
3747705a43 Select the OpenGL context when destroying VideoDisplay
This is needed to destroy the correct things when there are multiple
active opengl displays.
2015-12-21 17:46:38 -08:00
Thomas Goyne
c8d02de3db Allow coalescing undo over autosaves 2015-12-21 17:46:38 -08:00
Thomas Goyne
52dbb482af Make next_commit_id a member variable rather than a static
Multiple instances of SubsController should not share it.
2015-12-21 17:46:38 -08:00
Thomas Goyne
2032ab8ea3 Handle multiple simultaneous OpenAL audio players in one process 2015-12-21 17:46:38 -08:00
Thomas Goyne
75804da4ea Set the closed marker even on 64-bit OS X 2015-12-21 17:46:38 -08:00
Thomas Goyne
5f89a64f07 Adjust the menu text on OS X to better match the HIG 2015-12-21 17:46:38 -08:00
Thomas Goyne
f28e46c2e3 Add a Close command to the file menu on OS X 2015-12-21 17:46:37 -08:00
Thomas Goyne
ead12de8b6 Actually close all windows on quit 2015-12-21 17:18:07 -08:00
Thomas Goyne
84b0f1e043 Mostly adopt the standard OS X document-based UI model on OS X 2015-12-21 17:18:04 -08:00
Thomas Goyne
0f17784548 Actually open a new window in the New Window command 2015-12-21 17:17:54 -08:00
Thomas Goyne
8de8724660 Support creating multiple main windows
This is not yet actually exposed in any way in the UI.
2015-12-21 17:17:51 -08:00
Thomas Goyne
f5f5439808 Add context-specific path tokens
?video, ?audio, and ?script are not global.
2015-12-21 17:17:48 -08:00
Thomas Goyne
932937c343 Shut up a missing override warning 2015-12-21 17:17:46 -08:00
Thomas Goyne
e757618b32 Use an explicit operator bool for Vector2D 2015-12-21 17:17:42 -08:00
Thomas Goyne
d253388c8e Perform autosaves on a background thread rather than blocking the UI 2015-12-21 17:17:33 -08:00
Thomas Goyne
f811f7e363 Select the "Time" radio on startup 2015-11-29 20:11:14 -08:00
Thomas Goyne
1d00bd834d Fix typo that made the color picker's cursor appear in the wrong place in RGB modes 2015-11-29 20:11:14 -08:00
Thomas Goyne
9112cc8cf9 Fix some invalid sizer flags 2015-11-29 20:11:14 -08:00
Thomas Goyne
4542204b3a Fix undefined behavior in DataBlockCache::SetBlockCount()
Left-shifting negative signed numbers is UB (and pointlessly complex
here anyway).
2015-11-29 20:11:14 -08:00
Thomas Goyne
652a250189 Add an error message for when creating the Lua state fails 2015-11-29 20:11:14 -08:00
Thomas Goyne
f7661dbd78 Explicitly default AssAttachment's copy constructor 2015-11-29 20:11:14 -08:00
Thomas Goyne
85a820918f Fix a crash when opening a new file when the grid is not scrolled to the top 2015-09-13 18:49:46 +02:00
Thomas Goyne
4366e59353 Update to Visual Studio 2015 2015-07-30 19:20:10 -07:00
Thomas Goyne
017bbe1e59 Delay showing the font indexing dialog for 250ms
Helps avoid ugly flickering when no indexing is required, but fontconfig
is taking a long time to load the cache.
2015-07-28 20:46:02 -07:00
Thomas Goyne
9ae508730d Remove some incorrect and ignored sizer flags 2015-07-28 20:46:02 -07:00
Thomas Goyne
d5dde6cff2 Reduce error-handling bloat a bit 2015-07-28 16:22:48 -07:00
Thomas Goyne
fefa31eb47 Improve code coverage of tests 2015-07-28 14:30:03 -07:00
Thomas Goyne
09b2736103 Mark a bunch of things as overriding virtual functions 2015-07-28 14:30:02 -07:00
Thomas Goyne
74ac2ab1fe Extract some more find/replace logic to libaegisub 2015-07-27 10:29:22 -07:00
Thomas Goyne
97bf5c77c3 Explicitly allow unicode text when pasting 2015-05-31 11:49:29 -07:00
Thomas Goyne
42429d4930 Remove incorrect sizer flags 2015-05-31 11:49:29 -07:00
Thomas Goyne
ba9f5a78d4 Include the stack trace for errors in automation validation functions 2015-05-09 13:58:32 -07:00
Thomas Goyne
ff874fadf9 Reduce nesting 2015-05-09 13:58:23 -07:00
Thomas Goyne
a5c87908e1 Set the new active line correctly after splitting by karaoke 2015-05-09 13:58:15 -07:00
Thomas Goyne
0ccac34cb0 Fix crash when splitting lines by karaoke
Defer the deletion of the old lines until after the commit as is now
done for everything that deletes selected lines.
2015-05-09 13:58:12 -07:00
Thomas Goyne
d2958e6aca Set the Row for dialogue lines added to keep the file non-empty 2015-05-09 11:28:18 -07:00
Thomas Goyne
40ae2cdc35 Fix snapping audio markers when dragging inactive line markers with ctrl
We do need to check if the inactive markers are in the active set when
ctrl-dragging, as otherwise there'll always be a marker 0 pixels away to
snap to. Fortunately when ctrl-dragging all of the the markers involved
are by definition very close together, so it would be very difficult to
have enough markers to check for this to be a performance issue.

Closes #1823.
2015-03-01 11:13:43 -08:00
Thomas Goyne
801a8915d1 Use the untranslated context name for new hotkeys
Closes #1855.
2015-02-28 14:39:06 -08:00
Thomas Goyne
d6982426c6 Merge pull request #26 from tophf/rot-angle-fix
Style editor: accept -360..360deg range
2015-02-28 14:28:44 -08:00
9adefaf01e5bf6426d838cd20eae582d2b6ba647
af9fe934c7 Pass all font attachments to font renderer
See #1805.
2015-02-27 01:16:35 +03:00
9adefaf01e5bf6426d838cd20eae582d2b6ba647
4f9713cb20 Style editor: accept -360..360deg range
People tend to use 270deg not knowing|remembering it's equal to -90deg
2015-02-26 22:40:21 +03:00
Thomas Goyne
5cedf16edd Use the custom lua error handler during macro load 2015-02-15 08:19:23 -08:00
Thomas Goyne
879788fe83 Eliminate some gratuitous exceptions 2015-02-15 08:19:10 -08:00
Thomas Goyne
0416188235 Eliminate a pointless menu refresh when opening subtitle files 2015-02-15 08:19:05 -08:00
Thomas Goyne
acb9b8adac Reinitialize libass every time the font is changed in the style editor
libass doesn't free any font data it requests until the ass_renderer is
destroyed, so recreate it every time the font is changed to avoid
holding on to extremely large amounts of data when the user quickly
switches between fonts.

Closes #1320.
2015-02-08 09:13:53 -08:00
Thomas Goyne
9f196adc2e Replace boost::tokenizer with agi::Split 2015-02-08 08:11:22 -08:00
Thomas Goyne
5d8aeb8b40 Replace most remaining uses of boost::split with agi::Split 2015-02-08 08:11:14 -08:00
Thomas Goyne
2269dbcfe0 Reuse previously calculated string widths 2015-02-07 14:56:48 -08:00
Thomas Goyne
427037a552 Reimplement boost::split_iterator to make it less slow
boost::split_iterator type-erases the predicate, which makes it require
a virtual call per character (!) along with a heap allocation. As it
turns out we only ever need one predicate (comparing to a single
character), so replace it with a split_iterator that just does that.
2015-02-07 14:56:27 -08:00
Thomas Goyne
d8bd9904d8 Avoid running the extradata parsing regex unnecessarily 2015-02-07 14:56:20 -08:00
Thomas Goyne
bddf44ddde Eliminate a bunch of memory allocations when getting column widths 2015-02-01 20:09:40 -08:00
Thomas Goyne
8c1b20e651 Speed up grid painting with many unique effects/actors a bit 2015-02-01 20:09:35 -08:00
Thomas Goyne
79fb5cb3fe Fix crash when deleting the last dialogue line from automation 2015-01-26 19:22:59 -08:00
Thomas Goyne
7300a1bf2d Remove some redundant .get()s 2015-01-26 19:22:59 -08:00
Niels Martin Hansen
def24c25b3 Fix EBU STL writing on non-MSVC runtimes
MSVC 2013 and earlier have the _snprintf() function fill fields
completely, eliding the NUL character, if the printed string is
as long as or longer than the given buffer size. This is not the
case in POSIX snprintf(), it always ensures the string is terminated.
This causes several fields in GSI to become truncated and contain
NUL characters which should not appear there.
2015-01-26 19:19:42 +01:00
Niels Martin Hansen
d0296618a6 Sort Automation menu items by display name 2015-01-25 00:35:42 +01:00
Niels Martin Hansen
88d8573d4c Fix crash when loading a dialogue line missing extradata 2015-01-20 21:22:24 +01:00
Niels Martin Hansen
ebb3811942 Fix #1843 2015-01-14 00:46:02 +01:00
Niels Martin Hansen
b4516e4754 Fix #1844, eliminate pointers so typeid behaves
Only the bare type is considered polymorphic/habving a vtable
so therefore applying typeid to a pointer type doesn't behave
as intended.
2015-01-14 00:35:26 +01:00
Niels Martin Hansen
f0a5abad01 AssKaraoke can safely take a const AssDialogue* 2015-01-14 00:21:25 +01:00
Niels Martin Hansen
e9f0999c01 Include seconds in log timestamps on Windows 2015-01-14 00:21:23 +01:00
Thomas Goyne
57edbafdda Replace uses of wxThreadEvent with a statically typed event 2015-01-01 10:24:01 -08:00
Thomas Goyne
ef4424f5e2 Eliminate implicit std::string <-> wxString conversions
On Windows these don't use UTF-8 and so are broken.
2015-01-01 10:24:00 -08:00
Thomas Goyne
26050bd4e0 Actually use CPPFLAGS_BOOST when building src/aegisub 2015-01-01 10:24:00 -08:00
Thomas Goyne
3c59ea9a0a Remove AegisubApp::HandleEvent
OnExceptionInMainLoop covers the same functionality.
2015-01-01 10:24:00 -08:00
Thomas Goyne
2a33b35f60 Give Pen an out-of-line destructor 2015-01-01 10:24:00 -08:00
Thomas Goyne
ab35c41a93 Move AudioDisplayInteractionObject to audio_display.cpp 2015-01-01 10:24:00 -08:00
Thomas Goyne
4502a9893d Make some virtual destructors protected instead 2015-01-01 10:23:59 -08:00
Thomas Goyne
b6edf58651 Eliminate some object file bloat 2015-01-01 10:23:59 -08:00
Thomas Goyne
1d82a75595 Add a missing static 2015-01-01 10:23:59 -08:00
Thomas Goyne
62186e916a Anchor AssAttachment's vtable 2015-01-01 10:23:59 -08:00
Thomas Goyne
0e1c566628 Move tool_translation_assistant_insert into the anonymous namespace 2014-12-28 20:31:48 -08:00
Thomas Goyne
a7042486c0 Anchor AssStyle's vtable 2014-12-28 20:31:33 -08:00
Thomas Goyne
625bd7a767 Avoid having to include preferences.h in app.cpp 2014-12-28 20:28:33 -08:00
Thomas Goyne
0f324a22f1 Fix a pile of places where abs() was used on floats 2014-12-28 19:30:32 -08:00
Thomas Goyne
a6b1639320 Extract some bits that don't need to be templated from templates
Cuts compile time by about 10% and shrinks the final binary a little.
2014-12-28 16:46:38 -08:00
Thomas Goyne
372b9fe115 Eliminate a pointless set that only ever had zero or one entries 2014-12-28 16:46:37 -08:00
Thomas Goyne
5201773a3b Slightly optimize returning strings to lua from ffi functions 2014-12-28 16:46:37 -08:00
Thomas Goyne
010f6c4f79 Debloatify some stuff 2014-12-28 12:30:01 -08:00
Thomas Goyne
76afcdafa1 Eliminate uses of dynamic_cast on everything but GUI widgets 2014-12-28 12:29:54 -08:00
Thomas Goyne
c313f32384 Special-case all lines being selected in validate_adjoinable
GetSortedSelection is kinda slow with large selections and all lines
being selected is an easy thing to special-case.
2014-12-24 16:59:11 -08:00
Thomas Goyne
84bd682e2e Make it harder for automation script to leave no lines selected 2014-12-24 16:12:21 -08:00
Thomas Goyne
1fd44ea8da Add subtitles.script_resolution()
Returns the values from the headers if they're present, or does the
insane Gabest-logic if one or both are missing.
2014-12-24 15:10:12 -08:00
Thomas Goyne
c43bf1e822 Limit the range to be painted in the audio display to what is visible 2014-12-21 11:31:21 -08:00
Thomas Goyne
71ee37cd71 Slather around more const 2014-12-21 11:31:17 -08:00
Khaled Hosny
d4057418da Fix build with latest Visual Studio
This fiixes:

error C2797: list initialization inside member initializer list or
non-static data member initializer is not implemented

http://msdn.microsoft.com/en-us/library/dn793970.aspx
2014-11-23 15:30:27 +02:00
Thomas Goyne
a9208a592b Update the selection and scroll position after opening subtitles from video 2014-11-22 13:27:06 -08:00
Thomas Goyne
1a4634003f Fix crash on a certain kind of malformed shift times history file 2014-11-22 13:21:58 -08:00
Martin Herkt
cf55299017 Fix crash in block cache aging
Bug introduced in e2a11f2d90
2014-11-12 06:21:53 +01:00
Derek Buitenhuis
c871aaf153 srt: Factor out last goto
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-11-05 13:56:53 +00:00
Thomas Goyne
3d228536f5 Only update the YCbCr Matrix when resampling if it was actually changed 2014-10-12 15:45:13 -07:00
Thomas Goyne
ed03cd9735 Fix compilation without fftw3 2014-10-12 15:23:58 -07:00
Thomas Goyne
c41e97cec1 Skip the [Aegisub Project Garbage] and [Aegisub Extradata] sections when exporting to ASS 2014-09-20 11:52:44 -07:00
Thomas Goyne
9e6d5d7d9c Optimize Extradata handling a bit 2014-09-06 09:47:29 -07:00
Thomas Goyne
8567d9a573 Use more make_unqiue 2014-08-31 08:11:12 -07:00
Thomas Goyne
9ebb8d7df1 Silence a warning 2014-08-31 08:11:12 -07:00
Thomas Goyne
e4368d59e4 Fix loading subtitles extradata from matroska files 2014-08-30 08:11:39 -07:00
Thomas Goyne
54a7d43cf1 Use EnumFontFamiliesEx to try to find the correct match when fontconfig gives several options
Fixes collection of ITC Cheltenham, ITC Tiffany, Zurich, Delicious,
Jacoby, Segoe WP, Agilita LT, and a bunch of dumb improperly modified
fonts I have lying around.

Closes #1806.
2014-08-24 16:53:59 -07:00
Thomas Goyne
580386b229 Use FcFontSetSort rather than FcFontSetMatch
For whatever reason FcFontSetMatch sometimes returns something other
than the first result of FcFontSetSort, and every time they different
either FcFontSetMatch is wrong or they're both wrong.

Fixes collection of Adobe Jenson Pro and Arno Pro.
2014-08-24 16:53:54 -07:00
torque
3c12fc69f3 Perform extradata deduplication on add.
Checks all existing extradata keys and values to ensure that the set
that is being added doesn't already exist.
2014-08-24 12:06:22 -07:00
Thomas Goyne
d7fe7e3580 Make SubsController ensure files are non-empty on commit
There have been a bunch of recurring problems with things not handling
zero dialogue lines or zero styles very well, so add one to the file on
commit if needed.

Closes #1814.
2014-08-24 08:02:43 -07:00
Thomas Goyne
9ec4059096 Handle json parsing errors when loading shift times history
Closes #1802.
2014-08-24 07:42:57 -07:00
Thomas Goyne
6159f1587d Update wx
Removes the need for the RTL hacks in BaseGrid as the bugs have been
fixed properly in wx.
2014-08-23 15:56:32 -07:00
Thomas Goyne
20470ea682 Actually register the SSA subtitle format 2014-08-10 06:52:58 -07:00
Thomas Goyne
5b47758539 Convert the clipboard module to the ffi 2014-07-28 15:52:37 -07:00
Thomas Goyne
77ecff1cba Eliminate a pointless multimap in the cache cleaner 2014-07-28 12:09:48 -07:00
Thomas Goyne
51b92390b6 Fix a bunch of float <-> double conversion warnings 2014-07-28 12:09:48 -07:00
Thomas Goyne
ec407bbd7f Don't use std::min/max in mid()
VC++'s optimizer completely falls down on it for whatever reason.
2014-07-28 12:09:48 -07:00
Thomas Goyne
24b8db522a Remove unused things in block_cache.h 2014-07-28 12:09:47 -07:00
Thomas Goyne
e2a11f2d90 Speed up aging the block cache
Keep track of the total size rather than recalculating it every time as
calculating the size actually takes while.
2014-07-28 12:09:47 -07:00
Thomas Goyne
641f1e2e81 Simplify AudioSpectrumCacheBlockFactory a little 2014-07-28 12:09:47 -07:00
Thomas Goyne
7a3110015e Change AudioDisplay::style_ranges to a vector
This is faster in all cases except for repainting a very small part of
the display with a very large number of range transitions and simplifies
the code a bit.
2014-07-28 12:09:47 -07:00
Thomas Goyne
c9e4cea8ad Fix handling for automation debug formatting errors
One spot was missed when converting stuff over to using error_Tag rather
than lua_error for stack unwinding on errors.
2014-07-26 20:38:56 -07:00
Thomas Goyne
de686bdb6f Remove the automation thread priority stuff
It hasn't actually been used for anything for a while, and if a single
normal-priority thread can make your system unresponsive it's time to
upgrade to an OS that's isn't garbage.
2014-07-23 15:29:55 -07:00
Thomas Goyne
d61a9664c6 Write a BOM at the beginning of subtitles to make unpatched VSFilter happy
Closes #1795.
2014-07-23 15:29:54 -07:00
Thomas Goyne
771525ae6f Make AssFixStylesFilter usable statically
Trivially speeds up ProcFrame as constructing export filters isn't free
due to that it has to look up the translatable strings.
2014-07-14 10:10:22 -07:00
Thomas Goyne
97c59e2630 Fix non-pch compilation 2014-07-14 10:10:22 -07:00
darealshinji
3c772dd649 fix Linux build 2014-07-12 01:31:26 +02:00
Thomas Goyne
a9019421f1 Fix memory leak in aegisub.text_extents on Windows
The old object returned by SelectObject has to be made active again
before the DC is destroyed or it doesn't get deleted.
2014-07-11 09:26:59 -07:00
Thomas Goyne
06367d5cd9 Don't convert encoding names to lowercase when writing files
Not only is it unnecessary, but it actively breaks the mapping of
user-friendly encoding names in the Export dialog to the real encoding
names.

Closes #1789.
2014-07-11 09:26:59 -07:00
Thomas Goyne
548fbd814b Fix a use-after-free when a SubsEditCtrl is destroyed while the thesaurus is loading 2014-07-11 09:26:58 -07:00
Thomas Goyne
4dc38447dc Check the return value from lua_open()
It always fails when running under valgrind because valgrind does not
implement mmap functionality that LuaJIT requires.
2014-07-11 09:26:58 -07:00
Thomas Goyne
bffbae0ed9 Fix vc++ compilation 2014-07-10 12:55:38 -07:00
Thomas Goyne
bf03904fb8 Change the default ffms audio error handling mode to ignore
Truncating the file at the first decoding error seems to cause a lot of
confusion, especially since the UI doesn't mention that it happened
anywhere.
2014-07-10 11:44:57 -07:00
Thomas Goyne
2df4c4c194 Use wxDCFontChanger correctly
Fixes the audio display timeline font changing based on what else is
being painted.
2014-07-10 11:44:56 -07:00
Thomas Goyne
585e9489d9 Move some of the audio provider machinery to libaegisub
And add tests.
2014-07-10 11:44:56 -07:00
Thomas Goyne
e942a7f0f7 Fix int overflow when saving audio clips 2014-07-08 16:38:33 -07:00
Thomas Goyne
e713f741a4 Make some functions static 2014-07-08 16:38:16 -07:00
Thomas Goyne
e60197962a Fix buffer overflow when getting text extents
lfFaceName needs to be null-terminated, so only copy up to 31 characters
into the buffer.
2014-07-08 09:23:19 -07:00
Thomas Goyne
8a5b4ae3a3 Fix keycode mapping for backspace, enter, tab and escape 2014-07-08 09:23:19 -07:00
Thomas Goyne
6c0752035c Slightly optimize AssDialogue serialization 2014-07-07 08:40:38 -07:00
Thomas Goyne
935c6bc3a7 Store hotkeys in a less dumb format 2014-07-06 19:25:49 -07:00
Thomas Goyne
3b34ed9a77 Move AssTime to libaegisub and add tests 2014-07-06 19:25:49 -07:00
Thomas Goyne
8c7fd37aa9 Clean up the SRT reader/writer a bit 2014-07-06 19:25:49 -07:00
Thomas Goyne
8576c4993f Fix SRT timestamp parsing 2014-07-06 19:25:48 -07:00
Thomas Goyne
dd70da35d4 Remove some cruft from the fonts collector 2014-07-06 19:25:48 -07:00
Thomas Goyne
e924db1fda Store open dialogs in an unsorted vector
Even if every dialog in the program was open at once, linearly searching
a vector is quite fast enough.
2014-07-06 19:25:48 -07:00
Thomas Goyne
d9016cc8ea Debloat and slightly speed up the MRU code 2014-07-06 19:25:48 -07:00
Thomas Goyne
518342b919 Make the hotkey code a bit less bloated 2014-07-06 19:25:48 -07:00
Thomas Goyne
df8ad34838 Eliminate pointless runtime datastructures for CalltipProvider
And add some tests and make it actually work correctly.
2014-07-04 20:37:36 -07:00
Thomas Goyne
d56868e820 Fiddle with the dependency info for libresrc to hopefully work better 2014-07-02 18:20:11 -07:00
Thomas Goyne
a084f02a2d Fix a case where the found text would not be selected with find/replace
SubsTextEditCtrl::SetTextTo needs to update the selection via the text
selection controller or the text selection controller will have an
outdated cached state until the UpdateUI event is processed, which
soemtimes resulted in it not actually setting the selection when it
needed to be.
2014-07-01 20:16:17 -07:00
Thomas Goyne
abcd2bd61b Modernize the EBU STL writer a bit 2014-07-01 20:16:17 -07:00
Thomas Goyne
0f42155ca2 Make all of the syntax highlighter colors customizable
Closes #1782.
2014-07-01 12:25:22 -07:00
Thomas Goyne
71b74a6e86 Remove -D__STDC_FORMAT_MACROS from CXXFLAGS
The inttypes defines are no longer used anywhere due to that agi::Format
doesn't require them.
2014-07-01 12:22:39 -07:00
Derek Buitenhuis
14f9814bba srt: Factor out a goto statement
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-06-30 17:05:30 +01:00
Thomas Goyne
e1d56f9294 Update all selected lines when dragging the origin in the rotate tools 2014-06-29 11:42:55 -07:00
Thomas Goyne
5989226422 Fix crash when loading video from drag&drop is cancelled 2014-06-29 11:42:46 -07:00
Thomas Goyne
a38793497f Drop support for the DirectX SDK and require the Windows 8 SDK for DirectSound 2014-06-29 10:45:27 -07:00
Thomas Goyne
e53b2dab6b Eliminate a string copy for @ fonts in the fonts collector 2014-06-29 10:45:27 -07:00
Thomas Goyne
c50d80cf24 Fix enabling/disabling the default script resolution edit boxes in the preferences dialog 2014-06-29 10:45:26 -07:00
Thomas Goyne
4c88449e4c Make UnknownElement moveable and not copyable
And remove the unused comparison functionality.
2014-06-29 10:45:26 -07:00
Thomas Goyne
4c0e578eda Rewrite the remaining bits of json::Writer 2014-06-29 10:45:26 -07:00
Thomas Goyne
13fe4fe9ff Actually load the platform config rather than the default config twice 2014-06-28 19:49:39 -07:00
Thomas Goyne
b7a8dea753 Remove a pointless static bool 2014-06-28 19:49:39 -07:00
Thomas Goyne
dab67c6267 Enable the Apply button in the preferences dialog after a color is changed 2014-06-27 11:15:48 -07:00
Thomas Goyne
4accc988b3 Make the main edit box's background color customizable
Closes #1042.
Closes Aegisub/Aegisub#12.
2014-06-27 11:15:48 -07:00
Thomas Goyne
ce629c2393 Add the help page for the resolution mismatch dialog 2014-06-27 11:15:48 -07:00
Thomas Goyne
6e40f4f920 Don't automatically select all control handle in the vector clip tool
This was originally done because there was no easy way to select them
all otherwise, but box selection of handles has been supported for a
while now.
2014-06-26 17:24:54 -07:00
Thomas Goyne
e48e8cef84 Load files dropped on the window asynchronously 2014-06-26 17:24:54 -07:00
Thomas Goyne
03443818f0 Pass UTF-8 paths to hunspell now that it supports them 2014-06-26 16:50:43 -07:00
Thomas Goyne
3c57dda9ac Update to hunspell 1.3.3 2014-06-26 16:50:43 -07:00
Thomas Goyne
69781f0a88 Enable compression for the 256x256 icon
Bumps 200KB off the executable.
2014-06-24 13:14:20 -07:00
Thomas Goyne
6661c6a808 Fix use-after-frees when opening files from the MRU lists
Pass the paths to open by value to avoid ending up with a dangling
reference to a path stored in the MRU list which has been invalidated by
adding or removing items.

Closes #1777.
2014-06-23 16:40:43 -07:00
Thomas Goyne
4ce1283bbb Fix handling of thesaurus words with only a single suggestion
When there's only one suggestion for a given word the part of speech
appears in the suggested replacement, which needs to be stripped.

Closes #1776.
2014-06-23 16:40:43 -07:00
Thomas Goyne
961e6dab88 Select the last token when double-clicking past the end of the text in the edit box 2014-06-20 10:45:13 -07:00
Thomas Goyne
5f981e40f1 Add dependency on libresrc headers to all of the src objects 2014-06-17 20:48:59 -07:00
Thomas Goyne
68eaab0f43 Convert the build system to non-recursive make
Speeds up a no-op build from 500ms to 60ms and significantly improves
dependency tracking.
2014-06-17 11:37:20 -07:00
Thomas Goyne
cb71a3d05d Fix saving audio clips
Actually write all of the samples rather than half of them.
2014-06-15 17:17:15 -07:00
Thomas Goyne
5f9fc95fb4 Always update the rendered subtitles for non-dialogue changes
Closes #1770.
2014-06-15 17:17:15 -07:00
Thomas Goyne
23f6addf35 Close the detached video dialog when video is closed 2014-06-15 17:17:15 -07:00
Thomas Goyne
7780fadfc6 Fix restarting the application after changing the UI language on OS X 2014-06-14 06:51:53 -07:00
Thomas Goyne
62c28ce0d3 Avoid pointless repaints of the grid when seeking video
Keep track of which lines are displayed on the current video frame so
that video seeks only have to repaint the grid when the set actually
changes. Speeds up video playback on non-fbf stuff by ~15%.
2014-06-12 17:06:25 -07:00
Thomas Goyne
633fa0e4d7 Only repaint the video slider on seek if the thumb will actually move
Cuts CPU usage for playback in totally arbitrary circumstances by about
5%.
2014-06-12 17:06:25 -07:00
Thomas Goyne
4bdccb889c Reuse buffers for video frames
At least on OS X, allocating the buffers is one of the more expensive
parts of video playback, and on an arbitrary 720p H.264 file with simple
subtitles this cuts CPU usage while playing by about 30%.
2014-06-12 17:06:25 -07:00
Thomas Goyne
a574d6ac67 Speed up AsyncVideoProvider::UpdateSubtitles a bit
Adding Row to AssDialogue removes the need to loop over the file to find
out what rows changed.
2014-06-12 17:06:25 -07:00
Thomas Goyne
2508dd9c6e Only scroll the grid to the active line if the row has actually changed
Makes it so that undo/redo only scrolls to the active line if it's
different in the two versions of the file.
2014-06-12 17:06:25 -07:00
Thomas Goyne
f24a72d8fc De-wxString HelpButton 2014-06-11 12:52:30 -07:00
Thomas Goyne
8e36b69ef1 Update manual URL for 3.2 2014-06-11 12:52:30 -07:00
Thomas Goyne
87f99876c6 Eliminate some repeated iequals 2014-06-11 12:52:30 -07:00
Thomas Goyne
7de5fbac92 Eliminate all remaining places where strings are thrown as exceptions
Closes #916.
2014-06-11 12:52:30 -07:00
Thomas Goyne
789ff25f27 Remove some exceptions not used for much of anything 2014-06-11 12:52:30 -07:00
Thomas Goyne
cfd2698b03 Use NSSpellChecker rather than hunspell on OS X
Main benefit is it removes the need to ship 50 MB of dictionaries.
2014-06-11 12:33:09 -07:00
Thomas Goyne
6500b379bd Remove all distfile stuff from the build system
It's unused and out of date.
2014-06-09 17:20:56 -07:00
Thomas Goyne
b777cae2fe Fix crash on invalid extradata from automation 2014-06-09 17:20:56 -07:00
Thomas Goyne
831fbcd9a0 Fix crash when an extradata entry is used by more than one line 2014-06-09 17:20:56 -07:00
Thomas Goyne
ac7161cd08 Revert 50dfa1cd42 for wxGTK
wxGTK has the opposite problem as OS X: GetValue returns the new value,
but the change event has the old value.
2014-06-08 08:00:11 -07:00
Thomas Goyne
aae82f01e9 Set the margin controls in the style editor to the correct initial values 2014-06-07 08:48:40 -07:00
Thomas Goyne
ce29d07113 Remove an entirely pointless GUI-thread-blocking call to GetFrame 2014-06-07 08:48:40 -07:00
Thomas Goyne
f38ba33fed Eliminate some pointless rerenders of the video display
If the frame number hasn't changed and none of the currently visible
lines have changed, there's no need to rerender the subtitles and
redisplay the frame. Mostly helps with very slow opengl implementations
where actually painting the video display is expensive, as the rendering
is done on a background thread anyway.
2014-06-07 08:48:39 -07:00
Thomas Goyne
5e54a342e4 Fix the Select All button in the import styles dialog 2014-06-06 12:08:41 -07:00
Thomas Goyne
ce358c1367 Move global_scripts to options.h
Not the perfect place for it by any means, but that's where the rest of
the application-global stuff is these days and it removed the need for
automation stuff to include main.h (and thus all the wxApp garbage).
2014-06-06 12:08:41 -07:00
Thomas Goyne
07cf50f7d3 Use non-deprecated wxIMPLEMENT_APP 2014-06-06 12:08:40 -07:00
Thomas Goyne
392c9ea35a Catch std::exceptions thrown during startup 2014-06-06 12:08:40 -07:00
Thomas Goyne
04efe2edfb Delete osx-run.sh
wxWidgets now supports running from outside application bundles, so it's
no longer needed.
2014-06-05 08:35:50 -07:00
Thomas Goyne
421d5ca52e Add #ifdef __cplusplus to the precompiled headers to make Xcode happy 2014-06-05 08:35:50 -07:00
Thomas Goyne
50dfa1cd42 Fix issues with selected line styles with the keyboard on OS X
Opening the style list dropdown and switching between values with the
arrow keys doesn't update the value returned from ctrl->GetValue() on
OS X, but the event contains the correct value so use that instread.
2014-06-05 08:35:50 -07:00
Thomas Goyne
238110e799 Set minimum widths for the columns of the hotkeys editor on OS X
The OS X implementation makes very poor choices for the default widths
if given the opportunity.
2014-06-05 06:33:03 -07:00
Thomas Goyne
fffb138b81 Add IME support on OS X
Closes #1247, #1672, #1695.
2014-06-04 14:29:37 -07:00
Thomas Goyne
acdc0e7cba Use less std::set 2014-06-04 14:15:27 -07:00
Thomas Goyne
9133293869 Use less std::bind 2014-06-04 14:15:27 -07:00
Thomas Goyne
745aa8fef0 Use less wxString in HotkeyDataViewModel 2014-06-04 14:15:26 -07:00
Thomas Goyne
970dd96959 Delete unused variable 2014-06-04 14:15:26 -07:00
Thomas Goyne
460b806038 Use non-deprecated wxFONT/wxPEN constants 2014-06-04 14:15:26 -07:00
Thomas Goyne
d3484e7382 Get the end time of the last line in a less dumb way 2014-06-04 14:15:26 -07:00
Thomas Goyne
f7532ff1ef Actually use the ?dictionary token. Closes #1761. 2014-06-04 14:15:26 -07:00
Thomas Goyne
0bf93ec263 Fix a bunch of crashes in the vector clip tool 2014-06-03 10:07:35 -07:00
Thomas Goyne
5fcb287ed0 Fix saving images with subtitles for frames other than the first 2014-06-03 07:21:07 -07:00
Thomas Goyne
4e5b81973b Set the initial audio volume when opening audio 2014-06-03 07:21:07 -07:00
Thomas Goyne
e6d7c4547a Fix compilation of the portaudio player 2014-06-03 07:21:07 -07:00
Thomas Goyne
b42086fdfd Use the customized default styles for SRT files opened from matroska 2014-06-02 13:02:06 -07:00
Thomas Goyne
e061ac8755 Pull even more of the subs load logic into Project
The relative order of the on-file-load logic matters, so signals don't
work very well for it. Doing it all explicitly in Project fixes a bunch
of inconsistent issues related to restoring saved state.

Closes #1759.
2014-06-02 13:02:06 -07:00
Thomas Goyne
917913b0ef Flush the clipboard before closing it, not after 2014-06-02 13:02:05 -07:00
Thomas Goyne
ff9beb850c Build wx without iostream support 2014-05-31 08:11:32 -07:00
Thomas Goyne
193b30af86 Eliminate a bunch of entirely pointless OptionPage subclasses 2014-05-31 08:11:32 -07:00
Thomas Goyne
76f0afecaf Eliminate pointless wxDialog subclasses
A lot of the wxDialog subclasses don't actually override any virtual
functions, so there's no particular need for them to be subclasses at
all, and wxDialog's vtable is so huge that they actually contribute
measureable to the size of the executable.
2014-05-31 08:11:32 -07:00
Thomas Goyne
060536824b Kill ScintillaTextCtrl and just always use the UTF-8 methods
Trivially improves performance and reduces the opportunities for wxSTC
to fuck up.
2014-05-30 13:24:38 -07:00
Thomas Goyne
fa68b5ee1a Fix compilation with UTF-8 wxString 2014-05-30 11:53:15 -07:00
Thomas Goyne
59489b8f8c Extract some of the string formatter implementation to format.cpp 2014-05-30 11:53:15 -07:00
Thomas Goyne
37c02ae127 Replace wxString::Format with agi::format
It's modestly faster, significantly more type-safe, and doesn't assert
when there's too few arguments, which causes problems for plural forms.

Closes #1733.
2014-05-30 11:53:14 -07:00
Thomas Goyne
8d26c66d0f Remove a bunch of unused functionalty from agi::Exception 2014-05-30 11:53:14 -07:00
Thomas Goyne
b43788fa7f Replace boost::format with agi::format
boost::format is slow to compile, slow to run, and has an unpleasant
interface.
2014-05-30 08:30:31 -07:00
Thomas Goyne
e75fc089d3 Don't error on truncated wave files 2014-05-27 06:42:47 -07:00
Thomas Goyne
59a680e6e1 Fix saving audio clips from lines 2014-05-27 06:42:46 -07:00
Thomas Goyne
dfec6b73b7 Use free() on data returned by Hunspell, not delete 2014-05-27 06:42:46 -07:00
Thomas Goyne
eec83bb32b Cut down on FileNotFound exceptions thrown on startup 2014-05-27 06:42:46 -07:00
Thomas Goyne
ac5f40a543 Fix \N handling in EBU STL export 2014-05-27 06:42:46 -07:00
Thomas Goyne
02ca3360ca Handle missing recently used subtitle files better 2014-05-26 09:34:20 -07:00
Thomas Goyne
960dc3723b Don't get the duration from the audio controller on audio open
The audio controller's provider may not have been updated yet.
2014-05-26 09:34:20 -07:00
Thomas Goyne
cca97a58f6 Fully initialize the video when it's opened via drag-and-drop 2014-05-26 09:34:20 -07:00
Thomas Goyne
81b942ea6e Update agi_pre.h 2014-05-26 09:34:20 -07:00
Thomas Goyne
6c685daf98 Ditch boost.circular_buffer
It drags in a ton of crap, is kinda slow at runtime due to using
std::deque, and doesn't actually make the code much simpler than just
using a manual ring buffer.
2014-05-26 09:34:19 -07:00
Thomas Goyne
1f7c47239b Replace timeval junk with std::chrono 2014-05-26 09:34:19 -07:00
Thomas Goyne
fed99649e9 Cut down on pointless uses of std::list 2014-05-26 09:34:19 -07:00
Thomas Goyne
c0d3ecb6c2 Change Spline to a std::vector 2014-05-26 09:34:18 -07:00
Thomas Goyne
8ec9280ecc Change most uses of deques to vectors 2014-05-26 09:34:18 -07:00
Thomas Goyne
20a7ec786f Use initializer lists rather than std::make_pair 2014-05-26 09:34:18 -07:00
Thomas Goyne
4f65f79f1e Remove some pointless std::moves 2014-05-26 09:34:18 -07:00
Thomas Goyne
4598a23485 Fix the paste over dialog 2014-05-24 07:41:17 -07:00
Thomas Goyne
b370e1af53 Stop video playback when seeking due to switching active lines 2014-05-24 07:41:17 -07:00
Thomas Goyne
d73790805a Fix reloading the video provider after settings changes 2014-05-24 07:41:16 -07:00
Thomas Goyne
9ca61a2fb5 Delete unused stuff in the pulseaudio player 2014-05-24 07:41:16 -07:00
Thomas Goyne
55865d131a Add a missing check for if the video has an audio track 2014-05-23 13:03:10 -07:00
Thomas Goyne
99b46f6a14 Fix restoring video position from saved project info 2014-05-23 13:03:10 -07:00
Thomas Goyne
d004fc1856 Improve ALSA playback position reporting
Use std::chrono since it's a nicer API. Use a separate lock for playback
position so that the GUI thread isn't blocked for hundreds of ms while
snd_pcm_drain is waiting, and update the playback position after
decoding audio rather than before to avoid it being significantly wrong
when not using a cache.
2014-05-23 13:03:10 -07:00
Thomas Goyne
e36ecbde49 Reuse a decoding buffer for ALSA rather than constantly allocating new ones 2014-05-23 13:03:10 -07:00
Thomas Goyne
1bf6197869 Use std::thread rather than pthreads for AlsaPlayer 2014-05-23 13:03:10 -07:00
Thomas Goyne
c2b8892b33 Use unique_ptr in AlsaPlayer 2014-05-23 13:03:10 -07:00
Thomas Goyne
9d3067ae75 Return absolute paths for files in project_properties() 2014-05-23 07:28:26 -07:00
Thomas Goyne
384f87f399 Use more plural forms for translatable strings 2014-05-23 07:28:25 -07:00
Thomas Goyne
60fd44163e Don't clear project properties on undo/redo 2014-05-23 07:28:25 -07:00
Thomas Goyne
40ac2f9b44 Fix crash when opening video
If video was previously open and the user chooses to resample the script
for the new video, VideoController would try to update the subs for the
now-deleted old provider.
2014-05-23 07:28:25 -07:00
Thomas Goyne
e2754bcd90 Make video providers report whether their file has audio tracks
Fixes errors when trying to automatically open audio from dummy video
and improves UX a little by disabling the Open Audio From Video menu
item when there are no audio tracks.
2014-05-23 07:28:25 -07:00
Thomas Goyne
692b354713 Don't compile the FFT code if FFTW is enabled 2014-05-23 07:28:25 -07:00
Thomas Goyne
e0b8c21590 Use unique_ptr for AudioWaveformRenderer's decode buffer 2014-05-23 07:28:25 -07:00
Thomas Goyne
09e325a1c3 Clean up unused includes 2014-05-23 07:28:24 -07:00
Thomas Goyne
df406d5452 Fix compilation with GCC 2014-05-22 14:58:39 -07:00
Thomas Goyne
2bf23af00a Remove a lot of pointless headers for dialogs
Most of the dialogs in Aegisub have a public interface consisting of a
single function, so there's really no need to expose the actual dialog
classes to the rest of the program. Add dialogs.h with the declarations
of all of those functions (most of which are just ShowFooDialog()), and
kill a million other headers.
2014-05-22 14:58:39 -07:00
Thomas Goyne
49357eec20 Add missing subs_controller.h include for release builds 2014-05-22 09:54:59 -07:00
Thomas Goyne
9ae9da4aab Support loading keyframes and timecodes files via drag-and-drop
Closes #1749.
2014-05-22 09:29:16 -07:00
Thomas Goyne
de2e1e23de List the files to be (un)loaded in the Load/Unload files dialog
Updates #880.
2014-05-22 09:29:16 -07:00
Thomas Goyne
aa21b3d77d Add aegisub.project_properties()
Returns a table with all of the project metadata junk that used to be in
the script info section of the file.

Closes #1747.
2014-05-22 09:29:16 -07:00
Thomas Goyne
9c7119fdc2 Redesign how project metadata is stored in the file
Remove it from the script info section and put it in its own section
that isn't tracked by undo and make it not stringly typed. Removes the
need for the gross hack where changes are slipped in just before saving
to circumvent the undo system, cuts down on the uses of string literals
to identify fields, and probably improves performance a little.
2014-05-22 09:29:15 -07:00
Thomas Goyne
19e8f19e52 Redesign project file handling
Add a new Project class which is responsible for everything related to
opening and closing audio, video, subtitles, timecodes and keyframes.
This pulls almost everything not directly related to playing audio/video
out of the audio and video controllers, pulls more crap out of
FrameMain, and happens to make things a little simpler in the process.
2014-05-22 09:29:12 -07:00
Thomas Goyne
a345b8c4d5 Undelete the script resolution mismatch option from default_config 2014-05-22 06:14:59 -07:00
Thomas Goyne
5830fc4225 Don't limit CodecPrivate to 256KB 2014-05-20 09:46:58 -07:00
Thomas Goyne
5f4d6ad386 Return zero bytes when MatroskaFile asks for data past the end of the file 2014-05-20 09:46:57 -07:00
Thomas Goyne
53f02d33a6 Fix a bunch of warnings when building with gcc on linux 2014-05-20 09:46:57 -07:00
Thomas Goyne
c2455cccb6 Enable loading audio when opening video by default
Main reason not to do this was that loading audio blocked the UI, which
has now been fixed, and having to separately load audio confuses
beginners.
2014-05-20 09:46:57 -07:00
Thomas Goyne
7645b447be Set the correct variable for whether to commit subs after opening video 2014-05-19 19:32:25 -07:00
Thomas Goyne
6edb38501b Update the YCbCr matrix used by the video display when the header is changed 2014-05-19 19:32:25 -07:00
Thomas Goyne
ad33fdb109 Add color matrix conversion to the resolution resampler 2014-05-19 19:32:25 -07:00
Thomas Goyne
7a06e08ad0 Use ycbcr_converter in YUV4MPEGVideoProvider 2014-05-19 19:32:25 -07:00
Thomas Goyne
9774352a77 Fix compilation with gcc 4.8. Closes #1756. 2014-05-19 06:53:44 -07:00
Thomas Goyne
a376ed90b9 Insert \\N on shift-enter in the edit box 2014-05-18 07:50:23 -07:00
Thomas Goyne
402aa509a0 Fix non-pch compilation 2014-05-17 18:01:41 -07:00
Thomas Goyne
d0ce26d7df Add an option to resample the script to the resolution mismatch dialog
Closes #1382.
2014-05-17 18:01:41 -07:00
Thomas Goyne
32fae528b0 Don't try to shift line margins that are 0 2014-05-17 18:01:41 -07:00
Thomas Goyne
c78db67cba Round negative drawing coordinates correctly 2014-05-17 18:01:41 -07:00
Thomas Goyne
229b6cf63d Fix resampling drawings with AR changes
The shift from margins should be applied only to the line's position,
not to each point in the drawing, and the scale needs to compensate for
that the scale on the style is being changed as well.
2014-05-17 18:01:41 -07:00
Thomas Goyne
0f030c45f3 Make AR-changing resampling more user-friendly
Add modes where the borders to add or remove are automatically
calculated rather than forcing the user to do it manually, and hopefully
make it a bit clearer what exactly will happen.
2014-05-17 18:01:41 -07:00
Thomas Goyne
7e2780f57a Make both source and destination resolution overridable in the resampler 2014-05-17 18:01:40 -07:00
Thomas Goyne
6886436ddc Add YCbCr Matrix to the script properties dialog 2014-05-17 18:01:40 -07:00
Thomas Goyne
26cfd3ecbd Add missing check for if the context has been initialized in the crash handler 2014-05-15 12:07:46 -07:00
Thomas Goyne
79fd39d6ca Default to the language selected in the installer 2014-05-15 11:09:38 -07:00
Thomas Goyne
0a1660c03b Add version information to the windows executable
Closes #913.
2014-05-15 08:39:09 -07:00
Thomas Goyne
8a49cf1c34 Shove simple getters in AudioTimingControllerDialogue into the class declaration 2014-05-15 07:44:13 -07:00
Thomas Goyne
6f36c75cfd Fix snapping audio markers to markers from other selected lines 2014-05-15 07:31:33 -07:00
Thomas Goyne
e593843da7 Significantly speed up marker snapping with large selections 2014-05-14 12:48:59 -07:00
Thomas Goyne
fc662e0278 Use INT_MIN as the invalid click position sentinel rather than -1 2014-05-14 12:13:40 -07:00
Thomas Goyne
c13b026598 Snap based on all markers being dragged rather than just the mouse position 2014-05-14 12:04:19 -07:00
Thomas Goyne
9168484fc6 Allow clicking anywhere in the audio display for alt-dragging 2014-05-14 08:37:03 -07:00
Thomas Goyne
fff59982f4 Clear the clicked marker on right click 2014-05-13 12:44:28 -07:00
Thomas Goyne
66ba65774a Add custom build system for wxWidgets 2014-05-13 11:02:46 -07:00
Thomas Goyne
1651446e0f Drag the entire audio selection when Alt is held down
Closes #691.
2014-05-12 12:07:46 -07:00
Thomas Goyne
5da847e1ef Use more NSDMIs 2014-05-12 10:05:36 -07:00
Thomas Goyne
562a2259f5 Check for uses of styles other than "Default" in CanSave rather than customized styles
Customizable default styles makes the latter check awkward to implement,
and the previous logic of comparing against the hardcoded default wrong.
2014-05-12 08:34:28 -07:00
Thomas Goyne
164ad33753 Fix RTL painting of the subtitles grid
wx comes very close to just making it work automatically, but it doesn't
translate the origin to the top-right corner and wxBufferedPaintDC
doesn't handle RTL at all, so reimplement it with some hacks.

Closes #1354.
2014-05-12 08:04:24 -07:00
Thomas Goyne
0909d137b0 Mirror toolbar button images for RTL locales
Some of the toolbar buttons are seriously wrong when mirrored and there
doesn't seem to be a way to disable mirroring for the images while using
RTL layout for the toolbar itself, so double-mirror them so that they
end up with their original appearance.

Ideally the button images would be localizable as some of them actually
should be mirrored, but that's probably not worth the work involved.

See #1354.
2014-05-11 07:31:22 -07:00
Thomas Goyne
3d0e2baf4e Force the video display to LTR layout direction
Mirroring the video is not useful or desirable.

See #1354.
2014-05-11 06:59:59 -07:00
Thomas Goyne
b96edfebcc Remove check for customized styles in SRTSubtitleFormat::CanSave
It doesn't work with customizable default styles.
2014-05-09 09:24:27 -07:00
Thomas Goyne
73d64870af Fix writing files as non-utf-8 2014-05-09 07:00:48 -07:00
Thomas Goyne
eadf555da3 Pass exceptions in async workers back to the main thread 2014-05-09 07:00:48 -07:00
Thomas Goyne
d3a4bed994 Port respack to lua
Simplifies the build system a little by cutting down on the number of
helpers that need to be built.
2014-05-08 10:39:18 -07:00
Thomas Goyne
571c9d9b7a Don't hardcode the size of buttons with translatable labels. Closes #1750. 2014-05-07 10:43:01 -07:00
Thomas Goyne
049142f6f6 Make the check for faux bold match libass's logic for when to embolden 2014-05-07 07:13:32 -07:00
Thomas Goyne
8e5d4c48bc Print usage information for faux bold/itatlic warnings 2014-05-07 06:51:35 -07:00
Thomas Goyne
26e7880c8b Fix compilation with non-16-bit wchar_t 2014-05-06 18:31:19 -07:00
Thomas Goyne
77a2c1bb16 Verify that we're actually using a UTF-8 locale and switch to en_US.UTF-8 if not
Should fix #1587 and #1675, but I was never able to reproduce either of
them so maybe not.
2014-05-06 18:16:36 -07:00
Thomas Goyne
432640c045 Use localized language names from ICU rather than English names 2014-05-06 17:32:10 -07:00
Thomas Goyne
32f5e00bf8 Eliminate a pointless check 2014-05-06 10:32:19 -07:00
Thomas Goyne
50d0744e9c Skip prompting the user for a language on first start if we have a translation for their OS UI language 2014-05-06 10:29:53 -07:00
Thomas Goyne
47b8627ad3 Keep the old subtitles file alive until the new one is fully announced
This fixes crashes from touching dangling references to lines in the old
subtitle file in the handlers for the various signals triggered when a
new file is opened.
2014-05-06 09:36:07 -07:00
Thomas Goyne
ca86b0da33 Actually initialize the initial MatchState in the search replace engine 2014-05-05 18:52:16 -07:00
Thomas Goyne
a00e5dc967 Update which style the Edit button edits when the line's style is changed 2014-05-05 18:42:06 -07:00
Thomas Goyne
2674c702d1 Silence incorrect warning 2014-05-05 17:53:14 -07:00
Thomas Goyne
7e2724c22c Add support for submenus in the automation menu
Split the menu text on /, with each segment before the last used as the
submenu name and the last as the actual menu text.

Closes #852.
2014-05-05 14:27:01 -07:00
Thomas Goyne
c5608a4725 Add Comment field to the paste over dialog 2014-05-05 07:01:57 -07:00
Thomas Goyne
26a9e57006 Eliminate an extra commit when using the color picker buttons 2014-05-05 06:28:27 -07:00
Thomas Goyne
f261688b11 Don't ignore the contents of override blocks when counting characters for selection preserving 2014-05-05 06:27:37 -07:00
Thomas Goyne
3983719e3f Add an Edit button next to the style list dropdown. Closes #1746. 2014-05-04 12:53:22 -07:00
Thomas Goyne
57f6e9a869 Actually serialize the styles for the subtitle renderers 2014-05-04 11:16:57 -07:00
Niels Martin Hansen
e1c575b7a1 MicroDVD import should also use default styles 2014-05-04 13:14:28 +02:00
Niels Martin Hansen
1dc2ae09a0 Forgot OSX default config in 6b827abec0 2014-05-04 13:07:25 +02:00
Niels Martin Hansen
82d7979f04 Pass style catalog names instead of file names to AssFile::LoadDefault 2014-05-04 13:04:48 +02:00
Niels Martin Hansen
79b6ce2583 Move style catalog indexing and naming logic 2014-05-04 13:03:04 +02:00
Thomas Goyne
c30ca1a321 Remove progress throttling from ffms indexing 2014-05-03 17:22:38 -07:00
Thomas Goyne
d672e75109 Filter out redundant progress updates sooner
Sending events from background threads to the main thread is somewhat
expensive, so filter out progress updates which don't actually change
the progress on the background thread.
2014-05-03 17:22:38 -07:00
Thomas Goyne
6a1321e1df Move the serialization for the subtitles providers to SubtitlesProvider 2014-05-03 17:22:38 -07:00
Niels Martin Hansen
451c6751de Preferences page for default style catalogs 2014-05-03 22:23:01 +02:00
Niels Martin Hansen
6b827abec0 Config options for default style catalogs for various formats 2014-05-03 21:08:37 +02:00
Niels Martin Hansen
f45f73151e Copy styles from Default catalog to new files 2014-05-03 20:02:52 +02:00
Niels Martin Hansen
3260a5fa1a Update about box 3rd-party library credits 2014-05-03 02:14:12 +02:00
Niels Martin Hansen
9c2f12a786 Clearer error messages when audio open fails
The existing chain of errors from all providers can be really confusing,
so instead try to interpret the exception type to add some meaning.
2014-05-03 01:05:09 +02:00
Thomas Goyne
2587625af4 Fix non-pch compilation 2014-05-01 13:48:46 -07:00
Thomas Goyne
f7f6c2b90b Switch to using csri_open_mem 2014-05-01 13:39:35 -07:00
Thomas Goyne
af20d31699 Push the dropping of non-visible lines into the serialization logic
Makes things way less gross and trivially faster.
2014-05-01 13:39:35 -07:00
Thomas Goyne
7a5c92aaee Speed up TextFileWriter a bit
Write the text and the newline separately rather than appending the
newline to the text to eliminate a copy of the text.
2014-05-01 13:39:35 -07:00
Thomas Goyne
4366ece827 Speed up passing subtitles to VSFilter a little
Use temp_file_mapping so that it normally never actually hits the disk
on Windows and use AssSubtitleFormat directly.
2014-04-30 06:29:37 -07:00
Thomas Goyne
1eba2f035c Add a separate SSA subtitle format and move all of the SSA writing stuff there 2014-04-30 06:29:37 -07:00
Thomas Goyne
31af9c575f Extract duplicated ASS writing code from libass provider 2014-04-30 06:29:37 -07:00
Thomas Goyne
431b096f51 Fix loading modules with UTF-8 BOMs
Ensure MoonScript gets loaded before we install our package loader to
avoid having its package loader used over ours.
2014-04-28 14:19:16 -07:00
Thomas Goyne
606e3f4882 Fix crash on script load errors 2014-04-28 13:36:56 -07:00
Thomas Goyne
e3fa270345 Process any pending log text when a progress dialog completes 2014-04-28 11:01:57 -07:00
Thomas Goyne
8aa3c8761c Unswap the actor and effect columns in the grid 2014-04-28 10:10:33 -07:00
Thomas Goyne
aa850688f4 Don't try to open compressed subtitle tracks
Actually supporting them would be even better of course, but at least
don't crash on them.
2014-04-28 08:43:25 -07:00
Thomas Goyne
c74045cf20 Use spin controls for numeric fields in the style editor
Closes #1741.
2014-04-28 07:38:33 -07:00
Thomas Goyne
63f4bf1beb Switch from regular Lua to LuaJIT 2014-04-28 07:38:30 -07:00
Thomas Goyne
9492192b73 Switch back to building Lua as C
In preparation for switching to LuaJIT, which doesn't support PUC Lua's
thing of using C++ exceptions for lua_error.

Requires replacing all uses of lua_error (and things calling lua_error)
with custom versions that throw an exception instead and adding an
exception -> lua error wrapper at all C++ -> Lua boundaries.
2014-04-27 10:37:23 -07:00
Thomas Goyne
e3eb28ffd1 Extract some duplicated table pushing code 2014-04-27 09:15:35 -07:00
Thomas Goyne
689c16deb3 Use lua_createtable where applicable 2014-04-27 09:15:35 -07:00
Thomas Goyne
50e27d8247 Shut up warning 2014-04-26 08:16:38 -07:00
Thomas Goyne
2adcc76cf6 Switch automation tests to busted
This requires shuffling a bunch of stuff around to get a CLI lua
executable that uses an automation-like environment, but that's
something that'll be nice to have in the future anyway.

Busted indirectly depends on lfs and we currently can't use external
binary modules, so add a copy of lfs to the repo and build it with
Aegisub.
2014-04-26 08:16:38 -07:00
Thomas Goyne
b8af29da0d Move some of the automation machinery to libaegisub 2014-04-25 15:03:18 -07:00
Thomas Goyne
15ae2b0ccc Eliminate a bunch of explicit constructors/destructors
Use explicitly defaulted destructors for base cases when possible,
eliminate aggregate initialization constructors where possible, and push
some more stuff to NSDMIs.
2014-04-25 14:53:24 -07:00
Thomas Goyne
4cd92ee532 Move stuff only ever used in auto4_lua.cpp to an anonymous namespace there 2014-04-25 09:27:27 -07:00
Thomas Goyne
e7734e642d Use nullptr 2014-04-25 08:59:43 -07:00
Thomas Goyne
d0603fde88 Don't check for used extradata ids if there are none 2014-04-25 08:59:43 -07:00
Niels Martin Hansen
d53c36e67f Merge branch 'extradata'
Conflicts:
	src/ass_parser.cpp
2014-04-25 17:22:15 +02:00
Thomas Goyne
d4fbe3040d Preserve the insertion point (but not selection) when switching between lines 2014-04-25 08:00:45 -07:00
Niels Martin Hansen
f278c35f3f Dynamically use either inline_string escaping or uuencoding for extradata
Since luabins generates binary data which grows up to 3x by escaping,
it's more efficient to uuencode that instead.
A marker is placed as the first character of the value field, either
'e' for inline_string escaped text, or 'u' for uuencoded binary data.
The key is always inline_string escaped, as it will typically be
human readable.
2014-04-25 16:04:08 +02:00
Thomas Goyne
6ee1b8ca52 Update the start sample between blocks in the ram audio provider correctly 2014-04-24 19:08:05 -07:00
Thomas Goyne
cef07785d7 Remove a pointless ++ and make stuff const 2014-04-24 18:51:54 -07:00
Niels Martin Hansen
7839e8c983 Fix bug in extradata id list reading 2014-04-25 00:05:32 +02:00
Niels Martin Hansen
b2768b7abd Work around boost::format bug
See https://svn.boost.org/trac/boost/ticket/9360
It seems that the %X specifier is ignored if the input value is a char type
and the char is instead output verbatim and not in its integer value.
Casting it to an int works around this.
2014-04-24 23:54:42 +02:00
Niels Martin Hansen
3f08b1d057 Use lua_pushlstring() so strings with embedded NULs also work 2014-04-24 23:49:36 +02:00
Niels Martin Hansen
18f55eaebf Load luabins library into Auto4 Lua environment 2014-04-24 23:01:27 +02:00