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

Method SaveConfig

src/gui/idlepanel.cc:399–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397 }
398
399 void SaveConfig()
400 {
401 if (_dontSaveConfig)
402 return;
403
404 _config.Write(
405 CONFIG_SELECTEDSOURCE, wxString(std::to_string(_selectedSource)));
406
407 /* Real disk block. */
408
409 _config.Write(CONFIG_DEVICE, wxString(_selectedDevice));
410 _config.Write(CONFIG_DRIVE, wxString(std::to_string(_selectedDrive)));
411 _config.Write(
412 CONFIG_HIGHDENSITY, wxString(std::to_string(_selectedHighDensity)));
413 for (auto it : drivetypes)
414 {
415 if (_selectedDriveType == it.second)
416 _config.Write(CONFIG_DRIVETYPE, wxString(it.first));
417 }
418
419 /* Flux image block. */
420
421 _config.Write(CONFIG_FLUXIMAGE, wxString(_selectedFluxFilename));
422 _config.Write(CONFIG_FLUXFORMAT, wxString(_selectedFluxFormatName));
423
424 /* Disk image block. */
425
426 _config.Write(CONFIG_DISKIMAGE, wxString(_selectedImagefilename));
427
428 /* Format block. */
429
430 _config.Write(CONFIG_FORMAT,
431 formatChoice->GetString(formatChoice->GetSelection()));
432 _config.Write(CONFIG_EXTRACONFIG, wxString(_extraConfiguration));
433
434 /* Format options. */
435
436 {
437 std::vector<std::string> options;
438 for (auto& e : _formatOptions)
439 options.push_back(fmt::format("{}:{}", e.first, e.second));
440
441 _config.Write(CONFIG_FORMATOPTIONS, wxString(join(options, ",")));
442 }
443 }
444
445 void UpdateSources()
446 {

Callers

nothing calls this directly

Calls 3

to_stringFunction · 0.85
joinFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected