1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00

Add Help buttons to three Dialogs.

- Added to Edit and Apply Chains dialogs.
- Added to Select Command dialog.
This commit is contained in:
James Crook
2018-03-03 10:15:09 +00:00
parent 6914c21413
commit 6b3041118f
4 changed files with 27 additions and 3 deletions

View File

@@ -41,6 +41,7 @@ selected command.
#include "effects/EffectManager.h"
#include "BatchCommands.h"
#include "ShuttleGui.h"
#include "widgets/HelpSystem.h"
#define CommandsListID 7001
@@ -50,6 +51,7 @@ selected command.
BEGIN_EVENT_TABLE(BatchCommandDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, BatchCommandDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, BatchCommandDialog::OnCancel)
EVT_BUTTON(wxID_HELP, BatchCommandDialog::OnHelp)
EVT_BUTTON(EditParamsButtonID, BatchCommandDialog::OnEditParams)
EVT_BUTTON(UsePresetButtonID, BatchCommandDialog::OnUsePreset)
EVT_LIST_ITEM_ACTIVATED(CommandsListID, BatchCommandDialog::OnItemSelected)
@@ -110,7 +112,7 @@ void BatchCommandDialog::PopulateOrExchange(ShuttleGui &S)
}
S.EndVerticalLay();
S.AddStandardButtons();
S.AddStandardButtons( eOkButton | eCancelButton | eHelpButton);
PopulateCommandList();
@@ -149,6 +151,12 @@ void BatchCommandDialog::OnCancel(wxCommandEvent & WXUNUSED(event))
EndModal(false);
}
void BatchCommandDialog::OnHelp(wxCommandEvent & WXUNUSED(event))
{
wxString page = GetHelpPageName();
HelpSystem::ShowHelp(this, page, true);
}
void BatchCommandDialog::OnItemSelected(wxListEvent &event)
{
const auto &command = mCommandNames[ event.GetIndex() ];