Audacity 3.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
IncompatiblePluginsDialog Class Referencefinal

#include <IncompatiblePluginsDialog.h>

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

Public Member Functions

 IncompatiblePluginsDialog (wxWindow *parent, wxWindowID id, ScanType scanType, const std::vector< wxString > &plugins={ }, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
 
void SetPlugins (const std::vector< wxString > &plugins)
 
- 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
 

Private Member Functions

void OnPluginManagerClicked (wxCommandEvent &)
 
void OnContinueClicked (wxCommandEvent &)
 

Private Attributes

wxStaticText * mText {nullptr}
 
wxTextCtrl * mPluginList {nullptr}
 
ScanType m_scanType
 

Detailed Description

Used to display a list of found plugins that aren't compatible with Audacity

Definition at line 28 of file IncompatiblePluginsDialog.h.

Constructor & Destructor Documentation

◆ IncompatiblePluginsDialog()

IncompatiblePluginsDialog::IncompatiblePluginsDialog ( wxWindow *  parent,
wxWindowID  id,
ScanType  scanType,
const std::vector< wxString > &  plugins = { },
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize 
)

Definition at line 22 of file IncompatiblePluginsDialog.cpp.

29 : wxDialogWrapper(parent, id, XO("New Plugins"), pos, size, wxDEFAULT_DIALOG_STYLE, XO("New Plugins"))
30 , m_scanType(scanType)
31{
32 SetSize(635, 414);
33 auto layout = std::make_unique<wxBoxSizer>(wxVERTICAL);
34
35 layout->AddSpacer(40);
36
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);
41
42 mText = safenew wxStaticText(this, wxID_ANY, wxEmptyString);
43 mText->SetFont(wxFont(wxFontInfo(10)));
44
45 layout->Add(mText, 0, wxLEFT | wxRIGHT, 40);
46 layout->AddSpacer(40);
47
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);
50
51 auto buttonsLayout = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
52
54 {
55 auto pluginManagerButton = safenew wxButton(this, wxID_ANY, _("&Manage Plugins"));
56 pluginManagerButton->Bind(wxEVT_BUTTON, &IncompatiblePluginsDialog::OnPluginManagerClicked, this);
57 buttonsLayout->Add(pluginManagerButton);
58
59 buttonsLayout->AddSpacer(15);
60 }
61
62 auto continueButton = safenew wxButton(this, wxID_OK,
64 ? _("C&ontinue")
65 : _("&OK")
66 );
67 continueButton->SetDefault();
68 continueButton->SetFocusFromKbd();
69
70 buttonsLayout->Add(continueButton);
71 layout->Add(buttonsLayout.release(), 0, wxALIGN_RIGHT | wxALL, 15);
72
73 if(!plugins.empty())
74 SetPlugins(plugins);
75
76 SetSizer(layout.release());
77}
XO("Cut/Copy/Paste")
#define _(s)
Definition: Internat.h:73
#define safenew
Definition: MemoryX.h:10
void OnPluginManagerClicked(wxCommandEvent &)
void SetPlugins(const std::vector< wxString > &plugins)

References _, m_scanType, mPluginList, mText, OnPluginManagerClicked(), safenew, SetPlugins(), and Startup.

Here is the call graph for this function:

Member Function Documentation

◆ OnContinueClicked()

void IncompatiblePluginsDialog::OnContinueClicked ( wxCommandEvent &  )
private

Definition at line 119 of file IncompatiblePluginsDialog.cpp.

120{
121 Close();
122}

◆ OnPluginManagerClicked()

void IncompatiblePluginsDialog::OnPluginManagerClicked ( wxCommandEvent &  )
private

Definition at line 108 of file IncompatiblePluginsDialog.cpp.

109{
110 Destroy();
112 {
113 PluginRegistrationDialog dlg(nullptr);
114 if(dlg.ShowModal() == wxID_OK)
116 });
117}
static void RebuildAllMenuBars()
void CallAfter(Action action)
Schedule an action to be done later, and in the main thread.
Definition: BasicUI.cpp:214

References BasicUI::CallAfter(), and MenuCreator::RebuildAllMenuBars().

Referenced by IncompatiblePluginsDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPlugins()

void IncompatiblePluginsDialog::SetPlugins ( const std::vector< wxString > &  plugins)

Definition at line 79 of file IncompatiblePluginsDialog.cpp.

80{
82 {
83 mText->SetLabelText(XO(
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());
90 }
91 else
92 {
93 mText->SetLabelText(XO(
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());
98 }
99 mText->Wrap(GetClientSize().GetWidth() - 80);
100
101 wxString pluginListText;
102 for(const auto& path : plugins)
103 pluginListText += path + "\n";
104
105 mPluginList->SetValue(pluginListText);
106}
Abstract base class used in importing a file.

References m_scanType, mPluginList, mText, Startup, and XO().

Referenced by IncompatiblePluginsDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_scanType

ScanType IncompatiblePluginsDialog::m_scanType
private

Definition at line 45 of file IncompatiblePluginsDialog.h.

Referenced by IncompatiblePluginsDialog(), and SetPlugins().

◆ mPluginList

wxTextCtrl* IncompatiblePluginsDialog::mPluginList {nullptr}
private

Definition at line 31 of file IncompatiblePluginsDialog.h.

Referenced by IncompatiblePluginsDialog(), and SetPlugins().

◆ mText

wxStaticText* IncompatiblePluginsDialog::mText {nullptr}
private

Definition at line 30 of file IncompatiblePluginsDialog.h.

Referenced by IncompatiblePluginsDialog(), and SetPlugins().


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