17#include "../images/Help.xpm"
20#include <wx/bmpbuttn.h>
24 const wxString& appName,
25 const wxString& vendorName,
26 const wxString& localFilename,
27 const wxString& globalFilename,
31:
FileConfig{ appName, vendorName, localFilename, globalFilename, style, conv }
37 const wxString& appName,
38 const wxString& vendorName,
39 const wxString& localFilename,
40 const wxString& globalFilename,
46 auto result = std::unique_ptr<AudacityFileConfig>{
48 appName, vendorName, localFilename, globalFilename, style, conv } };
59 wxButton *retryButton;
63 S.StartVerticalLay(wxEXPAND, 1);
66 S.StartHorizontalLay(wxALIGN_RIGHT, 0);
69 XO(
"The following configuration file could not be accessed:\n\n"
71 "This could be caused by many reasons, but the most likely are that "
72 "the disk is full or you do not have write permissions to the file. "
73 "More information can be obtained by clicking the help button below.\n\n"
74 "You can attempt to correct the issue and then click \"Retry\" to continue.\n\n"
75 "If you choose to \"Quit Audacity\", your project may be left in an unsaved "
76 "state which will be recovered the next time you open it.")
84 S.StartHorizontalLay(wxALIGN_RIGHT, 0);
88 wxButton *b =
S.Id(wxID_HELP).AddBitmapButton(wxBitmap(Help_xpm));
89 b->SetToolTip(
XO(
"Help").Translation() );
90 b->SetLabel(
XO(
"Help").Translation());
92 b =
S.Id(wxID_CANCEL).AddButton(
XXO(
"&Quit Audacity"));
93 b =
S.Id(wxID_OK).AddButton(
XXO(
"&Retry"));
94 dlg.SetAffirmativeId(wxID_OK);
104 dlg.GetSizer()->Fit(&dlg);
105 dlg.SetMinSize(dlg.GetSize());
108 auto onButton = [&](wxCommandEvent &e)
110 dlg.EndModal(e.GetId());
113 dlg.Bind(wxEVT_BUTTON, onButton);
115 switch (dlg.ShowModal())
123 "Error:_Audacity_settings_file_unwritable");
131 dlg.Unbind(wxEVT_BUTTON, onButton);
XXO("&Cut/Copy/Paste Toolbar")
Our own specialisation of FileConfig.
static std::unique_ptr< AudacityFileConfig > Create(const wxString &appName={}, const wxString &vendorName={}, const wxString &localFilename={}, const wxString &globalFilename={}, long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE, const wxMBConv &conv=wxConvAuto())
Require a call to this factory, to guarantee proper two-phase initialization.
AudacityFileConfig(const wxString &appName, const wxString &vendorName, const wxString &localFilename, const wxString &globalFilename, long style, const wxMBConv &conv)
Disallow direct constructor call, because a two-phase initialization is required.
~AudacityFileConfig() override
const FilePath & GetFilePath() const
static const wxString HelpHostname
static const wxString HelpServerHomeDir
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
bool OpenInDefaultBrowser(const wxString &url)
Open an URL in default browser.