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"
22#include "../SplashDialog.h"
27#include "../prefs/PrefsDialog.h"
33#if defined(HAVE_UPDATES_CHECK)
60 void OnOk(wxCommandEvent &event);
61 void OnCancel(wxCommandEvent &event);
63 void OnFix(
const PrefSetter &setter, wxWindowID
id);
75#define FixButtonID 7001
76#define HelpButtonID 7011
80 EVT_BUTTON(wxID_CANCEL, QuickFixDialog::OnCancel)
85 wxDefaultPosition, wxDefaultSize,
86 wxDEFAULT_DIALOG_STYLE )
94 PopulateOrExchange(
S);
102 wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
118 .AddFixedText( Prompt );
122 .AddButton(
XXO(
"Fix") )
123 ->Bind( wxEVT_BUTTON, [
this, prefSetter,
id](wxCommandEvent&){
124 OnFix( prefSetter,
id );
131 b->SetToolTip(
_(
"Help") );
132 b->SetLabel(
_(
"Help"));
133 b->Bind( wxEVT_BUTTON, [
this, Help](
const wxCommandEvent&){
143 S.StartVerticalLay(1);
144 S.StartStatic(
XO(
"Quick Fixes"));
147 bool bStuckInMode = mbSyncLocked || mbInSnapTo || mbSoundActivated;
150 SetLabel(
XO(
"Nothing to do"));
151 S.AddFixedText(
XO(
"No quick, easily fixed problems were found"));
154 S.StartMultiColumn(3, wxALIGN_CENTER);
160 [pProject, &setting]{
174 auto pProject = &mProject;
175 AddStuck(
S, mbSyncLocked,
177 XO(
"Clocks on the Tracks"),
"Quick_Fix#sync_lock" );
178 AddStuck(
S, mbInSnapTo,
185 XO(
"Can't select precisely"),
"Quick_Fix#snap_to" );
186 AddStuck(
S, mbSoundActivated,
188 XO(
"Recording stops and starts"),
189 "Quick_Fix#sound_activated_recording" );
195 S.StartHorizontalLay(wxALIGN_CENTER_HORIZONTAL, 0);
197 S.EndHorizontalLay();
201 wxButton * pBtn = (wxButton*)FindWindowById( wxID_HELP );
203 pBtn->Bind( wxEVT_BUTTON, [
this](
const wxCommandEvent & ){
204 OnHelp(
"Quick_Fix#" );
208void QuickFixDialog::OnOk(wxCommandEvent &event)
214void QuickFixDialog::OnCancel(wxCommandEvent &event)
217 EndModal(wxID_CANCEL);
225void QuickFixDialog::OnFix(
const PrefSetter &setter, wxWindowID
id)
231 auto pBtn = FindWindow(
id);
233 pBtn->SetLabel(
_(
"Fixed") );
236 wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
274 wxString info = gAudioIO->GetDeviceInfo();
276 XO(
"Audio Device Info"),
wxT(
"deviceinfo.txt") );
284#if defined(HAS_CRASH_REPORT)
292 CrashReport::Generate(wxDebugReport::Context_Current);
299 unsigned *p =
nullptr;
324 enum :
unsigned { TAB = 3 };
327 wxString indentation;
329 auto Indent = [&](){ info += indentation; };
330 auto Return = [&](){ info +=
'\n'; };
335 [&](
const MenuItem &item,
const auto&) {
338 info += item.name.GET();
340 indentation = wxString{
' ', TAB * ++level };
346 info += item.name.GET();
350 [&](
const MenuItem &item,
const auto&) {
351 indentation = wxString{
' ', TAB * --level };
355 static const wxString separatorName{
'=', 20 };
357 info += separatorName;
364 Verbatim(
"Menu Tree"),
wxT(
"menutree.txt"),
true );
372#if defined(HAVE_UPDATES_CHECK)
384 wxCommandEvent evt{ wxEVT_MENU, wxID_ABOUT };
385 wxTheApp->AddPendingEvent( evt );
420 static auto menu = std::shared_ptr{
435 Menu(
wxT(
"Diagnostics"),
XXO(
"&Diagnostics"),
441 #
if defined(HAS_CRASH_REPORT)
442 Command(
wxT(
"CrashReport"),
XXO(
"&Generate Support Data..."),
466 wxT(
"FrameStatistics"),
Verbatim(
"Frame Statistics..."),
474 #
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.
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.
Common abstract base class for items that are not groups.