diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-26 12:30:07 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-26 12:30:07 +0100 |
| commit | e0a1894928abb8361f959a147066e94e2cda996b (patch) | |
| tree | 1ce31d0dda368d6b1c5527aa28d11543e620ee1e /src/base_tab/AppendGameDialog.cpp | |
| parent | 3b6e7d39cf2d03f2e43c249ece6da32f1f8030a7 (diff) | |
Improve database game import
Diffstat (limited to 'src/base_tab/AppendGameDialog.cpp')
| -rw-r--r-- | src/base_tab/AppendGameDialog.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/base_tab/AppendGameDialog.cpp b/src/base_tab/AppendGameDialog.cpp new file mode 100644 index 0000000..8a76028 --- /dev/null +++ b/src/base_tab/AppendGameDialog.cpp @@ -0,0 +1,28 @@ +#include "AppendGameDialog.hpp" +#include "MainWindow.hpp" +#include "ochess.hpp" + +AppendGameDialog::AppendGameDialog(wxWindow *parent, GameBase *base) + : AppendGameDialogBF(parent), base(base) { + + tinfos = MAINWIN->ListTabInfos(); + for (TabInfos *i : tinfos) { + wxWindow *win = dynamic_cast<wxWindow *>(i); + game_list->Append(win->GetLabel()); + } + + Bind(wxEVT_BUTTON, &AppendGameDialog::OnCancel, this, + ID_DIALOG_CANCEL_BUTTON); + Bind(wxEVT_BUTTON, &AppendGameDialog::OnImport, this, + ID_DIALOG_IMPORT_BUTTON); +} + +void AppendGameDialog::OnCancel(wxCommandEvent &event) { this->Close(); } + +void AppendGameDialog::OnImport(wxCommandEvent &event) { + std::vector<std::uint32_t> to_ignore; + std::vector<GameBase *> new_games_bases; + std::vector<Game *> new_games; + + this->Close(); +}
\ No newline at end of file |
