3#include <wx/bmpbuttn.h>
4#include <wx/textctrl.h>
7#include "../AboutDialog.h"
10#include "../CommonCommandFlags.h"
11#include "../CrashReport.h"
14#include "../HelpUtilities.h"
20#include "../ProjectSelectionManager.h"
21#include "../ProjectWindows.h"
24#include "../SplashDialog.h"
27#include "../commands/CommandContext.h"
28#include "../commands/CommandManager.h"
29#include "../prefs/PrefsDialog.h"
35#if defined(HAVE_UPDATES_CHECK)
62 void OnOk(wxCommandEvent &event);
63 void OnCancel(wxCommandEvent &event);
65 void OnFix(
const PrefSetter &setter, wxWindowID
id);
77#define FixButtonID 7001
78#define HelpButtonID 7011
82 EVT_BUTTON(wxID_CANCEL, QuickFixDialog::OnCancel)
87 wxDefaultPosition, wxDefaultSize,
88 wxDEFAULT_DIALOG_STYLE )
96 PopulateOrExchange(
S);
104 wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
120 .AddFixedText( Prompt );
124 .AddButton(
XXO(
"Fix") )
125 ->Bind( wxEVT_BUTTON, [
this, prefSetter,
id](wxCommandEvent&){
126 OnFix( prefSetter,
id );
133 b->SetToolTip(
_(
"Help") );
134 b->SetLabel(
_(
"Help"));
135 b->Bind( wxEVT_BUTTON, [
this, Help](
const wxCommandEvent&){
145 S.StartVerticalLay(1);
146 S.StartStatic(
XO(
"Quick Fixes"));
149 bool bStuckInMode = mbSyncLocked || mbInSnapTo || mbSoundActivated;
152 SetLabel(
XO(
"Nothing to do"));
153 S.AddFixedText(
XO(
"No quick, easily fixed problems were found"));
156 S.StartMultiColumn(3, wxALIGN_CENTER);
162 [pProject, &setting]{
176 auto pProject = &mProject;
177 AddStuck(
S, mbSyncLocked,
179 XO(
"Clocks on the Tracks"),
"Quick_Fix#sync_lock" );
180 AddStuck(
S, mbInSnapTo,
187 XO(
"Can't select precisely"),
"Quick_Fix#snap_to" );
188 AddStuck(
S, mbSoundActivated,
190 XO(
"Recording stops and starts"),
191 "Quick_Fix#sound_activated_recording" );
197 S.StartHorizontalLay(wxALIGN_CENTER_HORIZONTAL, 0);
199 S.EndHorizontalLay();
203 wxButton * pBtn = (wxButton*)FindWindowById( wxID_HELP );
205 pBtn->Bind( wxEVT_BUTTON, [
this](
const wxCommandEvent & ){
206 OnHelp(
"Quick_Fix#" );
210void QuickFixDialog::OnOk(wxCommandEvent &event)
216void QuickFixDialog::OnCancel(wxCommandEvent &event)
219 EndModal(wxID_CANCEL);
227void QuickFixDialog::OnFix(
const PrefSetter &setter, wxWindowID
id)
233 auto pBtn = FindWindow(
id);
235 pBtn->SetLabel(
_(
"Fixed") );
238 wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
276 wxString info = gAudioIO->GetDeviceInfo();
278 XO(
"Audio Device Info"),
wxT(
"deviceinfo.txt") );
286#if defined(HAS_CRASH_REPORT)
294 CrashReport::Generate(wxDebugReport::Context_Current);
301 unsigned *p =
nullptr;
332 enum :
unsigned { TAB = 3 };
335 if (
dynamic_cast<MenuItem*
>( &item ) ) {
338 info += item.name.GET();
340 indentation = wxString{
' ', TAB * ++level };
346 if (
dynamic_cast<MenuItem*
>( &item ) )
347 indentation = wxString{
' ', TAB * --level };
354 info += item.name.GET();
360 static const wxString separatorName{
'=', 20 };
362 info += separatorName;
366 void Indent() { info += indentation; }
367 void Return() { info +=
'\n'; }
370 wxString indentation;
377 Verbatim(
"Menu Tree"),
wxT(
"menutree.txt"),
true );
385#if defined(HAVE_UPDATES_CHECK)
397 wxCommandEvent evt{ wxEVT_MENU, wxID_ABOUT };
398 wxTheApp->AddPendingEvent( evt );
437 #ifdef EXPERIMENTAL_DA
462 Menu(
wxT(
"Diagnostics"),
XXO(
"&Diagnostics"),
468 #
if defined(HAS_CRASH_REPORT)
469 Command(
wxT(
"CrashReport"),
XXO(
"&Generate Support Data..."),
493 wxT(
"FrameStatistics"),
Verbatim(
"Frame Statistics..."),
502 #
if !defined(EXPERIMENTAL_DA) && defined(HAVE_UPDATES_CHECK)
BoolSetting SoundActivatedRecord
AttachedItem sAttachment1
constexpr CommandFlag AlwaysEnabledFlag
const ReservedCommandFlag & AudioIONotBusyFlag()
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
XXO("&Cut/Copy/Paste Toolbar")
void ShowDiagnostics(AudacityProject &project, const wxString &info, const TranslatableString &description, const wxString &defaultPath, bool fixedWidth)
audacity::BasicSettings * gPrefs
void DoReloadPreferences(AudacityProject &project)
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
BoolSetting SyncLockTracks
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Declare a class that handles managing of updates.
The AboutDialog shows the program version and developer credits.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
static AudioIOBase * Get()
This specialization of Setting for bool adds a Toggle method to negate the saved value.
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
AudacityProject & project
static void Show(bool show)
Shows the dialog.
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
static void Show(bool show=true)
Show or hide the unique logging window; create it on demand the first time it is shown.
Project snapping settings.
void SetSnapMode(SnapMode mode)
static ProjectSnap & Get(AudacityProject &project)
SnapMode GetSnapMode() const
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined */
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
static void DoHelpWelcome(AudacityProject &project)
wxBitmap & Bitmap(int iIndex)
Holds a msgid for the translation catalog; may also bind format arguments.
void GetUpdates(bool ignoreNetworkErrors, bool configurableNotification)
static UpdateManager & GetInstance()
virtual bool Flush() noexcept=0
virtual bool Read(const wxString &key, bool *value) const =0
std::unique_ptr< detail::IndirectItem< Item > > Indirect(const std::shared_ptr< Item > &ptr)
A convenience function.
std::shared_ptr< BaseItem > BaseItemSharedPtr
Common abstract base class for items that group other items.
Common abstract base class for items that are not groups.