* Save all WindowDesc settings to _windows_file. */
| 174 | * Save all WindowDesc settings to _windows_file. |
| 175 | */ |
| 176 | void WindowDesc::SaveToConfig() |
| 177 | { |
| 178 | /* Sort the stuff to get a nice ini file on first write */ |
| 179 | std::sort(_window_descs->begin(), _window_descs->end(), DescSorter); |
| 180 | |
| 181 | IniFile ini; |
| 182 | ini.LoadFromDisk(_windows_file, NO_DIRECTORY); |
| 183 | for (WindowDesc *wd : *_window_descs) { |
| 184 | if (wd->ini_key.empty()) continue; |
| 185 | IniSaveWindowSettings(ini, wd->ini_key, wd); |
| 186 | } |
| 187 | ini.SaveToDisk(_windows_file); |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * Read default values from WindowDesc configuration an apply them to the window. |
nothing calls this directly
no test coverage detected