Name the product Dreierpack Manager in the Modern interface

Window title, dialog heading, loading panel, save-file filter and the
footers of the news and Toto screens. The OBW format keeps its name.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 08:16:56 +01:00
1 parent 8370b5fe60
commit dcc572082a
7 files changed
+11 -11

No files matched your search

+2 -2
View File
@@ -69,11 +69,11 @@ bool App::engine_files_action(const std::string &action,Rml::Element *target) {
const auto row=*files_entry_;confirmation("Spielstand „"+row.name+"“ wirklich löschen?",[this,directory,file,row]{engine_files_start("Spielstand wird gelöscht …",[directory,file,row]{auto store=make_career_files(directory,file);store.remove(row.id,row.token);EngineFilesReply r;r.operation="deleted";r.selected=row.id;r.rows=store.list();r.feedback="Spielstand gelöscht.";return r;});});return true;
}
if(action=="files-import") {
auto input=config_.file_import;if(input.empty()){NFD::Guard guard;NFD::UniquePath selected;const nfdfilteritem_t filter[]={{"OpenBMH-Spielstand","obs"}};const auto result=NFD::OpenDialog(selected,filter,1);if(result==NFD_CANCEL)return true;if(result!=NFD_OKAY)throw editor::Error("Die Dateiauswahl konnte nicht geöffnet werden.");input=editor::path(selected.get());}
auto input=config_.file_import;if(input.empty()){NFD::Guard guard;NFD::UniquePath selected;const nfdfilteritem_t filter[]={{"Dreierpack-Spielstand","obs"}};const auto result=NFD::OpenDialog(selected,filter,1);if(result==NFD_CANCEL)return true;if(result!=NFD_OKAY)throw editor::Error("Die Dateiauswahl konnte nicht geöffnet werden.");input=editor::path(selected.get());}
engine_files_start("Spielstand wird importiert …",[directory,file,input]{auto store=make_career_files(directory,file);const auto imported=store.import_file(input);EngineFilesReply r;r.operation="imported";r.selected=imported.id;r.rows=store.list();r.feedback="Spielstand importiert. Die aktive Partie bleibt unverändert.";return r;});return true;
}
if(action=="files-export"&&files_entry_&&files_entry_->valid()) {
const auto row=*files_entry_;auto output=config_.file_export;if(output.empty()){NFD::Guard guard;NFD::UniquePath selected;const nfdfilteritem_t filter[]={{"OpenBMH-Spielstand","obs"}};const auto name=row.name+".obs";const auto result=NFD::SaveDialog(selected,filter,1,nullptr,name.c_str());if(result==NFD_CANCEL)return true;if(result!=NFD_OKAY)throw editor::Error("Die Dateiauswahl konnte nicht geöffnet werden.");output=editor::path(selected.get());}
const auto row=*files_entry_;auto output=config_.file_export;if(output.empty()){NFD::Guard guard;NFD::UniquePath selected;const nfdfilteritem_t filter[]={{"Dreierpack-Spielstand","obs"}};const auto name=row.name+".obs";const auto result=NFD::SaveDialog(selected,filter,1,nullptr,name.c_str());if(result==NFD_CANCEL)return true;if(result!=NFD_OKAY)throw editor::Error("Die Dateiauswahl konnte nicht geöffnet werden.");output=editor::path(selected.get());}
const auto copy=[this,directory,file,row,output]{engine_files_start("Spielstand wird exportiert …",[directory,file,row,output]{auto store=make_career_files(directory,file);store.export_file(row.id,row.token,output,fs::exists(output));EngineFilesReply r;r.operation="exported";r.selected=row.id;r.rows=store.list();r.feedback="Spielstand exportiert.";return r;});};if(fs::exists(output))confirmation("Vorhandene Exportdatei ersetzen?",copy);else copy();return true;
}
}catch(const std::exception &e){files_feedback_=e.what();refresh();}