MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / OnBrowserFormatButton

Method OnBrowserFormatButton

src/gui/browserpanel.cc:440–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438 }
439
440 void OnBrowserFormatButton(wxCommandEvent&) override
441 {
442 FormatDialog d(this, wxID_ANY);
443 d.volumeNameText->SetFocus();
444 d.buttons_OK->SetDefault();
445 if (d.ShowModal() != wxID_OK)
446 return;
447
448 auto volumeName = d.volumeNameText->GetValue().ToStdString();
449 auto quickFormat = d.quickFormatCheckBox->GetValue();
450 QueueJob(
451 [this, volumeName, quickFormat]()
452 {
453 _filesystem->discardChanges();
454 _filesystem->create(quickFormat, volumeName);
455
456 runOnUiThread(
457 [&]()
458 {
459 RepopulateBrowser();
460 });
461 });
462 }
463
464 void OnBrowserFilenameChanged(wxDataViewEvent& event) override
465 {

Callers

nothing calls this directly

Calls 4

GetValueMethod · 0.80
runOnUiThreadFunction · 0.70
discardChangesMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected