diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt index 52e332326cf0..8db32f2d8cb1 100644 --- a/libraries/CMakeLists.txt +++ b/libraries/CMakeLists.txt @@ -58,6 +58,7 @@ set( LIBRARIES lib-mixer lib-channel lib-stretching-sequence + lib-menus ) if ( ${_OPT}has_networking ) diff --git a/libraries/lib-menus/CMakeLists.txt b/libraries/lib-menus/CMakeLists.txt new file mode 100644 index 000000000000..c8a1e1df51fd --- /dev/null +++ b/libraries/lib-menus/CMakeLists.txt @@ -0,0 +1,30 @@ +#[[ +Vocabulary to describe toolbar menu items, their grouping, conditions to enable +them, and their actions. + +A global registry of menu descriptions and a visitor function. + +It does not contain a visitor to build menus, becuase that is not +toolkit-neutral. +]] + +set(SOURCES + CommandContext.cpp + CommandContext.h + CommandFlag.cpp + CommandFlag.h + CommandFunctors.h + CommandTargets.cpp + CommandTargets.h + Keyboard.cpp + Keyboard.h + MenuRegistry.cpp + MenuRegistry.h +) + +set( LIBRARIES + lib-project-interface +) + +audacity_library(lib-menus "${SOURCES}" "${LIBRARIES}" + "" "" ) diff --git a/src/commands/CommandContext.cpp b/libraries/lib-menus/CommandContext.cpp similarity index 100% rename from src/commands/CommandContext.cpp rename to libraries/lib-menus/CommandContext.cpp diff --git a/src/commands/CommandContext.h b/libraries/lib-menus/CommandContext.h similarity index 98% rename from src/commands/CommandContext.h rename to libraries/lib-menus/CommandContext.h index 49b8d0cecf01..2e29b9bd717d 100644 --- a/src/commands/CommandContext.h +++ b/libraries/lib-menus/CommandContext.h @@ -34,7 +34,7 @@ struct TemporarySelection { Track *pTrack = nullptr; }; -class AUDACITY_DLL_API CommandContext { +class MENUS_API CommandContext { public: struct TargetFactory : DefaultedGlobalHook< TargetFactory, Callable::UniquePtrFactory::Function diff --git a/src/commands/CommandFlag.cpp b/libraries/lib-menus/CommandFlag.cpp similarity index 100% rename from src/commands/CommandFlag.cpp rename to libraries/lib-menus/CommandFlag.cpp diff --git a/src/commands/CommandFlag.h b/libraries/lib-menus/CommandFlag.h similarity index 96% rename from src/commands/CommandFlag.h rename to libraries/lib-menus/CommandFlag.h index a1b4d0d82717..61c227e6ee62 100644 --- a/src/commands/CommandFlag.h +++ b/libraries/lib-menus/CommandFlag.h @@ -11,12 +11,12 @@ // Flags used in command handling. +#include "TranslatableString.h" + #include #include #include -#include "audacity/Types.h" - class AudacityProject; // Increase the template parameter as needed to allow more flags @@ -84,7 +84,7 @@ struct CommandFlagOptions{ // Construct one statically to register (and reserve) a bit position in the set // an associate it with a test function; those with quickTest = true are cheap // to compute and always checked -class AUDACITY_DLL_API ReservedCommandFlag : public CommandFlag +class MENUS_API ReservedCommandFlag : public CommandFlag { public: using Predicate = std::function< bool( const AudacityProject& ) >; @@ -122,7 +122,7 @@ struct MenuItemEnabler { using MenuItemEnablers = std::vector; // Typically this is statically constructed: -struct AUDACITY_DLL_API RegisteredMenuItemEnabler{ +struct MENUS_API RegisteredMenuItemEnabler{ static const MenuItemEnablers &Enablers(); RegisteredMenuItemEnabler( const MenuItemEnabler &enabler ); }; diff --git a/src/commands/CommandFunctors.h b/libraries/lib-menus/CommandFunctors.h similarity index 100% rename from src/commands/CommandFunctors.h rename to libraries/lib-menus/CommandFunctors.h diff --git a/src/commands/CommandTargets.cpp b/libraries/lib-menus/CommandTargets.cpp similarity index 100% rename from src/commands/CommandTargets.cpp rename to libraries/lib-menus/CommandTargets.cpp diff --git a/src/commands/CommandTargets.h b/libraries/lib-menus/CommandTargets.h similarity index 83% rename from src/commands/CommandTargets.h rename to libraries/lib-menus/CommandTargets.h index 55816c2bd954..6d1518608c68 100644 --- a/src/commands/CommandTargets.h +++ b/libraries/lib-menus/CommandTargets.h @@ -67,7 +67,7 @@ class CommandProgressTarget /* not final */ }; /// Interface for objects that can receive (string) messages from a command -class AUDACITY_DLL_API CommandMessageTarget /* not final */ +class MENUS_API CommandMessageTarget /* not final */ { public: CommandMessageTarget() {mCounts.push_back(0);} @@ -87,10 +87,11 @@ class AUDACITY_DLL_API CommandMessageTarget /* not final */ std::vector mCounts; }; -class CommandMessageTargetDecorator : public CommandMessageTarget +class MENUS_API CommandMessageTargetDecorator : public CommandMessageTarget { public: - CommandMessageTargetDecorator( CommandMessageTarget & target): mTarget(target) {} + CommandMessageTargetDecorator(CommandMessageTarget & target) + : mTarget(target) {} ~CommandMessageTargetDecorator() override; void Update(const wxString &message) override { mTarget.Update( message );} void StartArray() override { mTarget.StartArray();} @@ -112,40 +113,50 @@ class CommandMessageTargetDecorator : public CommandMessageTarget CommandMessageTarget & mTarget; }; -class LispyCommandMessageTarget : public CommandMessageTargetDecorator /* not final */ +class MENUS_API LispyCommandMessageTarget + : public CommandMessageTargetDecorator /* not final */ { public: - LispyCommandMessageTarget( CommandMessageTarget & target): CommandMessageTargetDecorator(target) {}; + LispyCommandMessageTarget( CommandMessageTarget & target) + : CommandMessageTargetDecorator(target) {}; ~LispyCommandMessageTarget() override; virtual void StartArray() override; virtual void EndArray() override; virtual void StartStruct() override; virtual void EndStruct() override; - virtual void AddItem(const wxString &value , const wxString &name = {} )override; - virtual void AddBool(const bool value , const wxString &name = {} )override; - virtual void AddItem(const double value , const wxString &name = {} )override; + virtual void AddItem(const wxString &value , const wxString &name = {}) + override; + virtual void AddBool(const bool value , const wxString &name = {}) + override; + virtual void AddItem(const double value , const wxString &name = {}) + override; virtual void StartField( const wxString &name = {} )override; virtual void EndField( ) override; }; -class BriefCommandMessageTarget : public CommandMessageTargetDecorator /* not final */ +class MENUS_API BriefCommandMessageTarget + : public CommandMessageTargetDecorator /* not final */ { public: - BriefCommandMessageTarget( CommandMessageTarget & target): CommandMessageTargetDecorator(target) {}; + BriefCommandMessageTarget( CommandMessageTarget & target) + : CommandMessageTargetDecorator(target) {}; ~BriefCommandMessageTarget() override; virtual void StartArray() override; virtual void EndArray() override; virtual void StartStruct() override; virtual void EndStruct() override; - virtual void AddItem(const wxString &value , const wxString &name = {} )override; - virtual void AddBool(const bool value , const wxString &name = {} )override; - virtual void AddItem(const double value , const wxString &name = {} )override; + virtual void AddItem(const wxString &value , const wxString &name = {}) + override; + virtual void AddBool(const bool value , const wxString &name = {}) + override; + virtual void AddItem(const double value , const wxString &name = {}) + override; virtual void StartField( const wxString &name = {} )override; virtual void EndField( ) override; }; /// Used to ignore a command's progress updates -class NullProgressTarget final : public CommandProgressTarget +class MENUS_API NullProgressTarget final : public CommandProgressTarget { public: ~NullProgressTarget() override; @@ -153,7 +164,7 @@ class NullProgressTarget final : public CommandProgressTarget }; /// -class ProgressToMessageTarget final : public CommandProgressTarget +class MENUS_API ProgressToMessageTarget final : public CommandProgressTarget { private: std::unique_ptr mTarget; @@ -169,7 +180,7 @@ class ProgressToMessageTarget final : public CommandProgressTarget }; /// Used to ignore a command's message updates -class NullMessageTarget final : public CommandMessageTarget +class MENUS_API NullMessageTarget final : public CommandMessageTarget { public: ~NullMessageTarget() override; @@ -177,7 +188,7 @@ class NullMessageTarget final : public CommandMessageTarget }; /// Displays messages from a command in a BasicUI::MessageBox -class AUDACITY_DLL_API MessageBoxTarget final : public CommandMessageTarget +class MENUS_API MessageBoxTarget final : public CommandMessageTarget { public: ~MessageBoxTarget() override; @@ -185,7 +196,7 @@ class AUDACITY_DLL_API MessageBoxTarget final : public CommandMessageTarget }; /// Constructs a response (to be sent back to a script) -class ResponseTarget final : public CommandMessageTarget +class MENUS_API ResponseTarget final : public CommandMessageTarget { private: wxSemaphore mSemaphore; @@ -215,7 +226,7 @@ class ResponseTarget final : public CommandMessageTarget }; /// Sends messages to two message targets at once -class CombinedMessageTarget final : public CommandMessageTarget +class MENUS_API CombinedMessageTarget final : public CommandMessageTarget { private: std::unique_ptr m1, m2; @@ -238,8 +249,8 @@ class CombinedMessageTarget final : public CommandMessageTarget /** \class TargetFactory -\brief TargetFactory makes Command output targets. By default, we ignore progress -updates but display all other messages directly +\brief TargetFactory makes Command output targets. + By default, we ignore progress updates but display all other messages directly */ class TargetFactory { @@ -267,12 +278,13 @@ class CommandOutputTargets /* not final */ std::shared_ptr mStatusTarget; std::shared_ptr mErrorTarget; public: - // && is not a reference to a reference, but rather a way to allow reference to a temporary - // that will be gone or transferred after we have taken it. It's a reference to an xvalue, - // or 'expiring value'. - CommandOutputTargets(std::unique_ptr &&pt = TargetFactory::ProgressDefault(), - std::shared_ptr &&st = TargetFactory::MessageDefault(), - std::shared_ptr &&et = TargetFactory::MessageDefault()) + CommandOutputTargets( + std::unique_ptr pt = + TargetFactory::ProgressDefault(), + std::shared_ptr st = + TargetFactory::MessageDefault(), + std::shared_ptr et = + TargetFactory::MessageDefault()) : mProgressTarget(std::move(pt)), mStatusTarget(st), mErrorTarget(et) { } ~CommandOutputTargets() @@ -344,7 +356,7 @@ class CommandOutputTargets /* not final */ } }; -class AUDACITY_DLL_API LispifiedCommandOutputTargets +class MENUS_API LispifiedCommandOutputTargets : public CommandOutputTargets { public : @@ -354,7 +366,7 @@ public : CommandOutputTargets * pToRestore; }; -class AUDACITY_DLL_API BriefCommandOutputTargets : public CommandOutputTargets +class MENUS_API BriefCommandOutputTargets : public CommandOutputTargets { public : BriefCommandOutputTargets( CommandOutputTargets & target ); diff --git a/src/commands/Keyboard.cpp b/libraries/lib-menus/Keyboard.cpp similarity index 100% rename from src/commands/Keyboard.cpp rename to libraries/lib-menus/Keyboard.cpp diff --git a/src/commands/Keyboard.h b/libraries/lib-menus/Keyboard.h similarity index 91% rename from src/commands/Keyboard.h rename to libraries/lib-menus/Keyboard.h index 5f8456010aca..3d6e3c1c163b 100644 --- a/src/commands/Keyboard.h +++ b/libraries/lib-menus/Keyboard.h @@ -20,7 +20,7 @@ struct NormalizedKeyStringTag; // Case insensitive comparisons using NormalizedKeyStringBase = TaggedIdentifier; -struct AUDACITY_DLL_API NormalizedKeyString : NormalizedKeyStringBase +struct MENUS_API NormalizedKeyString : NormalizedKeyStringBase { NormalizedKeyString() = default; explicit NormalizedKeyString( const wxString &key ); diff --git a/src/MenuRegistry.cpp b/libraries/lib-menus/MenuRegistry.cpp similarity index 95% rename from src/MenuRegistry.cpp rename to libraries/lib-menus/MenuRegistry.cpp index ace871af8c1a..e8b84e26c490 100644 --- a/src/MenuRegistry.cpp +++ b/libraries/lib-menus/MenuRegistry.cpp @@ -12,13 +12,21 @@ *//*******************************************************************/ #include "MenuRegistry.h" -#include #include "Project.h" -#include "ProjectWindows.h" #include "BasicUI.h" #include namespace MenuRegistry { +auto Options::MakeCheckFn(const wxString key, bool defaultValue ) -> CheckFn +{ + return [=](AudacityProject&){ return gPrefs->ReadBool( key, defaultValue ); }; +} + +auto Options::MakeCheckFn(const BoolSetting &setting ) -> CheckFn +{ + return MakeCheckFn( setting.GetPath(), setting.GetDefault() ); +} + std::pair detail::VisitorBase::ShouldBeginGroup( const ItemProperties *pProperties) { diff --git a/src/MenuRegistry.h b/libraries/lib-menus/MenuRegistry.h similarity index 94% rename from src/MenuRegistry.h rename to libraries/lib-menus/MenuRegistry.h index 12bab1f94eb8..51cfe07d503d 100644 --- a/src/MenuRegistry.h +++ b/libraries/lib-menus/MenuRegistry.h @@ -15,8 +15,8 @@ #include "Callable.h" #include "MemoryX.h" -#include "commands/CommandFunctors.h" -#include "commands/CommandFlag.h" +#include "CommandFunctors.h" +#include "CommandFlag.h" #include "Registry.h" #include @@ -33,7 +33,7 @@ namespace MenuRegistry { // type of a function that determines checkmark state using CheckFn = std::function< bool(AudacityProject&) >; - struct AUDACITY_DLL_API Options + struct MENUS_API Options { Options() {} // Allow implicit construction from an accelerator string, which is @@ -98,14 +98,12 @@ namespace MenuRegistry { int allowInMacros{ -1 }; private: - static CheckFn - MakeCheckFn( const wxString key, bool defaultValue ); - static CheckFn - MakeCheckFn( const BoolSetting &setting ); + static CheckFn MakeCheckFn(const wxString key, bool defaultValue); + static CheckFn MakeCheckFn(const BoolSetting &setting); }; //! A mix-in discovered by dynamic_cast; independent of the Traits - struct ItemProperties { + struct MENUS_API ItemProperties { enum Properties { None, Inline, @@ -118,7 +116,7 @@ namespace MenuRegistry { }; namespace detail { - struct VisitorBase { + struct MENUS_API VisitorBase { std::pair ShouldBeginGroup(const ItemProperties *pProperties); void AfterBeginGroup(const ItemProperties *pProperties); @@ -200,7 +198,7 @@ namespace MenuRegistry { auto pProperties = dynamic_cast(&item); return pProperties && pProperties->GetProperties() == ItemProperties::Section; - }; + } struct MenuItemData { MenuItemData(TranslatableString title) : mTitle{ std::move(title) } {} @@ -208,7 +206,7 @@ namespace MenuRegistry { }; // Describes a main menu in the toolbar, or a sub-menu - struct AUDACITY_DLL_API MenuItem final + struct MENUS_API MenuItem final : Composite::Extension< GroupItem, MenuItemData, const Identifier& > @@ -224,7 +222,7 @@ namespace MenuRegistry { // Collects other items that are conditionally shown or hidden, but are // always available to macro programming - struct ConditionalGroupItem final + struct MENUS_API ConditionalGroupItem final : Composite::Extension< GroupItem, Condition, const Identifier & > @@ -245,7 +243,7 @@ namespace MenuRegistry { // This is used before a sequence of many calls to Command() and // CommandGroup(), so that the finder argument need not be specified // in each call. - class AUDACITY_DLL_API FinderScope : ValueRestorer< CommandHandlerFinder > + class MENUS_API FinderScope : ValueRestorer< CommandHandlerFinder > { static CommandHandlerFinder sFinder; @@ -261,7 +259,7 @@ namespace MenuRegistry { }; // Describes one command in a menu - struct AUDACITY_DLL_API CommandItem final : SingleItem { + struct MENUS_API CommandItem final : SingleItem { CommandItem(const CommandID &name_, const TranslatableString &label_in_, CommandFunctorPointer callback_, @@ -311,7 +309,7 @@ namespace MenuRegistry { // Describes several successive commands in a menu that are closely related // and dispatch to one common callback, which will be passed a number // in the CommandContext identifying the command - struct AUDACITY_DLL_API CommandGroupItem final : SingleItem { + struct MENUS_API CommandGroupItem final : SingleItem { CommandGroupItem(const Identifier &name_, std::vector items_, CommandFunctorPointer callback_, @@ -360,7 +358,7 @@ namespace MenuRegistry { // For manipulating the enclosing menu or sub-menu directly, // adding any number of items, not using the CommandManager - struct SpecialItem : SingleItem + struct MENUS_API SpecialItem : SingleItem { using SingleItem::SingleItem; ~SpecialItem() override; @@ -368,7 +366,7 @@ namespace MenuRegistry { //! Groups of this type are inlined in the menu tree organization. They //! (but not their contained items) are excluded from visitations - struct MenuItems + struct MENUS_API MenuItems : Composite::Extension< GroupItem, void, const Identifier & > @@ -381,7 +379,7 @@ namespace MenuRegistry { Properties GetProperties() const override; }; - struct MenuPart + struct MENUS_API MenuPart : Composite::Extension< GroupItem, void, const Identifier & > @@ -443,7 +441,7 @@ namespace MenuRegistry { //! @} - struct ItemRegistry { + struct MENUS_API ItemRegistry { static GroupItem &Registry(); }; @@ -452,7 +450,7 @@ namespace MenuRegistry { // pItem can be specified by an expression using the inline functions above. using AttachedItem = RegisteredItem; - void Visit(Visitor &visitor, AudacityProject &project); + MENUS_API void Visit(Visitor &visitor, AudacityProject &project); } #endif diff --git a/modules/mod-nyq-bench/NyqBench.cpp b/modules/mod-nyq-bench/NyqBench.cpp index dc25ec5d5c82..ff3da0590562 100644 --- a/modules/mod-nyq-bench/NyqBench.cpp +++ b/modules/mod-nyq-bench/NyqBench.cpp @@ -34,7 +34,7 @@ #include "effects/EffectUI.h" #include "effects/nyquist/Nyquist.h" #include "../images/AudacityLogo.xpm" -#include "../../src/commands/CommandContext.h" +#include "CommandContext.h" #include "AudacityMessageBox.h" #include "NyqBench.h" diff --git a/src/AdornedRulerPanel.cpp b/src/AdornedRulerPanel.cpp index a4da3516f8fc..c5172ce181a5 100644 --- a/src/AdornedRulerPanel.cpp +++ b/src/AdornedRulerPanel.cpp @@ -2905,7 +2905,7 @@ void AdornedRulerPanel::SetTimeDisplayMode(TimeDisplayMode type) // Attach menu item -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "CommonCommandFlags.h" namespace { diff --git a/src/BatchCommands.cpp b/src/BatchCommands.cpp index 7937fdfc1e4e..761c7e2d9336 100644 --- a/src/BatchCommands.cpp +++ b/src/BatchCommands.cpp @@ -45,7 +45,7 @@ processing. See also MacrosWindow and ApplyMacroDialog. #include "AudacityMessageBox.h" -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "commands/CommandDispatch.h" MacroCommands::MacroCommands( AudacityProject &project ) diff --git a/src/BatchProcessDialog.cpp b/src/BatchProcessDialog.cpp index f4cf10ae7964..4dd075886773 100644 --- a/src/BatchProcessDialog.cpp +++ b/src/BatchProcessDialog.cpp @@ -1381,7 +1381,7 @@ void MacrosWindow::UpdatePrefs() // The rest of this file installs hooks #include "CommonCommandFlags.h" -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "effects/EffectManager.h" #include "ProjectWindows.h" namespace { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8ed65868fddd..7506c4f1bcf1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -134,8 +134,6 @@ list( APPEND SOURCES LyricsWindow.h MenuCreator.cpp MenuCreator.h - MenuRegistry.cpp - MenuRegistry.h MIDIPlay.cpp MIDIPlay.h MixerBoard.cpp @@ -254,13 +252,8 @@ list( APPEND SOURCES commands/Command.h commands/CommandBuilder.cpp commands/CommandBuilder.h - commands/CommandContext.cpp - commands/CommandContext.h commands/CommandDirectory.cpp commands/CommandDirectory.h - commands/CommandFlag.cpp - commands/CommandFlag.h - commands/CommandFunctors.h commands/CommandDispatch.cpp commands/CommandDispatch.h commands/CommandHandler.cpp @@ -272,8 +265,6 @@ list( APPEND SOURCES commands/CommandMisc.h commands/CommandSignature.cpp commands/CommandSignature.h - commands/CommandTargets.cpp - commands/CommandTargets.h commands/CommandType.cpp commands/CommandType.h commands/CompareAudioCommand.cpp @@ -290,8 +281,6 @@ list( APPEND SOURCES commands/HelpCommand.h commands/ImportExportCommands.cpp commands/ImportExportCommands.h - commands/Keyboard.cpp - commands/Keyboard.h commands/LoadCommands.cpp commands/LoadCommands.h commands/MessageCommand.cpp @@ -1355,6 +1344,7 @@ set( AUDACITY_LIBRARIES lib-import-export-interface lib-export-ui-interface lib-file-formats-interface + lib-menus-interface ) if (USE_VST) diff --git a/src/CommonCommandFlags.h b/src/CommonCommandFlags.h index 3d259ecc3935..2ec2dbb485c3 100644 --- a/src/CommonCommandFlags.h +++ b/src/CommonCommandFlags.h @@ -13,7 +13,7 @@ Paul Licameli split from Menus.cpp -#include "commands/CommandFlag.h" +#include "CommandFlag.h" AUDACITY_DLL_API bool EditableTracksSelectedPred( const AudacityProject &project ); diff --git a/src/FreqWindow.cpp b/src/FreqWindow.cpp index a324805ed042..cc9359ce18f9 100644 --- a/src/FreqWindow.cpp +++ b/src/FreqWindow.cpp @@ -1219,7 +1219,7 @@ void FreqPlot::OnMouseEvent(wxMouseEvent & event) } // Remaining code hooks this add-on into the application -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "commands/CommandManager.h" #include "ProjectWindows.h" diff --git a/src/HistoryWindow.cpp b/src/HistoryWindow.cpp index 771498c2c677..68d2828bcb15 100644 --- a/src/HistoryWindow.cpp +++ b/src/HistoryWindow.cpp @@ -485,7 +485,7 @@ void HistoryDialog::UpdatePrefs() } // Remaining code hooks this add-on into the application -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "MenuRegistry.h" namespace { diff --git a/src/LyricsWindow.cpp b/src/LyricsWindow.cpp index 2a67d30c5355..1910462171e8 100644 --- a/src/LyricsWindow.cpp +++ b/src/LyricsWindow.cpp @@ -194,7 +194,7 @@ void LyricsWindow::UpdatePrefs() } // Remaining code hooks this add-on into the application -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "MenuRegistry.h" namespace { diff --git a/src/MenuCreator.cpp b/src/MenuCreator.cpp index 9edf42d044a7..b0d46b59e853 100644 --- a/src/MenuCreator.cpp +++ b/src/MenuCreator.cpp @@ -24,7 +24,7 @@ #include "MenuCreator.h" #include "ActiveProject.h" -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "commands/CommandManagerWindowClasses.h" #include "KeyboardCapture.h" #include "Journal.h" diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp index b8abcf02d7b4..28a382cf7bd6 100644 --- a/src/MixerBoard.cpp +++ b/src/MixerBoard.cpp @@ -1531,7 +1531,7 @@ void MixerBoardFrame::SetWindowTitle() } // Remaining code hooks this add-on into the application -#include "commands/CommandContext.h" +#include "CommandContext.h" namespace { diff --git a/src/Printing.cpp b/src/Printing.cpp index 918dd7424954..26777c1939ed 100644 --- a/src/Printing.cpp +++ b/src/Printing.cpp @@ -34,7 +34,7 @@ #include "tracks/ui/ChannelView.h" -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "MenuRegistry.h" #include "CommonCommandFlags.h" #include "Project.h" diff --git a/src/ProjectAudioManager.h b/src/ProjectAudioManager.h index 97c8eb227a43..3fbcb712ec96 100644 --- a/src/ProjectAudioManager.h +++ b/src/ProjectAudioManager.h @@ -194,7 +194,7 @@ struct PropertiesOfSelected AUDACITY_DLL_API PropertiesOfSelected GetPropertiesOfSelected(const AudacityProject &proj); -#include "commands/CommandFlag.h" +#include "CommandFlag.h" extern AUDACITY_DLL_API const ReservedCommandFlag &CanStopAudioStreamFlag(); diff --git a/src/ProjectWindow.cpp b/src/ProjectWindow.cpp index b755992897ce..c2356f6144cb 100644 --- a/src/ProjectWindow.cpp +++ b/src/ProjectWindow.cpp @@ -26,7 +26,7 @@ Paul Licameli split from AudacityProject.cpp #include "ViewInfo.h" #include "WaveClip.h" #include "WaveTrack.h" -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "prefs/ThemePrefs.h" #include "prefs/TracksPrefs.h" #include "toolbars/ToolManager.h" diff --git a/src/Screenshot.cpp b/src/Screenshot.cpp index e6d41d665dbd..2892e2560c97 100644 --- a/src/Screenshot.cpp +++ b/src/Screenshot.cpp @@ -19,7 +19,7 @@ It forwards the actual work of doing the commands to the ScreenshotCommand. #include "Screenshot.h" #include "commands/ScreenshotCommand.h" #include "commands/wxCommandTargets.h" -#include "commands/CommandContext.h" +#include "CommandContext.h" #include #include #include diff --git a/src/ShuttleGetDefinition.h b/src/ShuttleGetDefinition.h index 4e28a38baee2..5853189726bc 100644 --- a/src/ShuttleGetDefinition.h +++ b/src/ShuttleGetDefinition.h @@ -12,7 +12,7 @@ #define __AUDACITY_SHUTTLE_GET_DEFINITION__ #include "SettingsVisitor.h" // to inherit -#include "commands/CommandTargets.h" // to inherit +#include "CommandTargets.h" // to inherit /**************************************************************************//** \brief SettingsVisitor that retrieves a JSON format definition of a command's parameters. diff --git a/src/SpectralDataDialog.cpp b/src/SpectralDataDialog.cpp index a993b60d00ae..810ade8f0f2a 100644 --- a/src/SpectralDataDialog.cpp +++ b/src/SpectralDataDialog.cpp @@ -41,7 +41,7 @@ #include "AudioIO.h" #include "ClientData.h" #include "Clipboard.h" -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "commands/CommandManager.h" #include "UndoManager.h" #include "Prefs.h" diff --git a/src/TagsEditor.cpp b/src/TagsEditor.cpp index 0d198a590ca7..cee5399e2348 100644 --- a/src/TagsEditor.cpp +++ b/src/TagsEditor.cpp @@ -1024,7 +1024,7 @@ bool TagsEditorDialog::EditProjectMetadata(AudacityProject &project, } // Attach menu item -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "MenuRegistry.h" #include "CommonCommandFlags.h" diff --git a/src/TimerRecordDialog.cpp b/src/TimerRecordDialog.cpp index 25d27adb4f06..45e8bd8ddc3a 100644 --- a/src/TimerRecordDialog.cpp +++ b/src/TimerRecordDialog.cpp @@ -1170,7 +1170,7 @@ ProgressResult TimerRecordDialog::PreActionDelay(int iActionIndex, TimerRecordCo // Register a menu item -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "MenuRegistry.h" #include "CommonCommandFlags.h" #include "Project.h" diff --git a/src/TransportUtilities.cpp b/src/TransportUtilities.cpp index 06d3b8e65838..80ea8eae3e65 100644 --- a/src/TransportUtilities.cpp +++ b/src/TransportUtilities.cpp @@ -14,7 +14,7 @@ #include #include "AudioIO.h" #include "AudioIOSequences.h" -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "Project.h" #include "ProjectAudioIO.h" #include "ProjectAudioManager.h" diff --git a/src/cloud/audiocom/LinkAccountDialog.cpp b/src/cloud/audiocom/LinkAccountDialog.cpp index b52680aa29bb..acaed7386774 100644 --- a/src/cloud/audiocom/LinkAccountDialog.cpp +++ b/src/cloud/audiocom/LinkAccountDialog.cpp @@ -129,7 +129,7 @@ void LinkAccountDialog::OnTextChanged() } // namespace cloud::audiocom // Remaining code hooks this add-on into the application -#include "../../commands/CommandContext.h" +#include "CommandContext.h" #include "MenuRegistry.h" namespace { diff --git a/src/commands/CommandDispatch.h b/src/commands/CommandDispatch.h index de0df04b8de6..35f8ca8d01e2 100644 --- a/src/commands/CommandDispatch.h +++ b/src/commands/CommandDispatch.h @@ -17,6 +17,8 @@ class CommandContext; +using PluginID = wxString; + namespace CommandDispatch { AUDACITY_DLL_API bool HandleTextualCommand( const CommandID & Str, diff --git a/src/commands/CommandHandler.cpp b/src/commands/CommandHandler.cpp index 572eab57f93e..737a839d56be 100644 --- a/src/commands/CommandHandler.cpp +++ b/src/commands/CommandHandler.cpp @@ -24,7 +24,7 @@ #include "../ProjectWindow.h" #include "AppCommandEvent.h" #include "ScriptCommandRelay.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../commands/Command.h" CommandHandler::CommandHandler() diff --git a/src/commands/CommandManager.cpp b/src/commands/CommandManager.cpp index a05aa10fc4b9..ae6524ea7853 100644 --- a/src/commands/CommandManager.cpp +++ b/src/commands/CommandManager.cpp @@ -532,18 +532,6 @@ void CommandManager::AddItem(const CommandID &name, mbSeparatorAllowed = true; } -auto MenuRegistry::Options::MakeCheckFn( - const wxString key, bool defaultValue ) -> CheckFn -{ - return [=](AudacityProject&){ return gPrefs->ReadBool( key, defaultValue ); }; -} - -auto MenuRegistry::Options::MakeCheckFn( - const BoolSetting &setting ) -> CheckFn -{ - return MakeCheckFn( setting.GetPath(), setting.GetDefault() ); -} - /// /// Add a list of menu items to the current menu. When the user selects any /// one of these, the given functor will be called diff --git a/src/commands/CommandManager.h b/src/commands/CommandManager.h index c24db895b37c..19069450230a 100644 --- a/src/commands/CommandManager.h +++ b/src/commands/CommandManager.h @@ -41,6 +41,7 @@ class wxMenuBar; class BoolSetting; struct MenuBarListEntry; +using PluginID = wxString; struct SubMenuListEntry; using MenuBarList = std::vector < MenuBarListEntry >; diff --git a/src/commands/Demo.cpp b/src/commands/Demo.cpp index 4ec5d54a8deb..daf93c9491bd 100644 --- a/src/commands/Demo.cpp +++ b/src/commands/Demo.cpp @@ -29,7 +29,7 @@ parameters. It is for development purposes. #include "ShuttleGui.h" #include "AudacityMessageBox.h" #include "../widgets/valnum.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" const ComponentInterfaceSymbol DemoCommand::Symbol { XO("Demo") }; diff --git a/src/commands/PreferenceCommands.cpp b/src/commands/PreferenceCommands.cpp index b6bd352f5626..99e366d2f3d2 100644 --- a/src/commands/PreferenceCommands.cpp +++ b/src/commands/PreferenceCommands.cpp @@ -25,7 +25,7 @@ SetPreferenceCommand classes #include "Prefs.h" #include "SettingsVisitor.h" #include "ShuttleGui.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../prefs/PrefsDialog.h" const ComponentInterfaceSymbol GetPreferenceCommand::Symbol diff --git a/src/effects/Contrast.cpp b/src/effects/Contrast.cpp index d3dd43bc8d62..ac51d95c7dcd 100644 --- a/src/effects/Contrast.cpp +++ b/src/effects/Contrast.cpp @@ -651,7 +651,7 @@ void ContrastDialog::OnReset(wxCommandEvent & /*event*/) } // Remaining code hooks this add-on into the application -#include "commands/CommandContext.h" +#include "CommandContext.h" #include "commands/CommandManager.h" #include "ProjectWindows.h" diff --git a/src/effects/EffectManager.cpp b/src/effects/EffectManager.cpp index 967b5fd96c83..b1b525b70db7 100644 --- a/src/effects/EffectManager.cpp +++ b/src/effects/EffectManager.cpp @@ -28,7 +28,7 @@ effects. #include "ConfigInterface.h" #include "../ShuttleGetDefinition.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../commands/AudacityCommand.h" #include "PluginManager.h" #include "Track.h" diff --git a/src/effects/EffectUI.cpp b/src/effects/EffectUI.cpp index 7f93e58b9f38..b51f4d6784fe 100644 --- a/src/effects/EffectUI.cpp +++ b/src/effects/EffectUI.cpp @@ -103,7 +103,7 @@ class EffectPanel final : public wxPanelWrapper #include "ShuttleGui.h" #include "ViewInfo.h" #include "../commands/AudacityCommand.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "AudacityMessageBox.h" #include "HelpSystem.h" #include "../widgets/AButton.h" diff --git a/src/export/ExportMIDI.cpp b/src/export/ExportMIDI.cpp index 65289c185d4b..49715591fc1b 100644 --- a/src/export/ExportMIDI.cpp +++ b/src/export/ExportMIDI.cpp @@ -25,8 +25,8 @@ #include "FileDialog/FileDialog.h" // Insert a menu item -#include "../commands/CommandContext.h" -#include "../MenuRegistry.h" +#include "CommandContext.h" +#include "MenuRegistry.h" #include "../CommonCommandFlags.h" namespace { diff --git a/src/import/ImportMIDI.cpp b/src/import/ImportMIDI.cpp index d9e02c71c90f..efae31323725 100644 --- a/src/import/ImportMIDI.cpp +++ b/src/import/ImportMIDI.cpp @@ -128,8 +128,8 @@ bool ImportMIDI(const FilePath &fName, NoteTrack * dest) } // Insert a menu item -#include "../commands/CommandContext.h" -#include "../MenuRegistry.h" +#include "CommandContext.h" +#include "MenuRegistry.h" #include "../CommonCommandFlags.h" namespace { diff --git a/src/menus/ClipMenus.cpp b/src/menus/ClipMenus.cpp index 2a9c7e779584..924e25af290e 100644 --- a/src/menus/ClipMenus.cpp +++ b/src/menus/ClipMenus.cpp @@ -7,7 +7,7 @@ #include "WaveClip.h" #include "ViewInfo.h" #include "WaveTrack.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "MenuRegistry.h" #include "../tracks/ui/TimeShiftHandle.h" diff --git a/src/menus/EditMenus.cpp b/src/menus/EditMenus.cpp index 473c79db9ede..6033814eaa90 100644 --- a/src/menus/EditMenus.cpp +++ b/src/menus/EditMenus.cpp @@ -20,7 +20,7 @@ #include "WaveTrackUtilities.h" #include "WaveClip.h" #include "SampleBlock.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "TimeWarper.h" #include "../prefs/PrefsDialog.h" #include "../prefs/TracksBehaviorsPrefs.h" diff --git a/src/menus/ExtraMenus.cpp b/src/menus/ExtraMenus.cpp index 241d91d3f116..d3d1b95d6560 100644 --- a/src/menus/ExtraMenus.cpp +++ b/src/menus/ExtraMenus.cpp @@ -2,7 +2,7 @@ #include "Prefs.h" #include "Project.h" #include "ProjectWindows.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../toolbars/ToolManager.h" #include diff --git a/src/menus/FileMenus.cpp b/src/menus/FileMenus.cpp index 3fc27a8ab9ef..350bafc424d8 100644 --- a/src/menus/FileMenus.cpp +++ b/src/menus/FileMenus.cpp @@ -18,7 +18,7 @@ #include "UndoManager.h" #include "ViewInfo.h" #include "WaveTrack.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "RealtimeEffectList.h" #include "RealtimeEffectState.h" #include "Import.h" diff --git a/src/menus/HelpMenus.cpp b/src/menus/HelpMenus.cpp index 54acfecb01b7..ac9407fbcc91 100644 --- a/src/menus/HelpMenus.cpp +++ b/src/menus/HelpMenus.cpp @@ -23,8 +23,8 @@ #include "../SplashDialog.h" #include "SyncLock.h" #include "Theme.h" -#include "../commands/CommandContext.h" -#include "../MenuRegistry.h" +#include "CommandContext.h" +#include "MenuRegistry.h" #include "../prefs/PrefsDialog.h" #include "AudacityMessageBox.h" #include "HelpSystem.h" diff --git a/src/menus/LabelMenus.cpp b/src/menus/LabelMenus.cpp index 84e48ac5565d..d59fb14581a8 100644 --- a/src/menus/LabelMenus.cpp +++ b/src/menus/LabelMenus.cpp @@ -15,7 +15,7 @@ #include "ViewInfo.h" #include "WaveTrack.h" #include "WaveTrackUtilities.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../tracks/labeltrack/ui/LabelTrackView.h" #include "toolbars/ToolManager.h" diff --git a/src/menus/NavigationMenus.cpp b/src/menus/NavigationMenus.cpp index 666f72be7707..fde09d8222ba 100644 --- a/src/menus/NavigationMenus.cpp +++ b/src/menus/NavigationMenus.cpp @@ -11,7 +11,7 @@ #include "SelectionState.h" #include "../TrackPanel.h" #include "../TrackPanelAx.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../toolbars/ToolManager.h" #include "../widgets/AButton.h" #include "../widgets/ASlider.h" diff --git a/src/menus/PluginMenus.cpp b/src/menus/PluginMenus.cpp index be2bd3c5490b..1631387f6465 100644 --- a/src/menus/PluginMenus.cpp +++ b/src/menus/PluginMenus.cpp @@ -22,7 +22,7 @@ #include "../TrackPanelAx.h" #include "TempDirectory.h" #include "UndoManager.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../commands/CommandManager.h" #include "../effects/EffectManager.h" #include "../effects/EffectUI.h" diff --git a/src/menus/SelectMenus.cpp b/src/menus/SelectMenus.cpp index 76e881db20af..e343f9f5f0e2 100644 --- a/src/menus/SelectMenus.cpp +++ b/src/menus/SelectMenus.cpp @@ -19,8 +19,8 @@ #include "WaveClip.h" #include "WaveTrack.h" #include "../LabelTrack.h" -#include "../commands/CommandContext.h" -#include "../MenuRegistry.h" +#include "CommandContext.h" +#include "MenuRegistry.h" #include "../toolbars/ControlToolBar.h" #include "../tracks/ui/SelectHandle.h" #include "../tracks/labeltrack/ui/LabelTrackView.h" diff --git a/src/menus/TimelineMenus.cpp b/src/menus/TimelineMenus.cpp index 5a452e483330..8ab07d0e5284 100644 --- a/src/menus/TimelineMenus.cpp +++ b/src/menus/TimelineMenus.cpp @@ -13,7 +13,7 @@ #include "Project.h" #include "../commands/CommandManager.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" namespace { diff --git a/src/menus/ToolbarMenus.cpp b/src/menus/ToolbarMenus.cpp index 18754d5fa4e6..14556dfc9d8a 100644 --- a/src/menus/ToolbarMenus.cpp +++ b/src/menus/ToolbarMenus.cpp @@ -1,5 +1,5 @@ #include "../ProjectSettings.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../toolbars/ToolManager.h" /// Namespace for functions for View Toolbar menu diff --git a/src/menus/TrackMenus.cpp b/src/menus/TrackMenus.cpp index 12a4e429f726..1c7a47f9d95c 100644 --- a/src/menus/TrackMenus.cpp +++ b/src/menus/TrackMenus.cpp @@ -21,7 +21,7 @@ #include "WaveClip.h" #include "ViewInfo.h" #include "WaveTrack.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../effects/EffectManager.h" #include "../effects/EffectUI.h" #include "QualitySettings.h" diff --git a/src/menus/TransportMenus.cpp b/src/menus/TransportMenus.cpp index 02374b41c1cd..fdf5ea0080ab 100644 --- a/src/menus/TransportMenus.cpp +++ b/src/menus/TransportMenus.cpp @@ -20,7 +20,7 @@ #include "../prefs/TracksPrefs.h" #include "WaveTrack.h" #include "ViewInfo.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../toolbars/ControlToolBar.h" #include "../toolbars/ToolManager.h" #include "AudacityMessageBox.h" diff --git a/src/menus/ViewMenus.cpp b/src/menus/ViewMenus.cpp index 0ed74a25fa9c..0dfdbe2992b9 100644 --- a/src/menus/ViewMenus.cpp +++ b/src/menus/ViewMenus.cpp @@ -10,7 +10,7 @@ #include "../TrackPanel.h" #include "UndoManager.h" #include "ViewInfo.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../commands/CommandManager.h" #include "../prefs/GUIPrefs.h" #include "../prefs/TracksPrefs.h" diff --git a/src/prefs/KeyConfigPrefs.cpp b/src/prefs/KeyConfigPrefs.cpp index 960372321265..ec5b54fd41ea 100644 --- a/src/prefs/KeyConfigPrefs.cpp +++ b/src/prefs/KeyConfigPrefs.cpp @@ -35,7 +35,6 @@ KeyConfigPrefs and MousePrefs use. #include "Prefs.h" #include "Project.h" #include "../ProjectWindows.h" -#include "../commands/CommandManager.h" #include "XMLFileReader.h" #include "SelectFile.h" diff --git a/src/toolbars/CutCopyPasteToolBar.cpp b/src/toolbars/CutCopyPasteToolBar.cpp index 2c83c15284ee..6520c126ced4 100644 --- a/src/toolbars/CutCopyPasteToolBar.cpp +++ b/src/toolbars/CutCopyPasteToolBar.cpp @@ -52,7 +52,7 @@ #include "UndoManager.h" #include "../widgets/AButton.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../commands/CommandManager.h" #include "../commands/CommandDispatch.h" diff --git a/src/toolbars/DeviceToolBar.cpp b/src/toolbars/DeviceToolBar.cpp index ba8072f80d47..62c09abf5b3b 100644 --- a/src/toolbars/DeviceToolBar.cpp +++ b/src/toolbars/DeviceToolBar.cpp @@ -770,7 +770,7 @@ AttachedToolBarMenuItem sAttachment{ // Define some related menu items -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../CommonCommandFlags.h" namespace { diff --git a/src/toolbars/EditToolBar.cpp b/src/toolbars/EditToolBar.cpp index 5e2b1b5cb6c9..9b39f65e6b51 100644 --- a/src/toolbars/EditToolBar.cpp +++ b/src/toolbars/EditToolBar.cpp @@ -51,7 +51,7 @@ #include "UndoManager.h" #include "../widgets/AButton.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../commands/CommandManager.h" #include "../commands/CommandDispatch.h" diff --git a/src/toolbars/MeterToolBar.cpp b/src/toolbars/MeterToolBar.cpp index f3946c39f55b..d7f9c20097d3 100644 --- a/src/toolbars/MeterToolBar.cpp +++ b/src/toolbars/MeterToolBar.cpp @@ -546,7 +546,7 @@ AttachedToolBarMenuItem sAttachment2{ } // Now define other related menu items -#include "../commands/CommandContext.h" +#include "CommandContext.h" namespace { void OnOutputGain(const CommandContext &context) diff --git a/src/toolbars/ToolBarButtons.cpp b/src/toolbars/ToolBarButtons.cpp index 92f9d5c56f9c..1b3e74cfda2f 100644 --- a/src/toolbars/ToolBarButtons.cpp +++ b/src/toolbars/ToolBarButtons.cpp @@ -18,7 +18,7 @@ #include "../widgets/AButton.h" #include "Project.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" #include "../commands/CommandManager.h" #include "../commands/CommandDispatch.h" diff --git a/src/toolbars/ToolManager.cpp b/src/toolbars/ToolManager.cpp index 84ad89878cb4..393d4673df95 100644 --- a/src/toolbars/ToolManager.cpp +++ b/src/toolbars/ToolManager.cpp @@ -27,7 +27,7 @@ #include "ToolManager.h" -#include "../commands/CommandContext.h" +#include "CommandContext.h" // For compilers that support precompilation, includes "wx/wx.h". #include diff --git a/src/toolbars/ToolManager.h b/src/toolbars/ToolManager.h index 4b4e0fa6b95b..bae4d8836501 100644 --- a/src/toolbars/ToolManager.h +++ b/src/toolbars/ToolManager.h @@ -25,7 +25,7 @@ #include "Observer.h" #include "ToolDock.h" -#include "../commands/CommandFunctors.h" +#include "CommandFunctors.h" class wxCommandEvent; diff --git a/src/tracks/playabletrack/notetrack/ui/NoteTrackMenuItems.cpp b/src/tracks/playabletrack/notetrack/ui/NoteTrackMenuItems.cpp index 1996d0ca1d99..4f101f9d610a 100644 --- a/src/tracks/playabletrack/notetrack/ui/NoteTrackMenuItems.cpp +++ b/src/tracks/playabletrack/notetrack/ui/NoteTrackMenuItems.cpp @@ -17,8 +17,8 @@ Paul Licameli split from TrackMenus.cpp // Attach a menu item for diagnostic information #include "AudioIOBase.h" -#include "../../../../commands/CommandContext.h" -#include "../../../../MenuRegistry.h" +#include "CommandContext.h" +#include "MenuRegistry.h" #include "CommonCommandFlags.h" #include "HelpUtilities.h" #include "NoteTrack.h" diff --git a/src/tracks/playabletrack/wavetrack/ui/SpectrumView.cpp b/src/tracks/playabletrack/wavetrack/ui/SpectrumView.cpp index f7c87eff8de8..b141c2fa54a7 100644 --- a/src/tracks/playabletrack/wavetrack/ui/SpectrumView.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/SpectrumView.cpp @@ -1096,7 +1096,7 @@ unsigned SpectrumView::Char( #include "../../../../CommonCommandFlags.h" #include "Project.h" #include "../../../../SpectrumAnalyst.h" -#include "../../../../commands/CommandContext.h" +#include "CommandContext.h" namespace { void DoNextPeakFrequency(AudacityProject &project, bool up) diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveChannelView.cpp b/src/tracks/playabletrack/wavetrack/ui/WaveChannelView.cpp index 6a43c7a1c61a..0e6d65d6cc57 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveChannelView.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/WaveChannelView.cpp @@ -25,7 +25,7 @@ Paul Licameli split from TrackPanel.cpp #include "../../../../../images/Cursors.h" #include "AllThemeResources.h" -#include "../../../../commands/CommandContext.h" +#include "CommandContext.h" #include "../../../../HitTestResult.h" #include "ProjectHistory.h" #include "../../../../RefreshCode.h" diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp b/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp index a82f28745625..1ea97a5e21e8 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp @@ -14,10 +14,10 @@ #include #include "AllThemeResources.h" -#include "../../../../commands/CommandContext.h" -#include "../../../../commands/CommandFlag.h" -#include "../../../../commands/CommandFunctors.h" -#include "../../../../MenuRegistry.h" +#include "CommandContext.h" +#include "CommandFlag.h" +#include "CommandFunctors.h" +#include "MenuRegistry.h" #include "../../../../TrackPanelMouseEvent.h" #include "../../../../TrackArt.h" #include "../../../../TrackArtist.h" diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackMenuItems.cpp b/src/tracks/playabletrack/wavetrack/ui/WaveTrackMenuItems.cpp index 237d3b6f9d9a..8cb5626c7554 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackMenuItems.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackMenuItems.cpp @@ -16,8 +16,8 @@ Paul Licameli split from TrackMenus.cpp #include "SelectUtilities.h" #include "TrackPanelAx.h" #include "WaveTrack.h" -#include "../../../../commands/CommandContext.h" -#include "../../../../MenuRegistry.h" +#include "CommandContext.h" +#include "MenuRegistry.h" #include "QualitySettings.h" namespace { diff --git a/src/tracks/timetrack/ui/TimeTrackMenuItems.cpp b/src/tracks/timetrack/ui/TimeTrackMenuItems.cpp index 978fa15ebd5d..14b6b66dab26 100644 --- a/src/tracks/timetrack/ui/TimeTrackMenuItems.cpp +++ b/src/tracks/timetrack/ui/TimeTrackMenuItems.cpp @@ -15,7 +15,7 @@ Paul Licameli split from TrackMenus.cpp #include "SelectUtilities.h" #include "TimeTrack.h" #include "TrackPanelAx.h" -#include "../../../commands/CommandContext.h" +#include "CommandContext.h" #include "MenuRegistry.h" #include "AudacityMessageBox.h" diff --git a/src/tracks/ui/CommonTrackPanelCell.cpp b/src/tracks/ui/CommonTrackPanelCell.cpp index ff41bc7e573c..2be6c4dd431b 100644 --- a/src/tracks/ui/CommonTrackPanelCell.cpp +++ b/src/tracks/ui/CommonTrackPanelCell.cpp @@ -16,7 +16,7 @@ Paul Licameli split from TrackPanel.cpp #include "../../widgets/BasicMenu.h" #include "BasicUI.h" -#include "../../commands/CommandContext.h" +#include "CommandContext.h" #include "../../HitTestResult.h" #include "MenuCreator.h" #include "../../RefreshCode.h" diff --git a/src/tracks/ui/Scrubbing.h b/src/tracks/ui/Scrubbing.h index b383c1225378..5a81e810a186 100644 --- a/src/tracks/ui/Scrubbing.h +++ b/src/tracks/ui/Scrubbing.h @@ -19,7 +19,7 @@ Paul Licameli split from TrackPanel.cpp #include "ClientData.h" // to inherit #include "Prefs.h" // to inherit #include "../../widgets/Overlay.h" // to inherit -#include "../../commands/CommandContext.h" +#include "CommandContext.h" #include "Identifier.h" class AudacityProject; diff --git a/src/widgets/KeyView.h b/src/widgets/KeyView.h index 3fff8bdaeb51..e5dc9eda5fac 100644 --- a/src/widgets/KeyView.h +++ b/src/widgets/KeyView.h @@ -17,7 +17,7 @@ #include #include // to inherit wxVListBox -#include "../commands/Keyboard.h" +#include "Keyboard.h" // Class holding all information about a node. Rather than a real tree // we store these in an array and simulate a tree.