Commit Graph

161 Commits

Author SHA1 Message Date
Paul Licameli 04a0292d1d Simplify iterations over PluginManager; remove a friend 2021-06-30 21:15:19 -04:00
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli c1c8c373d4 Bug2759: A failed macro command should not leave vacuous undo item 2021-05-01 19:24:00 -05:00
Leland Lucius 76460c73da Bug 2366 - Macros: Run does "Select All" ignoring setting in Tracks Behaviors Preferences
Reverted the wrong commit...needed to add an include anyway.
2021-01-29 06:37:30 -06:00
Leland Lucius 90a1783779 Revert "Bug 2366 - Macros: Run does "Select All" ignoring setting in Tracks Behaviors Preferences"
This reverts commit 1478abf3d0.

Removing until some questions are answered.
2021-01-29 06:16:17 -06:00
Leland Lucius 1478abf3d0 Bug 2366 - Macros: Run does "Select All" ignoring setting in Tracks Behaviors Preferences 2021-01-29 05:08:05 -06:00
Leland Lucius b0367049b9 Limit message output while macro tracing is enabled 2020-08-11 09:42:59 -05:00
Leland Lucius 7b8a977f15 Add ClearLog macro command and parameters to tracing 2020-08-11 09:06:15 -05:00
Leland Lucius da75a7edde Fix build 2020-08-11 01:48:32 -05:00
Leland Lucius b6eaf5623e Add "tracing" of macro commands
At this time it's really just a debugging aid for us. It should
make it easier for us to better understand timing of various
commands.

Tracing is enabled by setting the "/EnableMacroTracing" preference
to 1 and disabled by setting it to 0.

Since the tracing is written to the log, this also adds a "SaveLog"
command that takes a filename. It can be used from within the macro
being traced to preserve the log in case the script intended to
exit Audacity.
2020-08-11 00:14:56 -05:00
Leland Lucius 9d749fef14 AUP3: Fix macro path handling
Aside from the breakage I added to it during the AUP3 conversion,
there was several other issues discovered in regards to how the
export paths were being handled.
2020-08-10 17:48:59 -05:00
Leland Lucius 52b15ce03f Bug 2296 - There is no Import or Export for Macros 2020-08-08 21:17:14 -05:00
David Bailes a415c3fe38 Commit 51b3b0f - minor update
Using init capture removes any danger of using the wrong value of MacroReentryCount
2020-07-04 12:56:42 +01:00
David Bailes 51b3b0f19a Bug 2499 - Macros: applying macro to project focus problem
Problem:
Applying macro to project always sets first track as focus.

The problem was introduced by commit 06cddda, which accidentally declared cleanup2 in the wrong scope.
This meant that ProjectHistory::RollBackState() was always called, which eventually causes TrackPanel::OnUndoReset() to be called, which sets the first track to be the focus.

Fix:
Declare cleanup2 in the correct scope.
2020-07-04 09:06:53 +01:00
David Bailes d966303558 First commit
If any of the commands are cancels, an entry for the macro remains in history.
2020-07-04 08:58:58 +01:00
Leland Lucius d39590cf41 AUP3: First round of updates
!!! THERE WILL NO DOUBT BE BUGS !!!

This is a big one and there's still several things to
complete. Just want to get this in the wild to start
receiving feedback.

One big thing right now is that it will NOT load pre-aup3
files.  An importer is on the way for that.
2020-07-01 02:30:18 -05:00
Paul Licameli 4ff0a9d74e Can build for windows without precompiled headers...
... Requires some more wx header inclusions, a renaming of CopyFile (to avoid
colliding with a certain macro changing it to CopyFileW), and an explicit
deletion of a copy constructor and assignment (to avoid generation of
std::vector members for an incomplete type)
2020-05-27 17:36:25 -04:00
Paul Licameli c44ae15a4d Remove inclusions of wx/filedlg.h 2020-05-22 20:18:51 -04:00
Yuri Chornoivan d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
James Crook ecba41ad2d Bug 2294 - Scripting: Crash on "Close" command 2020-03-22 11:33:50 +00:00
Leland Lucius 06cdddadec Bug 2076 - Unreliable "Undo" of Macro commands 2020-03-19 17:34:10 -05:00
Paul Licameli bb26b2f2c4 Require a ProjectWindow as ancestor of effect dialog...
... by passing parent as reference, not pointer, and testing in the dialog
factory function.

This is important so that we know the lifetime of an effect dialog, even when
it is non-modal, is bounded by the lifetime of the associated project.
2020-01-06 11:30:47 -05:00
Paul Licameli 91c45dd32a Move static EffectManager::DoEffect into new namespace 2020-01-05 16:11:55 -05:00
Paul Licameli 23a0206d2a Remove CreateUI; pass dialog factory to effect client instead 2020-01-05 16:11:55 -05:00
Paul Licameli c39718fa1f MacroCommands remembers a reference to project...
... Eliminating several GetActiveProject calls, notably including those where
we construct a CommandContext for executing commands.
2020-01-02 13:58:49 -05:00
Paul Licameli d23569ca10 Construct Exporter with project pointer, fewer GetActiveProject calls 2020-01-02 13:13:48 -05:00
Paul Licameli 6f80a5c08b FileExtension passed to BuildCleanFileName: no leading dot...
... consistently with the comment describing the type alias FileExtension
2019-12-27 17:44:02 -05:00
Paul Licameli d6d4ee3c29 Reviewed uses of type alias FileExtension, it belongs in more places 2019-12-27 17:40:42 -05:00
Paul Licameli a325247525 TranslatableString for macro command category 2019-12-21 11:27:53 -05:00
Paul Licameli 2214b5ff3b Pass friendly macro command names as TranslatableString 2019-12-20 21:36:11 -05:00
Paul Licameli dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli 4eb220e7b9 TranslatableString for undo history short and long descriptions 2019-12-16 14:19:23 -05:00
Paul Licameli 54e2bbd8ff Remove TranslatedInternalString, use ComponentInterfaceSymbol 2019-12-16 10:58:05 -05:00
Paul Licameli 5639f834c8 CommandManager stores labels as TranslatableString 2019-12-16 10:58:05 -05:00
Paul Licameli 5cbafc6086 Clarifying name change in CommandManager & simplify PluginMenus...
... The purpose of the boolean field in command entries was to exclude certain
menu commands from being steps in macros, because they require user interaction.

Effects are never meant to be excluded, even though they normally have dialogs,
but in the context of macro execution, the parameters are supplied by other
means.
2019-12-12 15:15:59 -05:00
Paul Licameli 72df562c4a Conversion of TranslatableString to wxString is private 2019-12-01 18:17:57 -05:00
Paul Licameli 51115903d4 Remove uses of overload of TieRadioButton taking int values...
... and migrate old preferences with EnumSetting
2019-11-27 13:37:24 -05:00
Paul Licameli 21b30b2da2 Remove unneeded #include directives 2019-07-29 15:41:11 -04:00
Paul Licameli 2c840a75c5 Remove short functions from namespace TransportActions 2019-07-03 16:52:19 -04:00
Paul Licameli 7fc3c5e7a7 Move namespace TransportMenus into ProjectAudioManager.cpp ...
... not the best thing for the long term, but hidden dependencies on
TransportMenus.cpp are eliminated

Tying CommonCommandFlags again into the big component, which is now 26
2019-06-25 00:14:53 -04:00
Paul Licameli ff2cf496cd Move DoEffect out of PluginMenus 2019-06-25 00:14:52 -04:00
Paul Licameli 691eee681c Move DoAudacityCommand out of PluginMenus 2019-06-25 00:14:52 -04:00
Paul Licameli 1c588fa014 Move enum into EffectManager...
... tying Effect into a cycle of 3 with EffectManager and EffectRack, which is
only revealing the true dependencies
2019-06-25 00:12:45 -04:00
Paul Licameli 02e620d35f Move functions into new file SelectUtilities.cpp ...
... so that other files do not have link dependency on SelectMenus.cpp

The new file enlarges the big s.c.c. to 24
2019-06-24 23:06:44 -04:00
Paul Licameli 9935b035c5 Remove Effect.h from EffectManager.h and EffectRack.h 2019-06-24 00:36:59 -04:00
Paul Licameli b84f5b66f0 CommandManager.cpp does not depend on EffectManager...
... some code lifted into BatchCommands.cpp to realize this.

It also doesn't depend on PluginManager, but that is not important for breaking
cycles.
2019-06-16 01:24:29 -04:00
Paul Licameli ca5259712c HandleCommandEntry's 3rd parameter was two-valued, make it bool...
... false when it was NoFlagsSpecified, true when it was AlwaysEnabledFlag
2019-06-14 10:12:45 -04:00
Paul Licameli ef8c100cee MenuManager holds a back-reference to project; simplifies calls 2019-06-12 11:08:50 -04:00
Paul Licameli f03684db4f New class ProjectHistory split from ProjectManager for undo, etc...
... And yet fewer inclusions of Projectmanager.h, though it's still not yet
free of cycles
2019-06-09 12:10:48 -04:00
Paul Licameli fee5582826 New files for ProjectManager 2019-06-03 01:21:12 -04:00