Commit Graph

24 Commits

Author SHA1 Message Date
Thomas Goyne a24f1692be Let macros update their help string from the validate function
If the second return value from the validate function exists and is a
non-empty string, replace the macro's help text with that string.

Revert r6327, as this is a better solution to the same problem.

Closes #1413.

Originally committed to SVN as r6352.
2012-01-25 00:21:37 +00:00
Thomas Goyne b0c1ef2d6b Add support for commands with dynamic help strings
Originally committed to SVN as r6326.
2012-01-20 21:33:30 +00:00
Thomas Goyne db18cea308 Don't sort automation macros by name
Leaving macros in the order they're registered makes it possible to
group related macros. Once a UI for editing the menus has been added it
might make sense to default to sorting them, but for now it's just
unhelpful.

Closes #1381.

Originally committed to SVN as r6273.
2012-01-11 19:19:11 +00:00
Thomas Goyne a0fcd535c1 Store the names of commands in the menu rather than references to the commands themselves, to avoid crashes with dynamically created and removed commands. This makes most menu operations a bit slower, but it appears to be sufficiently fast.
Originally committed to SVN as r6259.
2012-01-09 20:31:55 +00:00
Thomas Goyne afca7e9732 Don't overwrite overridden menu text when hotkeys change
Originally committed to SVN as r6229.
2012-01-08 01:34:18 +00:00
Thomas Goyne 8511376da5 Make strings from the menu json translatable
Originally committed to SVN as r6228.
2012-01-08 01:34:12 +00:00
Thomas Goyne 25c1225ad1 Fix bug where on wxGTK the display mode would get set to "Subs Only" the first time the menus were opened after opening video or audio
Originally committed to SVN as r6208.
2012-01-08 01:04:55 +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 adb5963fbd Cast size_ts used in format strings to ints instead as there isn't actually a portable way to format them.
Originally committed to SVN as r5944.
2011-11-30 02:44:27 +00:00
Thomas Goyne f9e8175cb8 Fix wxString::Format assertion failures in 64-bit builds
Originally committed to SVN as r5943.
2011-11-30 02:38:42 +00:00
Thomas Goyne 2cbe7455bb Don't set icons for check and radio menu items as checked icons aren't supported yet
Originally committed to SVN as r5807.
2011-11-03 00:29:23 +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 9dc9047c11 Change json::Object's backing store from a list to a map. Cajun used list to preserve order, but json objects do not guarantee that order will be preserved
Originally committed to SVN as r5747.
2011-10-17 21:59:47 +00:00
Thomas Goyne 2f64a116a7 Make cajun containers implement the STL container interfaces rather than being retarded special snowflakes
Originally committed to SVN as r5746.
2011-10-17 21:59:35 +00:00
Thomas Goyne d419c7a447 Implement the Automation menu
Originally committed to SVN as r5648.
2011-09-28 19:49:56 +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 d70fb7fe2d Fix compilation errors
Originally committed to SVN as r5601.
2011-09-15 06:03:13 +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 87abcddd87 Make the MRU code not so bizzarely overcomplicated
Originally committed to SVN as r5502.
2011-07-26 19:51:56 +00:00
Thomas Goyne 3d22da9fbc Skip invalid commands when constructing the toolbar and menu rather than exploding
Originally committed to SVN as r5478.
2011-07-15 23:43:52 +00:00
Thomas Goyne 26695a8cc8 Eliminate memory leak in menu code
Originally committed to SVN as r5476.
2011-07-15 17:36:44 +00:00
Thomas Goyne 04a4c074b0 Add function to get the string representation of the hotkeys for a command, use it when generating the menu
Originally committed to SVN as r5230.
2011-01-17 23:53:46 +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