Commit graph

99 commits

Author SHA1 Message Date
Thomas Goyne 94b3764a91 Coalesce changes made in the Effect box
Originally committed to SVN as r6538.
2012-03-07 22:40:35 +00:00
Thomas Goyne 5e96d6e8c3 Remove periods from single-sentence tooltips
Originally committed to SVN as r6449.
2012-02-07 01:22:32 +00:00
Thomas Goyne c2d3c910c7 Replace some uses of "" with wxString()
Despite special-casing zero-length input, wxString("") takes over four
times as long as wxString() - and on a 10k line script, this change cuts
AssFile's copy constructor's runtime in half.

Originally committed to SVN as r6401.
2012-01-31 00:44:43 +00:00
Thomas Goyne 0bff490b7e Enable/disable the OK button in the TPP dialog when styles are (un)checked
Originally committed to SVN as r6387.
2012-01-27 23:35:31 +00:00
Thomas Goyne bc9c521cfd Apply the 'Subs Edit Box' hotkey handling to all of the text boxes in the subs edit area rather than just the main text edit. Closes #1431.
Originally committed to SVN as r6380.
2012-01-27 19:23:35 +00:00
Thomas Goyne a1ad0fa585 Use Scintilla's logic for deciding when to coalesce edit box changes
Scintilla's modification notifications don't expose enough information
to do a very good job of deciding when to group changes with previous
ones, but it does expose when Scintilla thinks undo groups should end,
so just use that.

This should significantly improve the behavior of undo when editing
lines in the edit box.

Originally committed to SVN as r6370.
2012-01-26 22:13:39 +00:00
Thomas Goyne e026d2a60a Fix copy/paste error that made the end time and duration boxes not work
Originally committed to SVN as r6338.
2012-01-22 18:18:00 +00:00
Thomas Goyne 4675dbb29d Factor out the placeholder text behavior from SubsEditBox and make it work better
Handle switching from placeholder/normal mode when the value is changed
externally (such as from the active line changing) in addition to on
focus/blur, and improve behavior when the user sets the text to the
placeholder text.

Originally committed to SVN as r6321.
2012-01-20 05:14:50 +00:00
Thomas Goyne 1ce9b0d31b Refactor SubsEditBox a bit to make the constructor less of a monolithic behemoth and eliminate some duplicated code.
Originally committed to SVN as r6320.
2012-01-20 05:14:44 +00:00
Thomas Goyne 40e4f887ba Make the enter-key-in-edit-box logic a standard hotkeyed command
Originally committed to SVN as r6294.
2012-01-14 01:40:21 +00:00
Thomas Goyne 54ebe9b37a Fix incorrect (un)wrapping of the subs edit box toolbar on video zoom changes
The size of the contents is not updated until after SubsEditBox::OnSize
is called, so the wrapping logic was being done based on the previous
available area, rather than the new size.

Originally committed to SVN as r6284.
2012-01-13 20:18:29 +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 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 477dd8a2f6 Try to preserve the value of the styles dropdown across undo/redo
Originally committed to SVN as r6139.
2011-12-22 21:31:29 +00:00
Thomas Goyne 1c2abeae30 Stop coalescing changes made in the edit box after ten seconds of no changes
Originally committed to SVN as r6137.
2011-12-22 21:31:09 +00:00
Thomas Goyne fd35224cb5 Stop coalescing changes for undo when the active line changes
Originally committed to SVN as r6136.
2011-12-22 21:31:01 +00:00
Thomas Goyne 046d8a6822 Use wxEventBlocker rather than manually enabling and disabling the event handler in SubsEditBox
Originally committed to SVN as r6133.
2011-12-22 21:30:32 +00:00
Thomas Goyne e5707ca6eb Don't use the ms time value of the Duration time edit control when in frame mode, as with vfr this may not actually represent a consisten number of frames
Originally committed to SVN as r6132.
2011-12-22 21:30:22 +00:00
Thomas Goyne 71345af81a Overload operator int() on AssTime and remove GetMS/SetMS
Originally committed to SVN as r6123.
2011-12-22 21:28:51 +00:00
Thomas Goyne 3a069b7f60 Clean up TimeEdit
Remove some unused or constant arguments and simplify some overly
convoluted logic.

Check for whether timecodes are open rather than whether video is open
to determine if by-frame mode is enabled.

Operate on a project context rather than using VideoContext::Get().

Use non-event-generating setter methods rather than a boolean ready
variable.

Make all member variables private and add setters rather than relying on
the client code calling Update when appropriate.

Eliminate flickering in overwrite mode.

Originally committed to SVN as r6056.
2011-12-22 21:18:16 +00:00
Thomas Goyne a66cc26706 Remove all calls to wxKeyEvent::StopPropagation. Key events don't propagate by default and even if they did, events which are marked as processed don't propagate further.
Originally committed to SVN as r6046.
2011-12-22 21:16:43 +00:00
Thomas Goyne d28c4c4d8b Kill AssEntry::Valid, as there wasn't actually any way to get a fully-constructed entry with it set to false
Originally committed to SVN as r6034.
2011-12-22 21:14:51 +00:00
Thomas Goyne 404e0fda4f Delete stuff in DialogSearchReplace
Originally committed to SVN as r6032.
2011-12-22 21:14:32 +00:00
Thomas Goyne 34a87b1c1e Silence a pile of /W4 warnings
Originally committed to SVN as r6001.
2011-12-22 21:09:31 +00:00
Thomas Goyne 262d5195c5 Add access keys for nearly all things which support them and were missing them. Closes #1070.
Originally committed to SVN as r5877.
2011-11-18 18:49:09 +00:00
Thomas Goyne 0db92549d7 Eliminate some probably spurious uninitialized variable warnings
Originally committed to SVN as r5875.
2011-11-18 04:06:03 +00:00
Thomas Goyne c119d2d84b Don't try to use the active line in a handler for COMMIT_NEW as it may not be valid
Originally committed to SVN as r5874.
2011-11-18 04:04:35 +00:00
Thomas Goyne 8831de5774 Modify a few strings to ease translations
Originally committed to SVN as r5870.
2011-11-17 02:21:46 +00:00
Thomas Goyne 2f394a7792 Fix compilation with clang (but not linking because wxAny is currently broken with it)
Originally committed to SVN as r5826.
2011-11-07 06:18:34 +00:00
Thomas Goyne be77dc8307 Mostly rewrite the visual tools and related classes
Convert all coordinates within the visual tools to Vector2D, which has
been significantly extended. Eliminates a lot of issues with accumulated
rounding errors and simplifies a lot of code.

Modernize the visual tools' interactions with the rest of Aegisub by
connecting to signals directly rather than routing everything through
the video display and converting the main visual tool mode toolbar to
the command system.

Extract all references to OpenGL from the visual tools and move them to
OpenGLWrapper as a first step towards making it possible to implement an
alternative video renderer. In the process, eliminate all uses of OpenGL
immediate mode.

Fix a bunch of minor issues and general instability.

Originally committed to SVN as r5823.
2011-11-06 17:18:20 +00:00
Thomas Goyne c1de03210d Set the style dropdown's value after undo
Originally committed to SVN as r5763.
2011-10-23 17:00:32 +00:00
Thomas Goyne 62f37772a3 Fix a pile of issues that resulted in the Actor box not working at all
Originally committed to SVN as r5758.
2011-10-19 04:05:09 +00:00
Thomas Goyne 035445e93a When the cursor is in a comment block, insert override tags at the beginning of the block rather than inside the comment
Originally committed to SVN as r5757.
2011-10-19 03:24:10 +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 bb72ec980e Actually select the new line when a new dialogue line is added due to the user switching to the next line from the edit box
Originally committed to SVN as r5652.
2011-09-28 19:50:32 +00:00
Thomas Goyne 67ab06e830 Add an optional argument to AssFile::Commit which indicates that only a single line was changed. Currently used only to cut down on file copies when coalescing.
Originally committed to SVN as r5614.
2011-09-28 19:44:24 +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 05da23b22f Mostly detangle the edit box from the subtitles grid
Originally committed to SVN as r5598.
2011-09-15 05:17:29 +00:00
Thomas Goyne d022d2ae56 Eliminate pointless (and slow) setting of the edit box to its current text
Originally committed to SVN as r5594.
2011-09-15 05:17:00 +00:00
Thomas Goyne 934a5b24eb Refine the commit types
Switch to a bitmask with much more finely-grained information about what
changed in the commit, fixing a few potential correctness problems and
significantly improving the performance of several scenarios where commits
are spammed very frequently.

Originally committed to SVN as r5590.
2011-09-15 05:16:32 +00:00
Thomas Goyne 561216d4c8 Make hotkey::check take a project context and make FrameMain::context private
Originally committed to SVN as r5532.
2011-07-29 23:16:55 +00:00
Thomas Goyne e6dc86212b Use the active line rather than first selected line in SubsEditBox
Originally committed to SVN as r5455.
2011-07-15 04:04:54 +00:00
Thomas Goyne 256e098aa7 Remove header include order requirements
Originally committed to SVN as r5449.
2011-07-15 04:04:13 +00:00
Thomas Goyne ccddf8eab1 Make hotkey::check return whether any hotkeys matched, and skip events which did not match any hotkeys
Originally committed to SVN as r5241.
2011-01-19 03:12:46 +00:00
Thomas Goyne df1dce3593 Kill SubtitlesGrid::ass and SubtitlesGrid::EditBox and convert everything that used them over to agi::Context
Originally committed to SVN as r5215.
2011-01-16 07:17:36 +00:00
Thomas Goyne e450cb3e7e Fix include paths
Originally committed to SVN as r5132.
2011-01-05 18:40:37 +00:00
Amar Takhar 167f09a610 Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 13:00:46 +00:00
Thomas Goyne 17c07cc131 Add timecodes opened signal to VideoContext
Originally committed to SVN as r5080.
2010-12-31 21:03:18 +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