blob: 9b2f541eb6550ffcda1773eeda5d51395704b112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "BaseImportTab.hpp"
BaseImportTab::BaseImportTab(wxFrame *parent, TabInfos *main_tab):
TabBase_TabImport(parent), main_tab(main_tab)
{
glm=new GameListManager(game_list);
RefreshImportLists();
this->Bind(wxEVT_BUTTON, &BaseImportTab::OnLoad, this, ID_LOAD_BUTTON);
opened_db_list->SetHint("No other database open");
}
void BaseImportTab::RefreshImportLists(){
opened_game_list->Clear();
opened_db_list->Clear();
for (TabInfos *i : wxGetApp().ListTabInfos()) {
if (i->type == TabInfos::GAME) {
wxWindow *win = dynamic_cast<wxWindow *>(i);
opened_game_list->Append(win->GetLabel(),i);
opened_game_list->SetSelection(0);
}
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);
}
}
}
void BaseImportTab::OnLoad(wxCommandEvent &event){
wxLogDebug("Load!");
}
|