1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-10 17:11:17 +02:00

371 Commits

Author SHA1 Message Date
Paul Licameli
a1bd9062ae Remove dead code; so that all remaining calls to NewIdentifier...
...are followed by a setting of flags and mask
2018-10-17 23:13:56 -04:00
Paul Licameli
63f20f3405 CommandManager::AddItemList requires flags 2018-10-17 23:13:56 -04:00
Paul Licameli
742e578d49 Flags in AddItem (and AddCommand) may not be NoFlagsSpecified 2018-10-17 23:13:56 -04:00
Paul Licameli
db997f8ecd Flags argument of AddItem (and AddCommand) is obligatory 2018-10-17 23:13:56 -04:00
Paul Licameli
596eefe675 CommandManager::Options also specified the long name 2018-10-17 13:49:43 -04:00
Paul Licameli
cfe7ddcf55 struct CommandManager::Options lets us fold AddCheck into AddItem 2018-10-17 13:32:39 -04:00
Paul Licameli
de4132d66c Reorder accel argument and unify two overloads of AddItem 2018-10-17 13:32:36 -04:00
Paul Licameli
c376ffb165 Simplify calls to SetDefaultFlags: default mask to equal flags 2018-10-17 13:21:00 -04:00
Paul Licameli
42aef9f3e8 Mask != flags is unusual: simplify most AddItem/AddCheck...
... and the no longer used AddCommand.

There are only four exceptions, all using NoAutoSelect in the flags and not in
the mask.
2018-10-17 13:20:58 -04:00
Paul Licameli
399e2d099d Fix spelling in an enum constant name 2018-10-17 12:53:25 -04:00
Paul Licameli
88c67c46f3 Unify the two overloads of CommandManager::AddCheck 2018-10-17 12:53:25 -04:00
Paul Licameli
fef9e2abac Remove some unused things 2018-10-17 12:53:25 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
fc6570646d MenuCommandHandler is not a base class of MenuManager...
... This forces a better placement of state variables in the appropriate
classes.

In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
2018-10-16 13:01:22 +01:00
James Crook
51b3076786 Fix include path 2018-10-16 13:01:22 +01:00
Steve Daulton
cb55164c43 Add Project Rate to SetProjectCommand 2018-10-15 23:51:41 +01:00
Paul Licameli
ef97ce88ca Correct more double spaces 2018-10-15 12:54:44 -04:00
Paul Licameli
297f3b4d84 Fix another mistake in iteration over channels in src/commands 2018-10-11 21:40:38 -04:00
James Crook
15a3ea7763 Bug 2010 - Scriptables: SelectTracks and Select incorrect for stereo tracks 2018-10-11 11:29:53 +01:00
James Crook
657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
Paul Licameli
c7ab9f2338 Rewrite many iterations over tracks and channels in src/commands 2018-10-01 11:24:37 -04:00
Paul Licameli
b94e8fec96 Remove VisibleTrackIterator 2018-10-01 11:20:52 -04:00
Paul Licameli
51842fc78b Use TypeSwitch and track_cast 2018-10-01 10:58:47 -04:00
Paul Licameli
7c924012fb A redundant high-level GuardedCall around macro command execution...
... Redundant with the guard already in ApplyAndSendResponse, but this makes it
easier to reason about the exception safety of calls into Audacity from
Nyquist tools.
2018-09-29 12:10:27 -04:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
James Crook
1b6cd725e6 Use count of channels instead of boolean 'linked' in GetInfo.
This change is inspired by the plan to eliminate GetLinked() in 2.3.1.  Logically we shouldn't be exposing a boolean 'linked' in scripting, but instead a channel count.
2018-09-10 23:54:16 +01:00
James Crook
1ecff6d5db Bug 1971 - Linux: Scriptables screenshot command only grab a small rectangle of window 2018-09-05 19:16:07 +01:00
James Crook
7d0839393b Report selectedness of all tracks, not just WaveTracks.
(Suggested by Steve Daulton).
2018-09-03 22:02:15 +01:00
James Crook
85c1eb4720 Fix GetInfo: Type=Labels counts channels rather than tracks. 2018-08-29 13:35:21 +01:00
James Crook
d79c071d6d Change 'mouse_move' to 'move_mouse'.
Fixing a hyperlink.
2018-08-25 17:41:28 +01:00
James Crook
ac5b743dd2 Bug 1944 - Many "scriptables" link to non-existent pages or incorrect target pages 2018-08-24 19:18:04 +01:00
James Crook
66df5786de Make AUD-DO return a cons.
This is simple parsing of the response from AUD-DO.  The first part is the string message, the second 1 or NIL depending on if scripting reported OK or not.  Note that illegal scripting options often don't produce a 'Failed' but are silently substituted with valid ones.
2018-08-24 18:45:09 +01:00
Steve Daulton
5be7f7db0b White space changes
The Objective C++ syntax '[[' used in a couple of places (Mac only),
breaks the parser in kdevelop. As suggested by Paul, a space between the
brackets fixes the problem.
Also removed some trailing spaces.
2018-08-15 11:29:12 +01:00
James Crook
b2feab61a9 TrackPanelHasFocus commands now always available to Macros
Previously running a TrackPanelHasFocus effect from the Macros dialog could fail, because the menu item was disabled (because track panel did not have focus).
2018-08-13 16:52:13 +01:00
James Crook
c94df54157 Bug 1856 - Applying Macros to Files is no longer a batch process
This restores the 2.2.2 behaviour, with a subdirectory called 'cleaned'.  The problem was that 2.2.2 used special cases for MP3 Ogg and WAV exports, which were stripped out in favour of using the built-in Export command.  However, the differences in behaviour (prompting) between batch and non batch mode were not taken into account.
2018-08-04 19:16:32 +01:00
Paul Licameli
06eee27b9a Rewrite commit 1bc0f0f without further changes to lib-src...
... Reuse the external function registration added earlier in 2.3.0
development, for support of internationalization in Nyquist.

This way, we avoid making cyclic static linkage dependencies between the
library and the application.
2018-08-01 23:11:30 -04:00
James Crook
1bc0f0f4d0 Make Nyquist support (AUD-DO)
Nyquist AUD-DO calls out to a new function that executes script commands, and returns results in a lisp string.
2018-08-01 20:32:03 +01:00
James Crook
b975956812 Add re-entrancy checks to Nyquist
These changes below are paving the way for aud-do:

Nyquist Effect now detects self reentrancy and skips reentry if so.
Nyquist Effect now detects if another effect has run during effect processing, and does not send Nyquist
output if so.

Neither of these preparatory changes have an effect in absence of AUD-DO (or other function
that allows Nyquist effect to call out to Audacity functions).
2018-08-01 20:31:03 +01:00
Paul Licameli
e432883dec Fix deprecation warnings with wxFont, wxPen, wxBrush ctors...
... Replace some enum constants with the equivalent values from the more
special-purpose enums, as the wx header files recommend, so overloading
selects the ctors with non-int arguments.

In a full rebuild of the debug project on Mac, this reduces the count of
warnings from 264 to 274.
2018-07-23 13:21:15 -04:00
James Crook
0ea56874a6 Comment out a debug message. 2018-07-22 20:30:53 +01:00
James Crook
66e203cdca Transcription Toolbar -> Play-at-Speed Toolbar 2018-07-22 18:21:38 +01:00
James Crook
2739020342 Bug 1902 - "Nyquist Prompt" confusingly shown only as "Nyquist" when "Grouped by Type" is active
Now shown as "Nyquist Effects Prompt" (in Effects menu) and "Nyquist Tools Prompt" (in Tools Menu).
These prompts will have slightly different behaviour, e.g. only tools allow aud-do.
2018-07-14 16:51:49 +01:00
James Crook
d057dfb5d8 Move "Help Menu" after "Extra Menu". 2018-07-05 19:34:16 +01:00
James Crook
20178b15e1 Fix some 'declaration hides' warnings.
We were for example getting many of these:
\audacity\src\widgets\numerictextctrl.h(171): warning C4458: declaration of 'value' hides class member

MSVC2013 didn't warn about these, but MSVC2017 does.
2018-06-27 12:36:13 +01:00
Paul Licameli
a9e7a7e5d5 movable_ptr(_with_deleter) -> std::unique_ptr 2018-05-10 00:56:37 -04:00
Paul Licameli
b8a8712ba0 make_movable -> std::make_unique 2018-05-10 00:56:36 -04:00
Paul Licameli
7a0475e39f Remove most uses of AUDACITY_OLD_STD 2018-05-10 00:56:36 -04:00
James Crook
9e92f4f370 Use path separator that depends on platform (in screenshot tools). 2018-04-29 22:25:34 +01:00
Steve Daulton
0248c870b2 Rename "Sliding Time Scale/Pitch Shift" effect 2018-04-28 21:16:41 +01:00
James Crook
660dc03b9f GetInfo tweaks.
JSON now more consistent, using structs rather than arrays.
Removed unused GetInfo Command+
2018-04-27 12:45:29 +01:00