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 "../ProjectWindows.h"
26#include "../prefs/PrefsDialog.h"
32#if defined(HAVE_UPDATES_CHECK)
59 void OnOk(wxCommandEvent &event);
60 void OnCancel(wxCommandEvent &event);
62 void OnFix(
const PrefSetter &setter, wxWindowID
id);
74#define FixButtonID 7001
75#define HelpButtonID 7011
79 EVT_BUTTON(wxID_CANCEL, QuickFixDialog::OnCancel)
84 wxDefaultPosition, wxDefaultSize,
85 wxDEFAULT_DIALOG_STYLE )
93 PopulateOrExchange(
S);
101 wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
117 .AddFixedText( Prompt );
121 .AddButton(
XXO(
"Fix") )
122 ->Bind( wxEVT_BUTTON, [
this, prefSetter,
id](wxCommandEvent&){
123 OnFix( prefSetter,
id );
130 b->SetToolTip(
_(
"Help") );
131 b->SetLabel(
_(
"Help"));
132 b->Bind( wxEVT_BUTTON, [
this, Help](
const wxCommandEvent&){
142 S.StartVerticalLay(1);
143 S.StartStatic(
XO(
"Quick Fixes"));
146 bool bStuckInMode = mbSyncLocked || mbInSnapTo || mbSoundActivated;
149 SetLabel(
XO(
"Nothing to do"));
150 S.AddFixedText(
XO(
"No quick, easily fixed problems were found"));
153 S.StartMultiColumn(3, wxALIGN_CENTER);
159 [pProject, &setting]{
173 auto pProject = &mProject;
174 AddStuck(
S, mbSyncLocked,
176 XO(
"Clocks on the Tracks"),
"Quick_Fix#sync_lock" );
177 AddStuck(
S, mbInSnapTo,
184 XO(
"Can't select precisely"),
"Quick_Fix#snap_to" );
185 AddStuck(
S, mbSoundActivated,
187 XO(
"Recording stops and starts"),
188 "Quick_Fix#sound_activated_recording" );
194 S.StartHorizontalLay(wxALIGN_CENTER_HORIZONTAL, 0);
196 S.EndHorizontalLay();
200 wxButton * pBtn = (wxButton*)FindWindowById( wxID_HELP );
202 pBtn->Bind( wxEVT_BUTTON, [
this](
const wxCommandEvent & ){
203 OnHelp(
"Quick_Fix#" );
207void QuickFixDialog::OnOk(wxCommandEvent &event)
213void QuickFixDialog::OnCancel(wxCommandEvent &event)
216 EndModal(wxID_CANCEL);
224void QuickFixDialog::OnFix(
const PrefSetter &setter, wxWindowID
id)
230 auto pBtn = FindWindow(
id);
232 pBtn->SetLabel(
_(
"Fixed") );
235 wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
273 wxString info = gAudioIO->GetDeviceInfo();
275 XO(
"Audio Device Info"),
wxT(
"deviceinfo.txt") );
283#if defined(HAS_CRASH_REPORT)
291 CrashReport::Generate(wxDebugReport::Context_Current);
298 unsigned *p =
nullptr;
323 enum :
unsigned { TAB = 3 };
326 wxString indentation;
328 auto Indent = [&](){ info += indentation; };
329 auto Return = [&](){ info +=
'\n'; };
334 [&](
const MenuItem &item,
const auto&) {
337 info += item.name.GET();
339 indentation = wxString{
' ', TAB * ++level };
345 info += item.name.GET();
349 [&](
const MenuItem &item,
const auto&) {
350 indentation = wxString{
' ', TAB * --level };
354 static const wxString separatorName{
'=', 20 };
356 info += separatorName;
363 Verbatim(
"Menu Tree"),
wxT(
"menutree.txt"),
true );
371#if defined(HAVE_UPDATES_CHECK)
383 wxCommandEvent evt{ wxEVT_MENU, wxID_ABOUT };
384 wxTheApp->AddPendingEvent( evt );
414 static auto menu = std::shared_ptr{
429 Menu(
wxT(
"Diagnostics"),
XXO(
"&Diagnostics"),
435 #
if defined(HAS_CRASH_REPORT)
436 Command(
wxT(
"CrashReport"),
XXO(
"&Generate Support Data..."),
460 wxT(
"FrameStatistics"),
Verbatim(
"Frame Statistics..."),
468 #
if 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
Generates classes whose instances register items at construction.
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.
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.
Common abstract base class for items that are not groups.