13#include <wx/stattext.h>
14#include <wx/textctrl.h>
26 const std::vector<wxString>& plugins,
30 , m_scanType(scanType)
33 auto layout = std::make_unique<wxBoxSizer>(wxVERTICAL);
35 layout->AddSpacer(40);
37 auto header =
safenew wxStaticText(
this, wxID_ANY,
_(
"Incompatible plugin(s) found"));
38 header->SetFont(wxFont(wxFontInfo(12).Bold(
true)));
39 layout->Add(header, 0, wxLEFT | wxRIGHT, 40);
40 layout->AddSpacer(10);
42 mText =
safenew wxStaticText(
this, wxID_ANY, wxEmptyString);
43 mText->SetFont(wxFont(wxFontInfo(10)));
45 layout->Add(
mText, 0, wxLEFT | wxRIGHT, 40);
46 layout->AddSpacer(40);
48 mPluginList =
safenew wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE | wxNO_BORDER);
49 layout->Add(
mPluginList, 1, wxEXPAND | wxLEFT | wxRIGHT, 40);
51 auto buttonsLayout = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
55 auto pluginManagerButton =
safenew wxButton(
this, wxID_ANY,
_(
"&Manage Plugins"));
57 buttonsLayout->Add(pluginManagerButton);
59 buttonsLayout->AddSpacer(15);
62 auto continueButton =
safenew wxButton(
this, wxID_OK,
67 continueButton->SetDefault();
68 continueButton->SetFocusFromKbd();
70 buttonsLayout->Add(continueButton);
71 layout->Add(buttonsLayout.release(), 0, wxALIGN_RIGHT | wxALL, 15);
76 SetSizer(layout.release());
84 "Audacity has found %d incompatible plugins which could "\
85 "not be loaded. We have disabled these plugins to avoid any "\
86 "stalling or crashes. If you would still like to attempt "\
87 "to use these plugins, you can enable them using "\
88 "\"Manage Plugins\". Otherwise, select \"Continue\".")
89 .
Format(
static_cast<int>(plugins.size())).Translation());
94 "Audacity has found %d incompatible plugins which could "\
95 "not be loaded. We have disabled these plugins to avoid any "\
96 "stalling or crashes.")
97 .
Format(
static_cast<int>(plugins.size())).Translation());
99 mText->Wrap(GetClientSize().GetWidth() - 80);
101 wxString pluginListText;
102 for(
const auto& path : plugins)
103 pluginListText += path +
"\n";
114 if(dlg.ShowModal() == wxID_OK)
Toolkit-neutral facade for basic user interface services.
void OnContinueClicked(wxCommandEvent &)
void OnPluginManagerClicked(wxCommandEvent &)
void SetPlugins(const std::vector< wxString > &plugins)
IncompatiblePluginsDialog(wxWindow *parent, wxWindowID id, ScanType scanType, const std::vector< wxString > &plugins={ }, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
void CallAfter(Action action)
Schedule an action to be done later, and in the main thread.