Commit graph

100 commits

Author SHA1 Message Date
Thomas Goyne
67df64e879 Use range-based for loops in a bunch of places 2012-11-12 18:35:25 -08:00
Thomas Goyne
f35e10c76a Decode the autosave path when cleaning up old files 2012-10-27 19:26:45 -07: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
78b70e987e Disable Ubuntu's global menu bar for Aegisub
wxWidgets currently doesn't generate menu open or update events for the
Ubuntu menubar (since GTK doesn't send the relevant signals to the
application), which we rely on.

Updates #1531.
2012-10-25 17:39:49 -07:00
Thomas Goyne
67c01d11f6 Delete unfinished and unused stuff from libaegisub 2012-10-25 17:39:49 -07:00
Thomas Goyne
56ced22c63 Mark autosave files with the current date and time
This makes it so that autosave files are (almost) never overwritten, so
that opening an old version of the file won't result in the autosaves
from a newer version being replaced.

Clean up old autosave files on startup to limit the total to 100
files/100 MB. Maybe make this configurable in the future?

Closes #1155.
2012-10-25 07:50:31 -07:00
Thomas Goyne
863e041d4d Honor the configured MRU limits
Actually use the limits set in the preferences dialog rather than always
limiting the MRU lists to 16.

Currently only the Find and Replace limits can be set to above 16 due to
how the open recent items commands are implemented.

Closes #1528.
2012-10-11 10:19:49 -07:00
Thomas Goyne
40f97dbfea Redesign AegisubLocale
Use wxTranslations directly rather than going through wxLocale. This
significantly simplifies the code, eliminates the hardcoded list of
languages for non-windows, and makes it possible to use mismatched
languages and locales.

Closes #1508.
2012-10-02 16:06:05 -07:00
Thomas Goyne
015d533556 Fix bad destruction order when exiting without closing the main window first
On OS X, when closing via Quit the document windows are not closed until
after OnExit is called, resulting the project context being destructed
after the global stuff, resulting in crashes on exit in some cases.

Originally committed to SVN as r6812.
2012-05-16 14:23:16 +00:00
Thomas Goyne
123f02f0fb Process hotkeys in wxEVT_CHAR_HOOK rather than wxEVT_KEY_DOWN
Char hook events propagate by default, removing the need for the event
filter to make key down events propagate, which was causing some funny
issues.

On Windows, the char hook handler runs before menu accelerators, fixing
a bug where Default context hotkeys would override more specific ones
when they appeared on a menu. Unfortunately, this is not the case on
GTK, so the dumb accelerator-disabling hack is still required.

Originally committed to SVN as r6724.
2012-04-27 19:07:49 +00:00
Thomas Goyne
84e378148e Add platform-specific default configuration files
Default to VSFilter on Windows as libass is still somewhat unstable.

Set the default audio player via the platform config file rather than
not doing anything with it.

Originally committed to SVN as r6664.
2012-04-06 01:55:22 +00:00
Thomas Goyne
566f08f308 Clean up old log files rather than just letting them accumulate forever
Originally committed to SVN as r6654.
2012-04-03 22:44:47 +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
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
9f43f9f041 Rewrite the Clean Script Info export filter in lua
This makes it easy to make it a macro in addition to an export filter,
and simplifies the implementation.

Originally committed to SVN as r6586.
2012-03-12 23:35:56 +00:00
Thomas Goyne
e9dcbf66f3 Fix compilation errors when wxUSE_ON_FATAL_EXCEPTION is not enabled. Updates #1423.
Originally committed to SVN as r6359.
2012-01-25 19:07:07 +00:00
Thomas Goyne
7dd6cfe37d Derive agi::acs exceptions from agi::FileSystemError and friends rather than having two sets of errors for the same thing
Originally committed to SVN as r6278.
2012-01-12 22:31:54 +00:00
Thomas Goyne
518f93f18f Create the json log writer after checking for local config so it goes to the right place
Originally committed to SVN as r6249.
2012-01-08 01:36:35 +00:00
Thomas Goyne
e2d31b708e Split the json log writing into a seperate class from LogSink
Originally committed to SVN as r6248.
2012-01-08 01:36:23 +00:00
Thomas Goyne
d148bbbf2a Make agi::log::LogSink take ownership of the emitters passed to it
Originally committed to SVN as r6246.
2012-01-08 01:36:09 +00:00
Thomas Goyne
ba1a1dc737 Load configuration before initializing commands, hotkeys and icons, as hotkeys uses ?user which may be changed by configuration loading
Originally committed to SVN as r6245.
2012-01-08 01:36:03 +00:00
Thomas Goyne
d2d28401bd Change how local config mode works
Rather than loading both the local and user config files and saving to
the local directory if an option is set, simply try to load the local
config file, and if it exists switch to local mode and never even touch
the user file.

Originally committed to SVN as r6244.
2012-01-08 01:35:56 +00:00
Thomas Goyne
ae62cb75b4 Add missing uses of STD_STR when converting from wxString to std::string
Originally committed to SVN as r6243.
2012-01-08 01:35:49 +00:00
Thomas Goyne
1285584e89 Add ?local for the user's local config dir; use it for FFMS2 indexes
Originally committed to SVN as r6235.
2012-01-08 01:34:57 +00:00
Thomas Goyne
dc58b3db40 Clean up SetThreadName a little
Originally committed to SVN as r6217.
2012-01-08 01:05:51 +00:00
Thomas Goyne
71968aa4f3 Fix wxString::Format assertion failures in the stack walker
Originally committed to SVN as r6203.
2012-01-08 01:04:16 +00:00
Thomas Goyne
e34b401201 Return -1 from AegisubApp::FilterEvent rather than wxEventFilter::Event_Skip, as the enum was added in wx 2.9.4
Originally committed to SVN as r6188.
2011-12-30 15:51:58 +00:00
Thomas Goyne
84d1315736 Write the config and MRU files to ?data in portable mode rather than ?user
Originally committed to SVN as r6187.
2011-12-30 01:21:03 +00:00
Thomas Goyne
d192f1c332 Fix bad format string that made stack trace writing fail after one stack frame
Originally committed to SVN as r6184.
2011-12-29 05:36:49 +00:00
Thomas Goyne
e36759a3b2 Remove the undocumented milisecond precision option
Originally committed to SVN as r6121.
2011-12-22 21:28:32 +00:00
Thomas Goyne
ec63fad7c5 Make help buttons fall back to the docs wiki if the scraped html files aren't available locally
Originally committed to SVN as r6084.
2011-12-22 21:22:31 +00:00
Thomas Goyne
cd3b9bfa37 Enable propagation of key events so that hotkeys work regardless of what's focused
Originally committed to SVN as r6054.
2011-12-22 21:17:58 +00:00
Thomas Goyne
59273bac4a Reenable the assertion failure handler
Originally committed to SVN as r6053.
2011-12-22 21:17:49 +00:00
Thomas Goyne
f1ff18545a Make more of AegisubApp's methods private
Originally committed to SVN as r6049.
2011-12-22 21:17:12 +00:00
Thomas Goyne
2ec3ff157b Kill AegisubApp::OpenURL. It makes no sense for the top level application object to be doing this and it doesn't even save any code.
Originally committed to SVN as r6048.
2011-12-22 21:17:02 +00:00
Thomas Goyne
2439381c33 Fix misspelled word in the crash log
Originally committed to SVN as r6002.
2011-12-22 21:09:51 +00:00
Thomas Goyne
95a329a1e2 Flush the clipboard on exit so that it isn't cleared
Originally committed to SVN as r5957.
2011-12-02 04:35:59 +00:00
Thomas Goyne
6c995e7780 Add support for modifying hotkeys while the program is running
Originally committed to SVN as r5793.
2011-10-28 20:40:32 +00:00
Thomas Goyne
10464e4617 Kill AegisubApp::OnMouseWheel. It breaks the mouse wheel in dialogs, and it didn't actually work at the moment and isn't really the right way to handle mouse wheel forwarding in the first place
Originally committed to SVN as r5771.
2011-10-24 20:18:16 +00:00
Thomas Goyne
0a91be1c7c Unconditionally enable building automation even if there are no enabled engines as there isn't really any reason not to and the defines uglify the code.
Originally committed to SVN as r5621.
2011-09-28 19:45:35 +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
626df4db05 Rewrite the dynamic menu generation code
Remove hardcoded assumptions about where in the menu items are and
instead bind menu items directly to commands so that customizing the
menu actually works.

Add support for user menu files that override the default one.

Add better support for multiple menus so that all of the menus can
potentially be created by the dynamic menu system rather than just the
main menu bar.

Add support for commands whose names change based on the current project
state so that undo and redo can work properly.

Simplify the menu json format and make commands responsible for
controlling what type of menu item is created rather than allowing
nonsensical configurations.

The Automation menu is currently not implemented.

Originally committed to SVN as r5554.
2011-08-27 06:29:36 +00:00
Thomas Goyne
1cacc33d2d Simplify version.cpp
Originally committed to SVN as r5526.
2011-07-27 22:52:37 +00:00
Thomas Goyne
5c7a848f21 Delete the menu on shutdown
Originally committed to SVN as r5475.
2011-07-15 17:36:35 +00:00
Thomas Goyne
be8d841577 Delete built in export filters on exit
Originally committed to SVN as r5474.
2011-07-15 17:36:26 +00:00
Thomas Goyne
faecc3304d Delete all commands on shutdown
Originally committed to SVN as r5473.
2011-07-15 17:36:17 +00:00
Thomas Goyne
88f0659307 Rewrite the toolbar generation code
The old toolbar code didn't actually support any nontrivial
customization of toolbars, as it had a hardcoded list of commands which
would be enabled or disabled, and the checks for enabling/disabling
toolbar buttons was done only in the specific situations which those
commands used.

Make icon size a user customizable option and add support for
dynamically changing it at runtime.

Originally committed to SVN as r5468.
2011-07-15 04:06:23 +00:00
Thomas Goyne
2eb4c856e8 Simplify and clean up command management code
Originally committed to SVN as r5456.
2011-07-15 04:05:01 +00:00