Commit Graph

54 Commits

Author SHA1 Message Date
Thomas Goyne d9b56badbf Use wxSTC::GetTextRaw rather than converting utf-8 -> wxString -> utf-8 2012-12-17 10:32:15 -08: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
Thomas Goyne fde4a7815d Make the subtitle edit box auto-commit all changes
This happens to fix most of the undo issues, as it's now much harder to
have uncommitted changes to the file.

Closes #355 and #586.

Originally committed to SVN as r4699.
2010-07-20 03:11:11 +00:00
Thomas Goyne 4a8abae3a3 Kill options.h and options.cpp, which have been empty for a while
Originally committed to SVN as r4676.
2010-07-12 21:49:48 +00:00
Niels Martin Hansen c9c2fa6404 Move "active line" responsibility to the grid. There are at the very least a bunch of redraw issues that need to be sorted out, probably much worse things are hiding.
Originally committed to SVN as r4604.
2010-06-26 11:32:16 +00:00
Amar Takhar 40e12403d5 Merge all changes from the libaegisub branch into trunk, the effective range is r4175:4330. All options have been re-done and now use Cajun to support a json-backed format.
Initial support for low-level access and file I/O methods are included as well.

Originally committed to SVN as r4331.
2010-05-21 01:13:36 +00:00
Amar Takhar 4221919d4f merge r3983,r4002 (more string fixes.)
Originally committed to SVN as r4019.
2010-01-21 00:24:59 +00:00
Niels Martin Hansen 7e079a3fc2 Merge r3967 from 2.1.8, closes #971.
Originally committed to SVN as r3968.
2010-01-10 16:15:31 +00:00
Niels Martin Hansen 54ff8124b6 Merge r3907 back to trunk, closes #1072
Originally committed to SVN as r3908.
2009-12-27 19:49:27 +00:00
Amar Takhar aba73d4308 Remove 'pragma once' from colour_button.h font_file_lister.h gl_wrap.h subs_edit_ctrl.h.
Originally committed to SVN as r3536.
2009-09-16 12:18:09 +00:00
Amar Takhar d348b4e33e Fix all the headers in *.cpp, this includes:
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
 * Sorting alphabetically.

Originally committed to SVN as r3515.
2009-09-10 13:06:40 +00:00
Amar Takhar 7a8c5229fd * Remove wxprec.h from all files other than agi_pre.h. Including this in various headers is useless as it includes wx.h which includes dozens of 'common' wx headers. With this we're unable to tell which files rely on which interfaces. This commit removes them and manually places in required headers as-needed.
* Update agi_pre.h to include some missing headers, also move required windowsheaders to the top of the list
 * Use <> versus "" for the wx header in avisynth_wrap.cpp
 * Remove xx/wx.h from agi_pre.h as it's included by wxprec.h.

Originally committed to SVN as r3513.
2009-09-10 10:26:50 +00:00
Amar Takhar 6ee2f98349 Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs.  This isn't the actual document in itself but empty documentation using any old documentation if it was there.

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

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

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

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

Originally committed to SVN as r3310.
2009-07-29 05:43:02 +00:00