Audacity  3.0.3
Functions
ErrorDialog.cpp File Reference
#include "ErrorDialog.h"
#include <wx/app.h>
#include <wx/button.h>
#include <wx/collpane.h>
#include <wx/icon.h>
#include <wx/dialog.h>
#include <wx/intl.h>
#include <wx/sizer.h>
#include <wx/statbmp.h>
#include <wx/stattext.h>
#include <wx/utils.h>
#include <wx/html/htmlwin.h>
#include <wx/settings.h>
#include <wx/statusbr.h>
#include <wx/artprov.h>
#include "../AllThemeResources.h"
#include "../ShuttleGui.h"
#include "../HelpText.h"
#include "../Prefs.h"
#include "HelpSystem.h"
Include dependency graph for ErrorDialog.cpp:

Go to the source code of this file.

Functions

void ShowErrorDialog (wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &message, const wxString &helpPage, const bool Close, const wxString &log)
 Displays an error dialog with a button that offers help. More...
 
void ShowModelessErrorDialog (wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &message, const wxString &helpPage, const bool Close, const wxString &log)
 Displays a modeless error dialog with a button that offers help. More...
 

Function Documentation

◆ ShowErrorDialog()

void ShowErrorDialog ( wxWindow *  parent,
const TranslatableString dlogTitle,
const TranslatableString message,
const wxString &  helpPage,
const bool  Close,
const wxString &  log 
)

Displays an error dialog with a button that offers help.

Definition at line 148 of file ErrorDialog.cpp.

154 {
155  ErrorDialog dlog(parent, dlogTitle, message, helpPage, log, Close);
156  dlog.CentreOnParent();
157  dlog.ShowModal();
158 }

Referenced by AudacityProject::AudacityProject(), MessageBoxException::DelayedHandlerAction(), ProjectAudioManager::DoRecord(), ProjectFileManager::DoSave(), TempDirectory::FATFilesystemDenied(), ProjectFileManager::Import(), ProjectFileManager::OpenNewProject(), ProjectAudioManager::PlayPlayRegion(), Effect::Preview(), ExportPCM::ReportTooBigError(), ProjectFileManager::SaveCopy(), ShowDiskFullExportErrorDialog(), ProjectFileIO::ShowError(), ShowExportErrorDialog(), AudioIO::StartMonitoring(), MenuManager::TellUserWhyDisallowed(), and TempDirectory::TempDir().

Here is the caller graph for this function:

◆ ShowModelessErrorDialog()

void ShowModelessErrorDialog ( wxWindow *  parent,
const TranslatableString dlogTitle,
const TranslatableString message,
const wxString &  helpPage,
const bool  Close,
const wxString &  log 
)

Displays a modeless error dialog with a button that offers help.

Definition at line 162 of file ErrorDialog.cpp.

168 {
169  // ensure it has some parent.
170  if( !parent )
171  parent = wxTheApp->GetTopWindow();
172  wxASSERT(parent);
173  ErrorDialog *dlog = safenew ErrorDialog(parent, dlogTitle, message, helpPage, log, Close, false);
174  dlog->CentreOnParent();
175  dlog->Show();
176  // ANSWER-ME: Vigilant Sentry flagged this method as not deleting dlog, so
177  // is this actually a mem leak.
178  // PRL: answer is that the parent window guarantees destruction of the dialog
179  // but in practice Destroy() in OnOK does that
180 }

References safenew.

ErrorDialog
Gives an Error message with an option for help.
Definition: ErrorDialog.h:25
safenew
#define safenew
Definition: MemoryX.h:8