ochess/src/base_tab/BaseImportTab.cpp

23 lines
667 B
C++
Raw Normal View History

2022-12-23 16:49:33 +01:00
#include "BaseImportTab.hpp"
2022-12-25 14:32:06 +01:00
BaseImportTab::BaseImportTab(wxFrame *parent, TabInfos *main_tab):
TabBase_TabImport(parent), main_tab(main_tab)
2022-12-23 16:49:33 +01:00
{
2022-12-25 14:32:06 +01:00
RefreshImportLists();
}
void BaseImportTab::RefreshImportLists(){
2022-12-25 11:13:05 +01:00
for (TabInfos *i : wxGetApp().ListTabInfos()) {
2022-12-25 14:32:06 +01:00
if (i->type == TabInfos::GAME) {
2022-12-25 11:13:05 +01:00
wxWindow *win = dynamic_cast<wxWindow *>(i);
opened_game_list->Append(win->GetLabel(),i);
opened_game_list->SetSelection(0);
}
2022-12-25 14:32:06 +01:00
else if (i->type == TabInfos::BASE && i->id != main_tab->id) {
wxWindow *win = dynamic_cast<wxWindow *>(i);
opened_db_list->Append(win->GetLabel(),i);
opened_db_list->SetSelection(0);
}
2022-12-25 11:13:05 +01:00
}
2022-12-23 16:49:33 +01:00
}