MCPcopy Create free account
hub / github.com/audacity/audacity / Run

Method Run

src/PluginStartupRegistration.cpp:210–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void PluginStartupRegistration::Run(std::chrono::seconds timeout)
211{
212 PluginScanDialog dialog(nullptr, wxID_ANY, XO("Searching for plugins"));
213 wxTimer timeoutTimer(&dialog, OnPluginScanTimeout);
214 mScanDialog = &dialog;
215 mTimeoutTimer = &timeoutTimer;
216 mTimeout = timeout;
217
218 dialog.Bind(wxEVT_BUTTON, [this](wxCommandEvent& evt) {
219 evt.Skip();
220 if(evt.GetId() == wxID_IGNORE)
221 Skip();
222 });
223 dialog.Bind(wxEVT_TIMER, [this](wxTimerEvent& evt) {
224 if(evt.GetId() == OnPluginScanTimeout)
225 {
226 if(mValidator && mValidator->InactiveSince() < mRequestStartTime)
227 Skip();
228 //else
229 // wxMessageBox("Please check for plugin popups!");
230 }
231 else
232 evt.Skip();
233 });
234 dialog.Bind(wxEVT_CLOSE_WINDOW, [this](wxCloseEvent& evt) {
235 evt.Skip();
236 mValidator.reset();
237 PluginManager::Get().Save();
238 PluginManager::Get().NotifyPluginsChanged();
239 });
240
241 dialog.CenterOnScreen();
242 ProcessNext();
243 dialog.ShowModal();
244}
245
246void PluginStartupRegistration::Stop()
247{

Callers

nothing calls this directly

Calls 9

GetFunction · 0.85
BindMethod · 0.80
SkipMethod · 0.80
GetIdMethod · 0.80
NotifyPluginsChangedMethod · 0.80
InactiveSinceMethod · 0.45
resetMethod · 0.45
SaveMethod · 0.45
ShowModalMethod · 0.45

Tested by

no test coverage detected