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

Method OnImportProgress

src/ProjectFileManager.cpp:1307–1321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1305 }
1306
1307 void OnImportProgress(double progress) override
1308 {
1309 constexpr double ProgressSteps { 1000.0 };
1310 if(!mProgressDialog)
1311 {
1312 wxFileName ff( mImportFileHandle->GetFilename() );
1313 auto title = XO("Importing %s").Format( mImportFileHandle->GetFileDescription() );
1314 mProgressDialog = BasicUI::MakeProgress(title, Verbatim(ff.GetFullName()));
1315 }
1316 auto result = mProgressDialog->Poll(progress * ProgressSteps, ProgressSteps);
1317 if(result == BasicUI::ProgressResult::Cancelled)
1318 mImportFileHandle->Cancel();
1319 else if(result == BasicUI::ProgressResult::Stopped)
1320 mImportFileHandle->Stop();
1321 }
1322
1323 void OnImportResult(ImportResult result) override
1324 {

Callers 8

ImportMethod · 0.45
ImportMethod · 0.45
ImportMethod · 0.45
ImportMethod · 0.45
ImportMethod · 0.45
write_callbackMethod · 0.45
ImportMethod · 0.45
ImportMethod · 0.45

Calls 8

VerbatimFunction · 0.85
GetFullNameMethod · 0.80
MakeProgressFunction · 0.50
GetFilenameMethod · 0.45
GetFileDescriptionMethod · 0.45
PollMethod · 0.45
CancelMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected