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 23 of file IncompatiblePluginsDialog.cpp.

30 : wxDialogWrapper(parent, id, XO("New Plugins"), pos, size, wxDEFAULT_DIALOG_STYLE, XO("New Plugins"))
31 , m_scanType(scanType)
32{
33 SetSize(635, 414);
34 auto layout = std::make_unique<wxBoxSizer>(wxVERTICAL);
35
36 layout->AddSpacer(40);
37
38 auto header = safenew wxStaticText(this, wxID_ANY, _("Incompatible plugin(s) found"));
39 header->SetFont(wxFont(wxFontInfo(12).Bold(true)));
40 layout->Add(header, 0, wxLEFT | wxRIGHT, 40);
41 layout->AddSpacer(10);
42
43 mText = safenew wxStaticText(this, wxID_ANY, wxEmptyString);
44 mText->SetFont(wxFont(wxFontInfo(10)));
45
46 layout->Add(mText, 0, wxLEFT | wxRIGHT, 40);
47 layout->AddSpacer(40);
48
49 mPluginList = safenew wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE | wxNO_BORDER);
50 layout->Add(mPluginList, 1, wxEXPAND | wxLEFT | wxRIGHT, 40);
51
52 auto buttonsLayout = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
53
55 {
56 auto pluginManagerButton = safenew wxButton(this, wxID_ANY, _("&Manage Plugins"));
57 pluginManagerButton->Bind(wxEVT_BUTTON, &IncompatiblePluginsDialog::OnPluginManagerClicked, this);
58 buttonsLayout->Add(pluginManagerButton);
59
60 buttonsLayout->AddSpacer(15);
61 }
62
63 auto continueButton = safenew wxButton(this, wxID_OK,
65 ? _("C&ontinue")
66 : _("&OK")
67 );
68 continueButton->SetDefault();
69 continueButton->SetFocusFromKbd();
70
71 buttonsLayout->Add(continueButton);
72 layout->Add(buttonsLayout.release(), 0, wxALIGN_RIGHT | wxALL, 15);
73
74 if(!plugins.empty())
75 SetPlugins(plugins);
76
77 SetSizer(layout.release());
78}
XO("Cut/Copy/Paste")
#define _(s)
Definition: Internat.h:75
#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 120 of file IncompatiblePluginsDialog.cpp.

121{
122 Close();
123}

◆ OnPluginManagerClicked()

void IncompatiblePluginsDialog::OnPluginManagerClicked ( wxCommandEvent &  )
private

Definition at line 109 of file IncompatiblePluginsDialog.cpp.

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

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 80 of file IncompatiblePluginsDialog.cpp.

81{
83 {
84 mText->SetLabelText(XO(
85 "Audacity has found %d incompatible plugins which could "\
86 "not be loaded. We have disabled these plugins to avoid any "\
87 "stalling or crashes. If you would still like to attempt "\
88 "to use these plugins, you can enable them using "\
89 "\"Manage Plugins\". Otherwise, select \"Continue\".")
90 .Format(static_cast<int>(plugins.size())).Translation());
91 }
92 else
93 {
94 mText->SetLabelText(XO(
95 "Audacity has found %d incompatible plugins which could "\
96 "not be loaded. We have disabled these plugins to avoid any "\
97 "stalling or crashes.")
98 .Format(static_cast<int>(plugins.size())).Translation());
99 }
100 mText->Wrap(GetClientSize().GetWidth() - 80);
101
102 wxString pluginListText;
103 for(const auto& path : plugins)
104 pluginListText += path + "\n";
105
106 mPluginList->SetValue(pluginListText);
107}
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: