Audacity 3.2.0
Public Member Functions | List of all members
UnwritableLocationErrorDialog Class Referencefinal

An error dialog about unwritable location, that allows to navigate to settings quickly. More...

#include <UnwritableLocationErrorDialog.h>

Inheritance diagram for UnwritableLocationErrorDialog:
[legend]
Collaboration diagram for UnwritableLocationErrorDialog:
[legend]

Public Member Functions

 UnwritableLocationErrorDialog (wxWindow *parent, const wxString &path)
 
virtual ~UnwritableLocationErrorDialog ()
 
void OnOk (wxCommandEvent &event)
 
void OnError (wxCommandEvent &event)
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Detailed Description

An error dialog about unwritable location, that allows to navigate to settings quickly.

Definition at line 17 of file UnwritableLocationErrorDialog.h.

Constructor & Destructor Documentation

◆ UnwritableLocationErrorDialog()

UnwritableLocationErrorDialog::UnwritableLocationErrorDialog ( wxWindow *  parent,
const wxString &  path 
)
explicit

Definition at line 24 of file UnwritableLocationErrorDialog.cpp.

26 parent, -1, XO("Error"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
27{
29
30 S.SetBorder(8);
31
32 S.StartVerticalLay();
33 {
34 S.AddSpace(0, 12);
35
36 S.StartHorizontalLay();
37 {
38 S.AddSpace(12, 0);
39
40 S.StartVerticalLay();
41 {
42 S.AddFixedText(
43 /* i18n-hint: %s is replaced with a directory path. */
44 XO("Unable to write files to directory: %s.").Format(path),
45 false, 500);
46
47 S.AddFixedText(
48 /* i18n-hint: This message describes the error in the Error dialog. */
49 XO("Please check that the directory exists, has the necessary permissions, and the drive isn't full."),
50 false, 0);
51
52 S.AddSpace(0, 8);
53
54 AccessibleLinksFormatter preferencesMessage(
55 /* i18n-hint: %s is replaced with 'Preferences > Directories'. */
56 XO("You can change the directory in %s."));
57
58 preferencesMessage.FormatLink(
59 /* i18n-hint: Hyperlink title that opens Preferences dialog on Directories page. */
60 wxT("%s"), XO("Preferences > Directories"), [parent, this]() {
61 EndModal(wxID_OK);
62
63 GlobalPrefsDialog dialog(parent, nullptr);
64
65 dialog.SelectPageByName(XO("Directories").Translation());
66 dialog.ShowModal();
67 });
68
69
70 preferencesMessage.Populate(S);
71 }
72 S.EndVerticalLay();
73
74 S.AddSpace(12, 0);
75 }
76 S.EndHorizontalLay();
77
78 S.AddSpace(0, 12);
79
80 S.AddStandardButtons(eHelpButton | eOkButton);
81 }
82 S.EndVerticalLay();
83
84 Layout();
85 Fit();
86 Center();
87}
wxT("CloseDown"))
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
@ eOkButton
Definition: ShuttleGui.h:609
@ eHelpButton
Definition: ShuttleGui.h:613
#define S(N)
Definition: ToChars.cpp:64
Abstract base class used in importing a file.
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640

References eHelpButton, eIsCreating, eOkButton, AccessibleLinksFormatter::FormatLink(), AccessibleLinksFormatter::Populate(), S, PrefsDialog::SelectPageByName(), PrefsDialog::ShowModal(), wxT(), and XO().

Here is the call graph for this function:

◆ ~UnwritableLocationErrorDialog()

UnwritableLocationErrorDialog::~UnwritableLocationErrorDialog ( )
virtual

Definition at line 89 of file UnwritableLocationErrorDialog.cpp.

90{
91
92}

Member Function Documentation

◆ OnError()

void UnwritableLocationErrorDialog::OnError ( wxCommandEvent &  event)

Definition at line 99 of file UnwritableLocationErrorDialog.cpp.

100{
101 HelpSystem::ShowHelp(this, "Error:_Disk_full_or_not_writable", false);
102}
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Definition: HelpSystem.cpp:231

References HelpSystem::ShowHelp().

Here is the call graph for this function:

◆ OnOk()

void UnwritableLocationErrorDialog::OnOk ( wxCommandEvent &  event)

Definition at line 94 of file UnwritableLocationErrorDialog.cpp.

95{
96 EndModal(wxID_OK);
97}

The documentation for this class was generated from the following files: