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"
19#include "../ProjectSelectionManager.h"
20#include "../ProjectWindows.h"
23#include "../SplashDialog.h"
26#include "../commands/CommandContext.h"
27#include "../commands/CommandManager.h"
28#include "../prefs/PrefsDialog.h"
34#if defined(HAVE_UPDATES_CHECK)
61 void OnOk(wxCommandEvent &event);
62 void OnCancel(wxCommandEvent &event);
64 void OnFix(
const PrefSetter &setter, wxWindowID
id);
76#define FixButtonID 7001
77#define HelpButtonID 7011
81 EVT_BUTTON(wxID_CANCEL, QuickFixDialog::OnCancel)
86 wxDefaultPosition, wxDefaultSize,
87 wxDEFAULT_DIALOG_STYLE )
97 PopulateOrExchange(
S);
105 wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
121 .AddFixedText( Prompt );
125 .AddButton(
XXO(
"Fix") )
126 ->Bind( wxEVT_BUTTON, [
this, prefSetter,
id](wxCommandEvent&){
127 OnFix( prefSetter,
id );
134 b->SetToolTip(
_(
"Help") );
135 b->SetLabel(
_(
"Help"));
136 b->Bind( wxEVT_BUTTON, [
this, Help](
const wxCommandEvent&){
146 S.StartVerticalLay(1);
147 S.StartStatic(
XO(
"Quick Fixes"));
150 bool bStuckInMode = mbSyncLocked || mbInSnapTo || mbSoundActivated;
153 SetLabel(
XO(
"Nothing to do"));
154 S.AddFixedText(
XO(
"No quick, easily fixed problems were found"));
157 S.StartMultiColumn(3, wxALIGN_CENTER);
163 [pProject, &setting]{
177 auto pProject = &mProject;
178 AddStuck(
S, mbSyncLocked,
180 XO(
"Clocks on the Tracks"),
"Quick_Fix#sync_lock" );
181 AddStuck(
S, mbInSnapTo,
183 gPrefs->Write(
"/SnapTo", 0 );
190 XO(
"Can't select precisely"),
"Quick_Fix#snap_to" );
191 AddStuck(
S, mbSoundActivated,
193 XO(
"Recording stops and starts"),
194 "Quick_Fix#sound_activated_recording" );
200 S.StartHorizontalLay(wxALIGN_CENTER_HORIZONTAL, 0);
202 S.EndHorizontalLay();
206 wxButton * pBtn = (wxButton*)FindWindowById( wxID_HELP );
208 pBtn->Bind( wxEVT_BUTTON, [
this](
const wxCommandEvent & ){
209 OnHelp(
"Quick_Fix#" );
213void QuickFixDialog::OnOk(wxCommandEvent &event)
219void QuickFixDialog::OnCancel(wxCommandEvent &event)
222 EndModal(wxID_CANCEL);
230void QuickFixDialog::OnFix(
const PrefSetter &setter, wxWindowID
id)
236 auto pBtn = FindWindow(
id);
238 pBtn->SetLabel(
_(
"Fixed") );
241 wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
254 auto &project = context.
project;
261 auto &project = context.
project;
269 auto &project = context.
project;
277 auto &project = context.
project;
279 wxString info = gAudioIO->GetDeviceInfo();
281 XO(
"Audio Device Info"),
wxT(
"deviceinfo.txt") );
289#if defined(HAS_CRASH_REPORT)
297 CrashReport::Generate(wxDebugReport::Context_Current);
304 unsigned *p =
nullptr;
328 auto &project = context.
project;
335 enum :
unsigned { TAB = 3 };
338 if (
dynamic_cast<MenuItem*
>( &item ) ) {
343 indentation = wxString{
' ', TAB * ++level };
349 if (
dynamic_cast<MenuItem*
>( &item ) )
350 indentation = wxString{
' ', TAB * --level };
363 static const wxString separatorName{
'=', 20 };
365 info += separatorName;
369 void Indent() { info += indentation; }
370 void Return() { info +=
'\n'; }
373 wxString indentation;
375 } visitor{ project };
380 Verbatim(
"Menu Tree"),
wxT(
"menutree.txt"),
true );
388#if defined(HAVE_UPDATES_CHECK)
400 wxCommandEvent evt{ wxEVT_MENU, wxID_ABOUT };
401 wxTheApp->AddPendingEvent( evt );
403 auto &project = context.
project;
420 OnCheckForUpdates(project);
440 #ifdef EXPERIMENTAL_DA
465 Menu(
wxT(
"Diagnostics"),
XXO(
"&Diagnostics"),
471 #
if defined(HAS_CRASH_REPORT)
472 Command(
wxT(
"CrashReport"),
XXO(
"&Generate Support Data..."),
496 wxT(
"FrameStatistics"),
Verbatim(
"Frame Statistics..."),
505 #
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)
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
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
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)
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
static void Show(bool show=true)
Show or hide the unique logging window; create it on demand the first time it is shown.
void AS_SetSnapTo(int snap) override
static ProjectSelectionManager & Get(AudacityProject &project)
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()
std::shared_ptr< BaseItem > BaseItemSharedPtr