Thomas Goyne
a75b7f6ca8
Prefetch the list of fonts for the style editor dialog
...
On my machine (with ~5000 fonts installed), enumerating the installed
fonts was about 75% of the total construction time of the style editor
dialog.
2013-07-09 08:35:50 -07:00
Thomas Goyne
72d4577d7d
Kill scoped_ptr in favor of unique_ptr
2013-06-11 16:06:58 -07:00
Thomas Goyne
2a2a623bb4
Fix importing styles from files in non-local charsets (i.e. hopefully all of them)
2013-06-09 07:53:07 -07:00
Thomas Goyne
f21a72992b
Use unique_ptr for most non-wx owning pointers
2013-06-08 19:21:49 -07:00
Thomas Goyne
14afce006e
Remove AssStyleStorage's dependencies on other Aegisub classes
2013-02-07 08:47:43 -08:00
Thomas Goyne
396ff897e5
Kill StandardPaths
...
It's now just a pointless wrapper around agi::Path.
2013-02-06 13:22:33 -08:00
Thomas Goyne
a0d3dbc550
Extract Loading/Saving/Undo stuff from AssFile
...
Add SubsController, which deals with things like what subtitle file is
currently open, rather than the contents of the current subtitle file.
Move the rest of the relevant logic from FrameMain there in addition to
all of the stuff from AssFile.
2013-02-06 13:22:32 -08:00
Thomas Goyne
ca9be4caef
Extract some duplicated wxFileSelector code to a helper function
2013-02-06 13:22:16 -08:00
Thomas Goyne
1e0f08c0ed
Mostly purge wxWidgets from non-UI stuff
...
Use boost::filesystem::path for all paths, and std::string for all other
strings, converting to/from wxString as close to the actual uses of wx
as possible.
Where possible, replace the uses of non-UI wxWidgets functionality with
the additions to the standard library in C++11, or the equivalents in
boost.
Move the path token management logic to libaegisub (and rewrite it in
the process).
Add a basic thread pool based on asio and std::thread to libaegisub.
This touches nearly every file in the project and a nontrivial amount of
code had to be rewritten entirely, so there's probably a lot of broken
stuff.
2013-02-06 13:22:15 -08:00
Thomas Goyne
a99428c49d
Extract options and MRU stuff from main.h
...
Nearly all of the files including main.h are doing so only for OPT_GET
and friends, which are rather unrelated to the main things that main.h
declares.
2013-01-09 16:48:31 -08:00
Thomas Goyne
3ec82952f8
Partially de-wxify AssStyle
2012-12-31 07:09:31 -08:00
Thomas Goyne
6e3cc883b3
Replace most uses of type::iterator with auto
2012-12-22 15:35:13 -08:00
Thomas Goyne
d0f4d9df99
Replace all uses of lagi_wxString with to_wx
2012-12-22 15:18:38 -08:00
Thomas Goyne
96cf5ea7ed
Kill the #ifndef AGI_PRE guards
...
They don't actually improve compilation performance and make it more
annoying to modify what things are in the precompiled header.
2012-12-02 06:33:29 -08:00
Thomas Goyne
7a7a036017
Switch lists of pointers to vectors of pointers
2012-11-30 10:44:09 -08:00
Thomas Goyne
b94547aa71
Drop format and header lines from the in-memory file representation
...
They're just pointless cruft, so drop them from the file when parsing
and re-add them when saving as ASS or SSA.
2012-11-24 16:24:00 -08:00
Thomas Goyne
3f840ceec8
Fix crash when rearranging styles in the style manager
...
Inserting lines already in an intrusive list at a different position
does not work, unlike with unintrusive lists. Instead, swap each item in
to the correct place.
2012-11-21 07:32:06 -08:00
Thomas Goyne
06aaaff16b
NULL -> nullptr
2012-11-13 08:51:01 -08:00
Thomas Goyne
b6b68b789d
Use lambdas in a few places
2012-11-12 19:40:42 -08:00
Thomas Goyne
e4d6b8661b
Add range adaptor for filtering to a specific subclass from a heterogeneous range
...
This makes looping over the subtitle file and parsed dialogue lines less
awkward in many cases.
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
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
ff6394c95e
Throw only real exceptions from subtitle io stuff
2012-10-25 17:39:49 -07:00
Thomas Goyne
9547bc4ef2
Move some stuff from AssFile::Load to FrameMain::LoadSubtitles
...
This is still not a very good place for it, but AssFile really shouldn't
be mucking around in global program state.
2012-10-16 09:53:28 -07:00
Thomas Goyne
a53432736c
Get wxMessageBox out of AssFile
2012-10-16 09:52:47 -07:00
Thomas Goyne
33dd0abc7f
Kill AssFile::GetWildcardList
...
It did not actually simplify or clarify any of the code that called it.
2012-10-16 09:52:47 -07:00
Thomas Goyne
e4a6092b36
Use signals for selection change notifications
2012-10-12 14:54:07 -07:00
Thomas Goyne
7e8c18492f
Fix non-precompiled-header compilation
...
Originally committed to SVN as r6807.
2012-05-16 04:57:06 +00:00
Thomas Goyne
d38e02c031
Always use wxPATH_WIN for wxFileName::GetForbiddenChars
...
While it's possible to have files with the DOS-only forbidden characters
on other platforms, wx doesn't actually support them very well.
Closes #1489 .
Originally committed to SVN as r6792.
2012-05-15 13:40:10 +00:00
Thomas Goyne
35fa6c47ce
Automatically add a "Default" style to the "Default" catalog as 2.1.x did. Patch by cantabile. Closes #1487 .
...
Originally committed to SVN as r6765.
2012-05-13 00:57:34 +00:00
Thomas Goyne
3388281fb7
Fix error when the style catalog directory doesn't exist or is empty
...
Use wxDir::GetFirst/GetNext rather than wxFileFirstFile since the latter
doesn't have any way to signal that there aren't actually any files to
be found.
Closes #1486 .
Originally committed to SVN as r6764.
2012-05-13 00:57:25 +00:00
Thomas Goyne
6e877b7dea
Make some very similar translatable strings identical
...
Originally committed to SVN as r6658.
2012-04-04 16:46:02 +00:00
Thomas Goyne
462448c7d1
Add icons to some of the dialogs missing them
...
Originally committed to SVN as r6651.
2012-04-03 20:40:33 +00:00
Thomas Goyne
fe36760872
Use 16x16 icons for dialogs rather than cropping the 24x24 icons to 16x16
...
Originally committed to SVN as r6650.
2012-04-03 20:40:24 +00:00
Thomas Goyne
c4a1a93b97
Center most of the message boxes over their parent windows
...
Originally committed to SVN as r6629.
2012-03-28 23:59:19 +00:00
Thomas Goyne
31a0146df2
Fix crash when clicking the sort button in the style manager with no styles selected
...
Originally committed to SVN as r6628.
2012-03-28 23:59:10 +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
759b8433c1
Silence some clang warnings
...
Originally committed to SVN as r6558.
2012-03-10 02:16:08 +00:00
Thomas Goyne
6b141f2bd3
Fix gcc compilation errors
...
Originally committed to SVN as r6554.
2012-03-09 00:23:53 +00:00
Thomas Goyne
59447a942d
Make the style manager dialog modeless
...
Originally committed to SVN as r6547.
2012-03-08 04:17:42 +00:00
Thomas Goyne
83faddfdb6
Refactor New/Copy/Edit in the style manager a bit and do a better job of selecting the right style in the lists
...
Originally committed to SVN as r6546.
2012-03-08 04:17:36 +00:00
Thomas Goyne
b5a71587ff
Move more of the style storage management logic to AssStyleStorage
...
Originally committed to SVN as r6545.
2012-03-08 04:17:29 +00:00
Thomas Goyne
a09d96df1f
Make AssStyleStorage keep track of the current catalog name
...
Originally committed to SVN as r6544.
2012-03-08 04:17:23 +00:00
Thomas Goyne
fa06033762
Ensure that there is always at least one style catalog existing and selected so that the style manager doesn't have to check if there is one
...
Originally committed to SVN as r6543.
2012-03-08 04:17:17 +00:00
Thomas Goyne
f4e1b28c9f
Rework handling of copied styles in the style manager a bit
...
Generate the new name in the style manager rather than the editor so
that the naming scheme of copies is consistent between the Copy buttons
and pasting styles.
Name the second copy of style X "X - Copy (2)" rather than "X - Copy -
Copy", and so on for further copies. (Copies of style "X - Copy" would
still be named "X - Copy - Copy").
Select the new style when a copy is created.
Originally committed to SVN as r6536.
2012-03-07 22:40:15 +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