Commit Graph

66 Commits

Author SHA1 Message Date
Thomas Goyne 238356406f Extract calltip logic from the edit ctrl to libaegisub 2012-11-12 18:35:25 -08:00
Thomas Goyne 67df64e879 Use range-based for loops in a bunch of places 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 0893ed3f0a Remove references to tr1 2012-11-10 18:05:57 -08:00
Thomas Goyne b077c0991b Move the split line at cursor functionality to commands 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 76adcad999 Move the spellchecker base class to libaegisub 2012-11-10 18:05:57 -08:00
Thomas Goyne bd78692148 Use wxSTC::GetTextRaw rather than converting utf-8 -> wxString -> utf-8 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 83761d881a Convert AssFile::Line to an intrusive list
Gives O(1) pointer -> iterator conversions, better memory usage, better
performance, and overall slightly simplifies the code using 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 df60c2e7a4 Factor out a bunch of duplicated code for clipboard stuff 2012-10-25 17:39:49 -07:00
Thomas Goyne 53433426bb Fix some stuff from Coverity Scan
Mostly just bugs in unreachable code and stylistic things, but there's a
few incorrect reachable things that were working by coincidence and
gratuitous dynamic_casts.
2012-10-15 18:16:09 -07:00
cantabile 3a81e80aa5 Add workaround for tabbing out of SubsTextEditCtrl
wxStyledTextCtrl eats the tabs, so handle them in
SubsTextEditCtrl::OnKeyDown()

Originally committed to SVN as r6881.
2012-05-28 14:18:07 +00:00
Thomas Goyne 4d7c6b08e0 Leave the current line selected after splitting at cursor rather than selecting the new line
Originally committed to SVN as r6745.
2012-05-03 03:14:11 +00:00
Thomas Goyne fb5f94ca74 Change the spell checker and thesaurus language lists to radio items rather than check items
Originally committed to SVN as r6712.
2012-04-21 15:13:51 +00:00
Thomas Goyne e5540de2da Delay creation of the thesaurus until it's needed
Although in absolute terms it does not take very long, loading the 18 MB
en_US thesaurus was about three quarters of Aegisub's total startup
time when opening with no command line arguments.

Originally committed to SVN as r6702.
2012-04-16 23:54:47 +00:00
Thomas Goyne b32515da80 Strip trailing whitespace from all cpp and h files
Originally committed to SVN as r6600.
2012-03-25 04:05:06 +00:00
Thomas Goyne a815d35f51 Unswap preserve and estimate times when splitting lines at the cursor
Originally committed to SVN as r6594.
2012-03-23 03:45:35 +00:00
Thomas Goyne 7e5b241260 Use SubsTextEditCtrl in the translation assistant
This gives spellchecking and thesaurus support for the translation (and
syntax highlighting, but that usually won't be useful).

Originally committed to SVN as r6578.
2012-03-12 23:34:45 +00:00
Thomas Goyne 7992009392 Treat an unclosed override block as plain text in the syntax highlighter to match vsfilter
Originally committed to SVN as r6504.
2012-02-22 22:36:55 +00:00
Thomas Goyne 7e9608cf7a Adjust syntax highlighting of template lines to match how karaoke templater parses the line
Originally committed to SVN as r6503.
2012-02-22 22:36:45 +00:00
Thomas Goyne 57fc4145d9 Always use the same language for all spellchecker instances as having different languages in different places is weird
Originally committed to SVN as r6395.
2012-01-31 00:43:49 +00:00
Thomas Goyne 6e09fb1abf Reset syntax highlighter state at the end of override blocks correctly
With incomplete (or possibly incomplete for \r and \fn) tags at the end
of an override block, the text at the beginning of the next override
block was being incorrectly parsed as part of that tag.

Originally committed to SVN as r6317.
2012-01-19 19:46:09 +00:00
Thomas Goyne ca5c968d4f Non-precomp-header compilation fixes
Originally committed to SVN as r6280.
2012-01-12 22:32:20 +00:00
Thomas Goyne 86aacca631 Move SplitLine from SubtitlesGrid to SubsEditCtrl
This still isn't a very good place for the functionality, but it breaks
SubsEditCtrl's dependency on SubtitlesGrid.

Originally committed to SVN as r6275.
2012-01-11 19:19:30 +00:00
Thomas Goyne c8d67ea0ff Fix disabling the spellchecker
Originally committed to SVN as r6274.
2012-01-11 19:19:21 +00:00
Thomas Goyne 3f8b9b8213 Fix use of uninitialized variables in GetWordAtPosition when the position is not in a word
Originally committed to SVN as r6271.
2012-01-11 19:18:54 +00:00
Thomas Goyne 1293f86afe Refactor SubsTextEditCtrl::OnContextMenu a bit
Originally committed to SVN as r6270.
2012-01-11 19:18:45 +00:00
Thomas Goyne 4726402abd Don't embolden spell check suggestions
Setting the font to bold also changes the font size, which results in
the suggestions looking worse than the default appearance is.

Originally committed to SVN as r6269.
2012-01-11 19:18:35 +00:00
Thomas Goyne 3c62a38c7a Replace MyThes thesaurus implementation with a custom one
Fixes a pile of unicode-related issues, such as dictionaries in a path
which does not fit into the system's local charset, and significantly
cuts down on the amount of code.

Originally committed to SVN as r6250.
2012-01-08 01:36:50 +00:00
Thomas Goyne 68b2ae8275 Eliminate most clang warnings
Originally committed to SVN as r6183.
2011-12-28 21:27:22 +00:00
Thomas Goyne 7adbe07b4e Silence a bunch of PREFast warnings
Originally committed to SVN as r6162.
2011-12-26 22:20:49 +00:00
Thomas Goyne ffa622d698 Fix compilation without precompiled headers
Originally committed to SVN as r5791.
2011-10-28 20:15:10 +00:00
Thomas Goyne f9f84b18f7 Use the error style for the entire thing-that-can't-be-a-tag-name rather than just the first character when a backslash is followed by garbage in an override block
Originally committed to SVN as r5786.
2011-10-26 02:48:08 +00:00
Thomas Goyne a3d9deddb9 Fix endless recursion between SubsTextEditCtrl::UpdateCallTip and UpdateStyle
Originally committed to SVN as r5730.
2011-10-11 00:06:25 +00:00
Thomas Goyne a260a998b3 Convert newlines to \N when pasting rather than trying to clean them up later
Originally committed to SVN as r5727.
2011-10-10 20:59:04 +00:00
Thomas Goyne 9b9482b96f Set the subs box's style and size correctly
Originally committed to SVN as r5672.
2011-09-29 04:38:15 +00:00
Thomas Goyne a25c5c1909 Rewrite the subtitles edit control's syntax highlighting
Simplify and clean up the parsing code to better represent how VSFilter
actually handles many odd edge cases as well as making it significantly
faster.

Use an enum for syntax style IDs rather than magic numbers.

Add styles for comments, draw mode and karaoke templater variables
rather than reusing other styles and move some hardcoded style
information to the config file.

Operate on the utf-8 representation of the edit box text rather than a
wxString, as it's both faster and simpler.

Originally committed to SVN as r5615.
2011-09-28 19:44:34 +00:00
Thomas Goyne cc147d1660 Eliminate uses of c_str made unnecessary by changed to wxString::Format in wx 2.9
Originally committed to SVN as r5612.
2011-09-28 19:43:48 +00:00
Thomas Goyne d990bbbb99 Eliminate all unnecessary uses of L and _T
Originally committed to SVN as r5611.
2011-09-28 19:43:11 +00:00
Thomas Goyne d82e2bb496 Use wxEVT_CONTEXT_MENU for context menus rather than right button down so that the context menu key works correctly. Updates #1238.
Originally committed to SVN as r5578.
2011-08-31 04:17:37 +00:00
Thomas Goyne b8a1674c27 Remove some cruft from ScintillaTextCtrl and make SetUnicodeStyling significantly faster
Originally committed to SVN as r5570.
2011-08-27 06:52:35 +00:00
Thomas Goyne 833e69b09f Replace MIN/MAX/MID with std::min/std::max/mid
Originally committed to SVN as r5078.
2010-12-31 21:03:03 +00:00
Amar Takhar c15777f844 Merge audio_display_rewrite branch to trunk. This is not a complete work, don't expect to time anything for a while.
Originally committed to SVN as r4903.
2010-12-08 03:36:10 +00:00
Thomas Goyne 13f052317e Convert OptionValue over to agi::signal
Originally committed to SVN as r4899.
2010-12-07 19:09:15 +00:00
Thomas Goyne ea5a042046 Cache the list of dictionary languages
Originally committed to SVN as r4847.
2010-11-18 03:00:08 +00:00
Thomas Goyne 6affce0581 Make OPT_GET return a const OptionValue* and add OPT_SUB/OPT_UNSUB for subscribing to option changes
Originally committed to SVN as r4834.
2010-11-08 05:08:24 +00:00
Thomas Goyne 0248e7c754 Add listeners for most non-audio options that need them. Closes #1047.
Originally committed to SVN as r4764.
2010-08-26 18:38:37 +00:00
Thomas Goyne 71fb04cd29 Rework most of the various factories to not need an explicit helper class for each class constructable via a factory.
Originally committed to SVN as r4716.
2010-08-02 06:31:38 +00:00