Update import

This commit is contained in:
Loic Guegan 2022-12-26 16:32:54 +01:00
parent 3263bda23b
commit 5a4ec5d1e8
4 changed files with 14 additions and 75 deletions

View file

@ -27,10 +27,11 @@ void BaseImportTab::OnImportDatabase(wxCommandEvent &event){
void BaseImportTab::RefreshPendingImports(){
int ngames=games_to_import.size();
int ndb=databases_to_import.size();
pending_imports->Clear();
if(ngames+ndb>0){
pending_imports->SetLabel(" Pending imports: "+std::to_string(ngames)+" games and "+std::to_string(ndb)+" databases");
pending_imports->AppendText(" Pending imports: "+std::to_string(ngames)+" games and "+std::to_string(ndb)+" databases");
}else
pending_imports->SetLabel("");
pending_imports->SetHint("No pending imports");
}
void BaseImportTab::RefreshImportLists(){

View file

@ -565,15 +565,9 @@ TabBase_TabImport::TabBase_TabImport( wxWindow* parent, wxWindowID id, const wxP
wxBoxSizer* main_sizer;
main_sizer = new wxBoxSizer( wxVERTICAL );
pending_imports = new wxStaticText( this, wxID_ANY, wxT("No pending imports"), wxDefaultPosition, wxDefaultSize, 0 );
pending_imports->Wrap( -1 );
pending_imports->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
pending_imports = new wxTextCtrl( this, wxID_ANY, wxT("No pending imports"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
main_sizer->Add( pending_imports, 0, wxALL|wxEXPAND, 5 );
m_staticline41 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
main_sizer->Add( m_staticline41, 0, wxEXPAND | wxALL, 5 );
wxBoxSizer* games_sizer;
games_sizer = new wxBoxSizer( wxHORIZONTAL );

View file

@ -334,8 +334,7 @@ class TabBase_TabImport : public wxPanel
private:
protected:
wxStaticText* pending_imports;
wxStaticLine* m_staticline41;
wxTextCtrl* pending_imports;
wxStaticText* from_game_label;
wxComboBox* opened_game_list;
wxButton* import_from_game_button;