Commit Graph

131 Commits

Author SHA1 Message Date
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
Paul Licameli 4274d44ab7 New attached structure ProjectManager handles project lifetime...
... that is, a factory function, open, close, import, undo/redo/rollback.

Also the callbacks from AudioIO, which need to invoke undo history push when
recording stops.

It is meant as a high-level class using several of the other things attached
to the project, while AudacityProject will be a low level class acting mostly
as just the container of the attached structures.
2019-06-03 01:18:12 -04:00
Paul Licameli 05efeeb5bd New files for ProjectSettings 2019-06-03 01:13:13 -04:00
Paul Licameli dd10e00a2d New attached structure ProjectSettings stores rate, snap-to, et al. 2019-06-02 14:42:00 -04:00
Paul Licameli 0923bc19a9 static MenuManager::Get()...
... not member functions of AudacityProject
2019-05-23 16:34:47 -04:00
Paul Licameli 4ba4d0978b static CommandManager::Get()...
... not member functions of AudacityProject
2019-05-23 13:17:29 -04:00
Paul Licameli 14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli d2717cac21 Move functions from AudacityProject to SelectActions 2019-05-20 21:38:09 -04:00
Paul Licameli f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -04:00
Paul Licameli 6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli 9bf29f5582 CommandManager keys by CommandId, not plain wxString 2019-05-16 12:30:29 -04:00
Paul Licameli d90a827e03 Remove unneeded #include-s of AudacityApp.h 2019-05-15 15:58:00 -04:00
James Crook 14f9340182 Don't translate 'macro-output' (and all lower case) 2019-04-04 14:29:48 +01:00
James Crook 37e61ab1c2 Change 'cleaned' -> 'Macro-output' in path name.
This is more than a wording change, since it is changing the output directory.
2019-04-04 07:44:59 +01:00
Paul Licameli f45300f032 This is only comments, in files where USE_ macros are tested...
... following the comment convention used in the preceding commit.
2019-03-22 12:38:30 -04:00
Paul Licameli 5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -04:00
Paul Licameli a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli 485b6bb425 Use type aliases FileExtension, FileExtensions...
... for wxString and wxArrayStringEx, holding file extensions (without dot);
to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)

And simplify some constructions of arrays
2019-03-15 15:18:11 -04:00
Paul Licameli 06b3b42794 Remove unnecessary initializers for empty wxString 2019-03-15 15:18:11 -04:00
Paul Licameli 50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
Paul Licameli 6d5bc21d50 Define and use wxArrayStringEx...
reducing verbosity where there were repeated calls of Add(), and defining
move construction and assignment for efficient returns from functions
2019-03-10 16:23:44 -04:00
Paul Licameli da33daf197 Some replacements of wxArrayString with auto 2019-03-10 14:47:12 -04:00
Paul Licameli 795b6a2e42 More std:: style for wxString and wxArrayString...
... Replacing:

Insert => insert
RemoveAt => erase
Remove => erase
IsSameAs => operator == or operator !=
   (but only when second argument was true or default)
2019-03-10 14:45:12 -04:00
Paul Licameli dd8eb9e3d9 Less use of wxArrayString::Index() ...
... instead use the utility make_iterator_range and its index() or contains()
method.  This generic utility works with any container defining begin() and
end().

This further lessens dependency on wxWidgets container idioms.
2019-03-10 14:45:06 -04:00
Paul Licameli c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli 2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
Paul Licameli aae544befe Determinate order of names under Tools> Apply Macro...
... There was a complaint that it was neither by name or by date for some users
2019-02-19 14:16:28 -05:00
Steve Daulton b3dafcedd1 Fix: bug 2054
Windows: Macros - "ExportMP3 before" and "ExportMP3 after" overwrite
causing non-critical data loss.

Thanks to Mike Barker for locating the problem.

This fix also corrects the bit-rate for the ExportMP3_56k commands.
2019-01-21 10:21:03 +00:00
Paul Licameli e048a4aacd Move a static function and an enumeration out of MenuCommandHandler 2018-10-24 12:16:46 -04:00
Paul Licameli 9759c6bd4f Plugin Menus 2018-10-24 12:16:44 -04:00
Paul Licameli ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00