Thomas Goyne
b59b3c56fc
Add lua bindings for open and save standard dialogs
...
Originally committed to SVN as r6499.
2012-02-22 04:17:16 +00:00
Thomas Goyne
048fc44cfa
Add aegisub.file_name() to get the file name of the subtitles file
...
If called during a macro processing or validation function when the
subtitles have a valid file name (i.e. they've been saved and are not
Untitled), this returns the name of the file, without the path. If
called at any other time, it returns nil.
Originally committed to SVN as r6498.
2012-02-21 23:32:58 +00:00
Thomas Goyne
2dd01747f8
Fix crash on underrun in the alsa player
...
Originally committed to SVN as r6497.
2012-02-20 18:22:43 +00:00
Thomas Goyne
fb6d3daf8b
Eliminate all uses of volatile in the alsa player and just lock reads instead
...
Originally committed to SVN as r6496.
2012-02-20 18:22:37 +00:00
Thomas Goyne
df73e15f0f
Include C++ versions of C headers rather than the C versions
...
Originally committed to SVN as r6495.
2012-02-20 18:22:31 +00:00
Thomas Goyne
3fdb50925e
Explicitly flag the precompiled header as a C++ header to silence a clang warning
...
Originally committed to SVN as r6494.
2012-02-20 18:22:25 +00:00
Thomas Goyne
f79e933ac9
Bump required version of ffms2 to 2.16
...
Originally committed to SVN as r6493.
2012-02-20 18:22:20 +00:00
Thomas Goyne
17b0d83831
Use scoped_holder in a handful of places
...
Originally committed to SVN as r6492.
2012-02-20 18:22:12 +00:00
Thomas Goyne
b9ddf00ead
Add a scoped holder similar to scoped_ptr for handles that may or may not be pointers
...
Originally committed to SVN as r6491.
2012-02-20 18:22:04 +00:00
Thomas Goyne
ad7d7c2be3
Don't return a dummy icon when no icon is found for a command
...
The hotkey editor initially required this, but now that we've using
fully custom renderers they're no longer needed, and the blank icons
didn't work correctly on wxGTK.
Originally committed to SVN as r6490.
2012-02-20 05:41:54 +00:00
Thomas Goyne
113c85bda0
Fix crash on aegisub.log(0, nil)
...
Originally committed to SVN as r6489.
2012-02-20 05:15:18 +00:00
Thomas Goyne
53c2c8821b
Redesign BlockCache's age tracking to run in constant time
...
Speeds up spectrum painting by 40-90% depending on how much of the audio
data is being read from the cache.
Originally committed to SVN as r6488.
2012-02-20 05:15:10 +00:00
Thomas Goyne
ffa7e70f5c
Fix compilation on 64-bit linux with clang
...
Originally committed to SVN as r6487.
2012-02-20 05:15:00 +00:00
Thomas Goyne
8e0f6c8d25
Add KP_Enter to the default hotkeys for commit in the translation assistant and styling assistant. Closes #1414 .
...
Originally committed to SVN as r6486.
2012-02-18 00:41:18 +00:00
Thomas Goyne
7f513e675d
Replace newlines with \N when modifying text via the translation assistant. Updates #1414 .
...
Originally committed to SVN as r6485.
2012-02-18 00:41:08 +00:00
Thomas Goyne
b1930f06e5
Actually set the volume/audio zoom to the saved values rather than just setting the slider positions
...
Originally committed to SVN as r6484.
2012-02-18 00:40:58 +00:00
Thomas Goyne
72ee3efdc3
Rename the audio rendering style enum values to reflect how they're actually used
...
Originally committed to SVN as r6483.
2012-02-17 00:14:45 +00:00
Thomas Goyne
57b6a1f03a
Remove the nonfunctional Restore Defaults button from the preferences dialog
...
Originally committed to SVN as r6482.
2012-02-17 00:14:35 +00:00
Thomas Goyne
46254613c8
Batch up log messages in DialogProgress and append them in OnIdle
...
This signficantly improves performance with spammy automation macros
(karaoke templater with the log level set to Trace is 10-15x faster),
and helps ensure that clicks on the Cancel button are actually processed
in a timely manner.
Originally committed to SVN as r6481.
2012-02-16 21:22:04 +00:00
Thomas Goyne
a3ef701f17
Add a [Script Info] section in SetScriptInfo if none exists
...
Originally committed to SVN as r6480.
2012-02-16 21:21:55 +00:00
Thomas Goyne
e5e2b84b15
Ensure that loaded files always have a style and dialogue line
...
Fixes crashes and general brokenness when opening invalid files.
Originally committed to SVN as r6479.
2012-02-16 21:21:35 +00:00
Thomas Goyne
fc64bcaa36
Don't normalize syllable durations when parsing karaoke for automation
...
Originally committed to SVN as r6478.
2012-02-16 05:21:00 +00:00
Thomas Goyne
6339df3521
Correct the calculation for the position of right-aligned lines in the visual tools
...
Originally committed to SVN as r6477.
2012-02-16 03:52:50 +00:00
Thomas Goyne
9b69ce7a27
Add support for noncontiguous selections to the duplicate lines commands
...
Originally committed to SVN as r6476.
2012-02-15 22:14:10 +00:00
Thomas Goyne
d4e1c90a04
Force a repaint of the window after opening files from the command line. Closes #1419 .
...
Originally committed to SVN as r6475.
2012-02-15 21:24:00 +00:00
Thomas Goyne
a2872158a9
Remember the last used audio zoom and volume and restore it
...
Originally committed to SVN as r6474.
2012-02-15 21:23:52 +00:00
Thomas Goyne
5bf7342019
Add a Lua binding for wxRegEx
...
Lua's built in regular expression engine is rather limited in features
compared to wx's, and operates on bytes rather than characters due to
not being unicode-aware.
Originally committed to SVN as r6473.
2012-02-15 21:23:42 +00:00
Thomas Goyne
1c2fb01f0a
Copy the cached entry data in AssStyle's operator=. Closes #1453 .
...
Originally committed to SVN as r6472.
2012-02-14 00:35:41 +00:00
Thomas Goyne
17b293865b
Override CanWriteFile in the Encore subtitle format as the default extension check doesn't work for the weird filename format
...
Originally committed to SVN as r6471.
2012-02-14 00:35:33 +00:00
Thomas Goyne
3252503eaa
Check for updates after loading files passed on the command line as the update checker dialog interacts poorly with the loading modal dialogs
...
Originally committed to SVN as r6470.
2012-02-14 00:35:25 +00:00
Thomas Goyne
105a6bd68a
Force Encore subtitles to UTF-8 as Encore doesn't like non-unicode encodings
...
Originally committed to SVN as r6469.
2012-02-14 00:35:16 +00:00
Thomas Goyne
fae7261bd0
Make AssTime::ParseASS a constructor overload instead
...
Originally committed to SVN as r6468.
2012-02-14 00:35:06 +00:00
Thomas Goyne
26b7970ed0
Add missing milliseconds to samples conversion that resulted in audio playback stopping when the start or end time of the line was changed
...
Originally committed to SVN as r6467.
2012-02-12 04:16:21 +00:00
Thomas Goyne
437cd47cd3
Don't block editing storage styles with the same name as a style on the current script
...
Originally committed to SVN as r6466.
2012-02-12 04:16:14 +00:00
Thomas Goyne
952bc02c07
Enable lua stack checking in debug builds
...
Originally committed to SVN as r6465.
2012-02-10 02:16:49 +00:00
Thomas Goyne
3fd457ac68
Fix memory corruption after automation macro errors
...
Originally committed to SVN as r6464.
2012-02-10 01:41:22 +00:00
Thomas Goyne
fbc93bb98a
Fix non-precomp header compilation
...
Originally committed to SVN as r6463.
2012-02-10 00:04:42 +00:00
Thomas Goyne
30e1679a78
Create a new line when committing the last line via the audio display when Next Line on Commit is enabled, as in 2.1.x
...
Originally committed to SVN as r6462.
2012-02-10 00:04:34 +00:00
Thomas Goyne
47cf5c8629
Support dragging multiple markers at once in the dialogue timing controller
...
When ctrl is held down and the user clicks on one of the active line's
markers, all markers at the same position as the clicked marker (for
both active and inactive lines) are now moved along with the clicked
marker.
Closes #20 .
Originally committed to SVN as r6461.
2012-02-10 00:04:24 +00:00
Thomas Goyne
32c8cc0974
Modify the TimingController interface to support dragging more than one marker at once. Updates #20 .
...
Originally committed to SVN as r6460.
2012-02-10 00:04:13 +00:00
Thomas Goyne
51a3831794
Remove charset detection from AssFile::Load
...
All of the subtitle formats also already do charset detection when
needed, so doing it in it AssFile::Load is pointless and results in
performing the auto-detection even when it's pointless (because the
format isn't text-based or always uses a single encoding).
Originally committed to SVN as r6459.
2012-02-10 00:04:05 +00:00
Thomas Goyne
e20bc09052
colorspace.(cpp|h) cosmetics
...
Originally committed to SVN as r6458.
2012-02-10 00:03:56 +00:00
Thomas Goyne
16627dbfe7
Clean up DialogVersionCheck a bit
...
Originally committed to SVN as r6457.
2012-02-10 00:03:46 +00:00
Thomas Goyne
de7df882e9
Seek audio to the line on double-click in the grid in addition to video
...
Originally committed to SVN as r6456.
2012-02-07 23:17:26 +00:00
Thomas Goyne
07327c2b65
Add position information to the error message when aegisub.log is called with bad arguments
...
Originally committed to SVN as r6455.
2012-02-07 23:17:06 +00:00
Thomas Goyne
003322813e
Clean up VideoProviderCache a bit
...
Originally committed to SVN as r6454.
2012-02-07 23:16:41 +00:00
Thomas Goyne
1075b71976
Prompt to update uses of the style when "Default" is renamed
...
As far as I can tell, Default was only excluded to avoid prompting when
creating a new style, but whether or not a style is new is now an
explicit parameter to the editor so it's unneeded.
Originally committed to SVN as r6453.
2012-02-07 20:42:44 +00:00
Thomas Goyne
fcffb010b9
Fix check for \i?clip in cleantags. Updates #1450 .
...
Originally committed to SVN as r6452.
2012-02-07 01:23:00 +00:00
Thomas Goyne
26f3bb26ba
Remove some incorrect uses of ellipses
...
Ellipses are used to indicate that a command will require additional
input from the user, not that a dialog will be opened.
Originally committed to SVN as r6451.
2012-02-07 01:22:50 +00:00
Thomas Goyne
b262a07180
Don't mark paths as translatable
...
Originally committed to SVN as r6450.
2012-02-07 01:22:42 +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
38c905d32a
Call Validate before invoking commands via hotkeys
...
Originally committed to SVN as r6448.
2012-02-07 01:22:23 +00:00
Thomas Goyne
51cbc353b3
Fix crashes after reloading automation scripts
...
Originally committed to SVN as r6447.
2012-02-07 01:22:15 +00:00
Thomas Goyne
489d5bbec6
Ignore the Maximize option for dialogs which aren't supposed to be maximizable. Closes #1451 .
...
Originally committed to SVN as r6446.
2012-02-07 01:22:06 +00:00
Thomas Goyne
813f23e762
Check whether the dialog is maximized rather than whether it's not iconized in PersistLocation. Updates #1451 .
...
Originally committed to SVN as r6445.
2012-02-07 01:21:56 +00:00
Thomas Goyne
5a53aa5511
Delete aegisub.h. It's been a few years since it last had anything in it.
...
Originally committed to SVN as r6444.
2012-02-07 01:21:47 +00:00
Thomas Goyne
68c9989c89
Clean up DummyVideoProvider a bit
...
Originally committed to SVN as r6443.
2012-02-07 01:21:37 +00:00
Thomas Goyne
f48ccc0640
Make the version check dialog a bit wider
...
Originally committed to SVN as r6442.
2012-02-03 00:54:09 +00:00
Thomas Goyne
bd38cfc305
Only age the renderer caches when a new block is created
...
Originally committed to SVN as r6441.
2012-02-02 22:58:15 +00:00
Thomas Goyne
fc932dddc7
Convert BlockCache from LFU to LRU
...
In practice there were usually <10 calls to Get per call to Age,
resulting in everything but the most recently used block having an
access count of 0. This resulted in it having essentially random
eviction, which worked decently due to the size of the cache, but with a
significant speed overhead for the LFU tracking.
Originally committed to SVN as r6440.
2012-02-02 22:58:06 +00:00
Thomas Goyne
7ca0ad3233
Repaint the entire audio display when style ranges change
...
In practice, painting audio from the cache isn't all that expensive, so
the limited refreshing was just introducing places for bugs without
improving performance all that much.
Closes #1432 .
Originally committed to SVN as r6439.
2012-02-02 22:57:53 +00:00
Thomas Goyne
ddc8dc9eca
Only wrap the avisynth-using part of AvisynthVideoProvider's constructor with try/catch so that avisynth is still initialized when the catch handler runs, which is required to actually get an error message. Closes #1444 .
...
Originally committed to SVN as r6438.
2012-02-02 20:51:07 +00:00
Thomas Goyne
c5c829357d
Use wxAutoBufferedPaintDC for ToggleButton
...
Originally committed to SVN as r6437.
2012-02-02 20:50:56 +00:00
Thomas Goyne
bd7f338115
Don't copy fonts which appear in styles but are never actually used
...
Originally committed to SVN as r6436.
2012-02-02 19:31:37 +00:00
Thomas Goyne
da61e75f75
Skip inline comments when gathering things to collect fonts for
...
Originally committed to SVN as r6435.
2012-02-02 19:31:27 +00:00
Thomas Goyne
6652ef40e9
Increase the amount of information reported when fonts can't be found
...
List the styles using the font along with lines which use the font via
overrides, and add a warning at the end when some glyphs could not be
found to reduce the chance of the user failing to notice it.
Originally committed to SVN as r6434.
2012-02-02 19:18:40 +00:00
Thomas Goyne
6c365f0e6a
Remove VideoProvider::GetPosition, as it's unused and unneeded
...
Originally committed to SVN as r6433.
2012-02-02 19:18:30 +00:00
Thomas Goyne
6717334c12
Fix crash when trying to seek to keyframes via the video slider with no keyframes loaded, and use wxAutoBufferedPaintDC rather than manual double-buffering
...
Originally committed to SVN as r6432.
2012-02-02 19:18:21 +00:00
Thomas Goyne
b8a7c6cb1e
Remove scoped_ptr::swap
...
Originally committed to SVN as r6431.
2012-02-02 19:18:10 +00:00
Thomas Goyne
d68a7e81b0
Add (optional) overlapping line correction to the timing postprocessor
...
Trying to use this at the same time as adding lead in/out will probably
not have useful results.
Originally committed to SVN as r6430.
2012-02-01 23:59:40 +00:00
Thomas Goyne
eebcf34edb
Don't decode audio URIs stored on the script as it currently always stores the absolute path and the decoding breaks dummy audio URIs
...
Originally committed to SVN as r6429.
2012-02-01 23:59:32 +00:00
Thomas Goyne
3d6e5e7d39
Fix incorrect styling of overlapping inactive lines
...
Originally committed to SVN as r6428.
2012-02-01 23:59:23 +00:00
Thomas Goyne
aaf7285a6e
Remove UI-related responsibilities from AudioController
...
Keeping track of audio markers and labels to be shown in the audio
display is not particularly related to AudioController's primary
responsiblity of controlling the playback of audio.
Originally committed to SVN as r6427.
2012-02-01 23:59:12 +00:00
Thomas Goyne
01b92aa4e3
Change AudioController's public API from samples to milliseconds
...
The sample rate of the currently open audio is not something that things
which do not interact with the raw audio data should have to care about,
or even know about.
Originally committed to SVN as r6426.
2012-02-01 23:58:58 +00:00
Thomas Goyne
bba825ed0d
Clear the error color when an automation script which previously failed to load loads successfully
...
Originally committed to SVN as r6425.
2012-02-01 18:47:47 +00:00
Thomas Goyne
9dbfe5d8e5
Update the visual tool buttons when the active tool is changed via hotkey
...
Originally committed to SVN as r6424.
2012-02-01 18:47:37 +00:00
Thomas Goyne
4ea45627b5
Remove periods from the end of help strings
...
Originally committed to SVN as r6423.
2012-02-01 18:47:26 +00:00
Thomas Goyne
2dcd4ff2a6
Mark the style name collision messages as translatable
...
Originally committed to SVN as r6422.
2012-02-01 18:47:18 +00:00
Thomas Goyne
439b1272b0
Select current style when the style manager is opened
...
Originally committed to SVN as r6421.
2012-02-01 18:47:10 +00:00
Thomas Goyne
f0933ecb1a
When adding new hotkeys, automatically select and start editing the new hotkey
...
Originally committed to SVN as r6420.
2012-02-01 18:47:00 +00:00
Thomas Goyne
499a9b2869
Set thread priorty between Create() and Run()
...
Originally committed to SVN as r6419.
2012-02-01 14:23:52 +00:00
Thomas Goyne
fbe00eabe8
Bump up the size of the log window in the font collector dialog so that it can actually fit font names without wrapping
...
Originally committed to SVN as r6418.
2012-02-01 04:17:39 +00:00
Thomas Goyne
db7924d646
Add a warning in the fontconfig font collector when the chosen font does not have glyphs for some of the characters used in that font
...
Originally committed to SVN as r6417.
2012-02-01 04:17:33 +00:00
Thomas Goyne
98b51e2c23
Clean up DialogStyleManager a bit, eliminating a decent amount of duplicated code and fixing issues with the logic for enabling and disabling the buttons.
...
Originally committed to SVN as r6416.
2012-02-01 00:48:50 +00:00
Thomas Goyne
c6ac746215
Kill DialogStyleManager::OnClose as it just does the default thing
...
Originally committed to SVN as r6415.
2012-02-01 00:48:42 +00:00
Thomas Goyne
b48436c5de
Skip unprocessed key events in the style manager
...
Originally committed to SVN as r6414.
2012-02-01 00:48:33 +00:00
Thomas Goyne
3be4693480
Uncrustify AssStyleStorage a bit
...
Originally committed to SVN as r6413.
2012-02-01 00:48:24 +00:00
Thomas Goyne
ac5af24014
Remove pointless #ifdef __APPLE__ around CmdDown()
...
The entire point of CmdDown is that it calls ControlDown on non-OS X, so
the ifdefs are completely pointless.
Originally committed to SVN as r6412.
2012-02-01 00:48:16 +00:00
Thomas Goyne
7bd0691bd7
In PersistLocation get the new location of the dialog directly from the dialog rather than from the event as the data in the event is wrong
...
Originally committed to SVN as r6411.
2012-02-01 00:48:07 +00:00
Thomas Goyne
04cc422391
Close the spell checker after all lines have been checked rather than only once there are no errors remaining. Closes #1442 .
...
Originally committed to SVN as r6410.
2012-02-01 00:47:57 +00:00
Thomas Goyne
3af57cdbcd
Copy the source line's group in AssDialogue's copy constructor as copying wxStrings is far faster than constructing new ones
...
Originally committed to SVN as r6409.
2012-02-01 00:47:49 +00:00
Thomas Goyne
a7d54f3d69
Make AssEntry::group const as it really should never change
...
Originally committed to SVN as r6408.
2012-02-01 00:47:38 +00:00
Thomas Goyne
8bef1eb874
Destruct AssFiles on a background thread as it's rather slow with large files
...
Originally committed to SVN as r6407.
2012-02-01 00:47:28 +00:00
Thomas Goyne
64553dd633
Handle commands which change types at runtime. Closes #1413 .
...
Originally committed to SVN as r6406.
2012-01-31 04:04:02 +00:00
Thomas Goyne
983ffc1e83
Add some dumb heuristics to detect binary files in the charset detector to avoid taking forever feeding hundreds of MB through it. Closes #1438 .
...
Originally committed to SVN as r6405.
2012-01-31 04:03:55 +00:00
Thomas Goyne
d68a395499
Open files in binary mode for charset detection
...
Originally committed to SVN as r6404.
2012-01-31 04:03:50 +00:00
Thomas Goyne
fc96f1bd28
Swallow cancel exceptions thrown from opening audio from the script so that unrelated things aren't canceled
...
Originally committed to SVN as r6403.
2012-01-31 04:03:44 +00:00
Thomas Goyne
f774f21903
Explicitly do nothing when an empty container is passed to delete_clear as it's oddly slow otherwise
...
Originally committed to SVN as r6402.
2012-01-31 00:44:55 +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
3b0d2ae8e6
Add effect and actor to the things that lines can be sorted by
...
Originally committed to SVN as r6400.
2012-01-31 00:44:34 +00:00