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

Method LoadConfig

src/gui/idlepanel.cc:304–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302
303private:
304 void LoadConfig()
305 {
306 /* Prevent saving the config half-way through reloading it when the
307 * widget states all change. */
308
309 _dontSaveConfig = true;
310
311 /* Radio button config. */
312
313 wxString s = std::to_string(SELECTEDSOURCE_IMAGE);
314 _config.Read(CONFIG_SELECTEDSOURCE, &s);
315 _selectedSource = std::atoi(s.c_str());
316
317 /* Real disk block. */
318
319 s = "";
320 _config.Read(CONFIG_DEVICE, &s);
321 _selectedDevice = s;
322
323 s = "0";
324 _config.Read(CONFIG_DRIVE, &s);
325 _selectedDrive = wxAtoi(s);
326
327 s = "0";
328 _config.Read(CONFIG_HIGHDENSITY, &s);
329 _selectedHighDensity = wxAtoi(s);
330
331 s = "";
332 _config.Read(CONFIG_DRIVETYPE, &s);
333 auto it = drivetypes.find(s.ToStdString());
334 if (it != drivetypes.end())
335 _selectedDriveType = it->second;
336 else
337 _selectedDriveType = drivetypes.begin()->second;
338
339 /* Flux image block. */
340
341 s = "";
342 _config.Read(CONFIG_FLUXIMAGE, &s);
343 _selectedFluxFilename = s;
344
345 s = "";
346 _config.Read(CONFIG_FLUXFORMAT, &s);
347 _selectedFluxFormatName = s;
348
349 /* Disk image block. */
350
351 s = "";
352 _config.Read(CONFIG_DISKIMAGE, &s);
353 _selectedImagefilename = s;
354
355 /* Format block. */
356
357 s = "ibm";
358 _config.Read(CONFIG_FORMAT, &s);
359
360 int defaultFormat = 0;
361 int i = 0;

Callers

nothing calls this directly

Calls 6

to_stringFunction · 0.85
splitFunction · 0.50
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected