Commit graph

567 commits

Author SHA1 Message Date
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