aboutsummaryrefslogtreecommitdiff
path: root/src/MainWindow.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-31 10:26:40 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-31 10:26:40 +0100
commit1618113e61cce568e1efb091a8a600345fcf84ed (patch)
tree25bdce4f857adf6b86e5d9247a621c0d855b8ce7 /src/MainWindow.cpp
parent2b11848007873daca9c6f13ae4aaa6ca9c20f54e (diff)
Debug engine configuration
Diffstat (limited to 'src/MainWindow.cpp')
-rw-r--r--src/MainWindow.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 21e0a92..27eda12 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -122,7 +122,7 @@ void MainWindow::OnMenuItemClick(wxCommandEvent &event) {
if (item->GetId() == id) {
wxLogDebug("Selected %s", item->GetItemLabel());
EngineTab *et = new EngineTab((wxWindow *)notebook,
- item->GetItemLabel().ToStdString());
+ item->GetId()-100);
AddPage(et,et);
}
}
@@ -174,14 +174,15 @@ void MainWindow::OnRefreshEngineList(wxCommandEvent &event) {
// Refresh items
CONFIG_OPEN(conf);
conf->SetPath("engines/");
- wxString engine_name;
+ wxString engine_id;
long index;
- if (conf->GetFirstGroup(engine_name, index)) {
+ if (conf->GetFirstGroup(engine_id, index)) {
std::uint32_t id = 0;
do {
+ wxString engine_name=conf->Read(engine_id+"/name");
manageMenu->Append(100 + id, engine_name, "Configure " + engine_name);
id++;
- } while (conf->GetNextGroup(engine_name, index));
+ } while (conf->GetNextGroup(engine_id, index));
}
CONFIG_CLOSE(conf);
ApplyPreferences(); // Propagate informations to the tabs that require it