1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-27 01:28:38 +02:00

673 Commits

Author SHA1 Message Date
James Crook
a278eff55b Bug 2295 - Comment command always succeeds
I had it set to always fail, with result that macro stopped at that point.
2020-08-17 11:22:20 +01:00
James Crook
894867d692 Bug 2295 - ENH: cannot add a comment in a Macro with Audacity
Comments can now be added using the Comment command.
2020-08-16 20:22:48 +01:00
Leland Lucius
7b8a977f15 Add ClearLog macro command and parameters to tracing 2020-08-11 09:06:15 -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
e2d6e1cc24 AUP3: Update default/lastused path handling 2020-07-27 14:11:50 -05:00
Leland Lucius
1777afa596 AUP3: UP-23 - Macro commands 2020-07-05 14:32:20 -05:00
Leland Lucius
015ba548c2 AUP3: Add SaveCopy macro command
To go along with new menu item.

And adjust prompting for filenames in Save dialogs to return
to Save dialog if file can't be overwritten.
2020-07-03 17:12:26 -05: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
9360359e9d
Module manager (#549)
* Eliminate ModuleManagerInterface...

... It was there only to provide RegisterModule(), but that was not used
anywhere.  So simplify.

* Remove nested #include of ModuleInterface.h
2020-05-29 10:48:52 -05:00
Paul Licameli
f3d91f488e Remove extern declarations from .cpp files...
... Require the declarations to be in .h files, to be sure graph.pl detects the
dependencies.

Only one more #include was needed in Nyquist.cpp.   This doesn't reveal any
more hidden cycles.
2020-05-28 05:50:25 -04:00
Paul Licameli
4a271ba549 Move namespace Registry into new source files 2020-05-28 05:45:11 -04:00
Paul Licameli
226a80140a Add some unnecessary #include directives...
... They are not necessary to build, but the do indicate some link
dependencies to fix, that were not shown in results of scripts/graph.pl.

The link dependencies exist because the header declaring some name did not
correspond to the .cpp file that defined it.
2020-05-27 19:58:17 -04:00
Paul Licameli
3313b33050 Move helper structure definitions out of CommandManager.h...
... and remove an indirection in handling one of them
2020-05-26 09:49:22 -04:00
Paul Licameli
0ef7213a2e Bug2453: Shoudln't show & accelerators in dialog text for key prefs 2020-05-25 19:57:20 -04:00
Paul Licameli
2c8c5799f6 Correct menu ordering after "Reset Configuration" command, see f5afb28 2020-05-25 14:24:14 -04:00
Paul Licameli
67ce74d5ef Some example uses of XC and XPC...
... Really needed only for "White" but harmless in the other uses.  Also more
i18n-hint comments.

There may be need to disambiguate other strings.
2020-05-24 14:55:08 -04:00
Paul Licameli
8ce72748bf CommandManager stores only stripped menu names (no & characters)...
... Keyboard preference dialog does not need to repeat the stripping
2020-05-23 22:42:21 -04:00
Paul Licameli
1ef29b7a51 Don't encode command options as part of accelerator string...
... also restore the intended meaning of "allowDup" (for debugging checks only),
which had never been properly implemented because the label, not the
accelerator, was scanned for it; see commit f2f7568
2020-05-23 22:41:35 -04:00
Paul Licameli
d373e27840 Remove some unused forward declarations and #include directives 2020-05-23 05:32:01 -04:00
Paul Licameli
7fb4652c88 Remove some unused functions and forward declarations 2020-05-23 05:16:59 -04:00
Paul Licameli
4d09705a73 Change XO to XXO in many more places, with no effects at all...
... because the two macros have the same expansion, and are both checked for
in the --keyword arguments passed to msgfmt by locale/update_po_files.sh.

This commit makes ONLY such changes, and comments in Internat.h.  It is big
but quite harmless.

The intention is to introduce a type distinction in a later release, by defining
XXO differently.  XXO is used where & characters in strings (for hotkeys of menu
items or control prompts) are permitted, XO where not.
2020-05-22 13:07:50 -04:00
Leland Lucius
1ca911ed38 Convert all __WXDEBUG__ tests to use new _DEBUG symbol
This symbol is based on the NDEBUG symbol that's automatically
defined by CMake.
2020-04-25 02:36:27 -05:00
Leland Lucius
a6d0b3f902 Bug 2360 - Scripting: "Message:" command may crash when using Nyquist with Python 2020-04-16 22:14:45 -05:00
Leland Lucius
9827d4a753 Bug 2360 - Scripting: "Message:" command may crash when using Nyquist with Python 2020-04-15 10:10:00 -05:00
Paul Licameli
1fa86ee868 Fix the gap in reporting of choice preferences by GetInfo command...
... which began at commit 9b41741074553a27a837b32d25db1eed10681142

For example, /Effects/GroupBy near the end of the report.
2020-04-11 18:01:24 -04:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Leland Lucius
49ab4cf2fb Add the "other" missing include. 2020-04-04 05:20:24 -05:00
Leland Lucius
be749f17eb Add missing include... 2020-04-04 04:18:28 -05:00
Leland Lucius
723e9feb7f Bug 2055 - ENH: Export2 does not export by default 2020-04-04 03:58:27 -05:00
James Crook
ecba41ad2d Bug 2294 - Scripting: Crash on "Close" command 2020-03-22 11:33:50 +00:00
James Crook
301c511422 Remove unwanted ':' on names of scripting checkboxes.
The name comes after the checkbox, and looks better without the ':'.
Made an exception for "Resize:" in  SetProjectCommand.
It controls 4 subordinate settings, and those settings do come after the name.
2020-03-05 19:53:16 +00:00
Paul Licameli
0bbc974a7b Fix Windows build warning 2020-02-21 14:19:01 -05:00
James Crook
952ff1f61e Don't register the Demo command
It's only for developers.
2020-02-21 09:53:54 +00:00
David Bailes
b67c82171c Bug 2329 - Keyboard shortcuts: new or changed defaults can create duplicates
Problem:
If a new version of Audacity introduces a new default shortcut, or changes an existing one, then this may be the same shortcut as a user has previously assigned to another command. Both commands will have the same shortcut, and the shortcut will only execute one of those commands.

Fix:
Check for any such duplicates when a user opens a version of audacity using an audacity.cfg file which was created with a different version.
For each duplicate found, remove the shortcut from the command which has a new or changed default.
If duplicates where found, open a message box informing the user of the removed shortcuts.
2020-02-19 15:02:08 +00:00
James Crook
38f77e5820 Bug 2276 - Screenshot tool either fails, or may capture the wrong screenshot 2020-02-17 22:50:56 +00:00
Paul Licameli
e5540c6118 Don't crash on exit when a module attaches a menu item...
... such as Nyquist Workbench.

I don't fully understand why, but destroying the menu registry items very late,
during the destruction of static objects, causes a crash in memory deallocation,
at least on Mac.

So destroy the menu registry explicitly in application shut-down.
2020-02-17 16:08:59 -05:00
Paul Licameli
4cfbf07227 Registry passed to Visit can be const 2020-02-14 22:08:35 -05:00
Paul Licameli
d0a99d5ae5 Each toolbar registers its menu item 2020-02-14 14:51:11 -05:00
James Crook
f7c230319e Bug 2317 - Scripting: "GetInfo: Commands" omits commands without parameters 2020-02-14 13:37:13 +00:00
James Crook
371afa3ffa Scripting Help Command now supports JSON, LISP, Brief. 2020-02-10 15:55:39 +00:00
Paul Licameli
540f2c5e67 Restore separators after "Move Track to Bottom" in TCP menus 2020-02-06 17:52:45 -05:00
James Crook
f3acd4ca00 Preallocate string for aud-do
Helps marginally with speed of commands which generate long strings in many small steps.
2020-02-06 09:40:30 +00:00
Paul Licameli
446ee8ef6e Separate subclass ToolbarMenuVisitor from MenuVisitor 2020-02-04 12:15:24 -05:00
Paul Licameli
a43c9a5337 Identifier not wxString in ctors of registry items 2020-02-04 12:15:24 -05:00
Paul Licameli
db224895b0 Bug2302: Don't make separators at bottoms of menus on Win & Linux...
... Fix it by demoting the logic for separators from the menu tree diagnostic
into the common MenuVisitor class, then reusing that.
2020-02-04 00:41:31 -05:00
James Crook
0e7797935f Avoid \n immediately after '(' in LISPY output formats 2020-02-03 21:59:40 +00:00
Paul Licameli
7f4d61257a Command manager stores checkmark predicates...
... and we use them to simplify (the misnamed) MenuManager::ModifyToolbarMenus.

It looked wrong that statically constructed menu descriptions should ever hold
constant boolean checkmark values, rather than functions to re-eveluate the
checkmark state as needed.
2020-02-01 12:53:55 -05:00
Paul Licameli
a729dfec3b Reusable preference-populating code for other registries than Menus 2020-02-01 07:11:38 -05:00
Paul Licameli
d233cbd881 Improvements and comments in visitation and merging of registry items 2020-01-31 21:11:58 -05:00