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;

View file

@ -5552,68 +5552,7 @@
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg">wxSYS_COLOUR_WINDOW</property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">No pending imports</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">pending_imports</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@ -5644,11 +5583,12 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline41</property>
<property name="name">pending_imports</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -5658,10 +5598,15 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="style">wxTE_READONLY</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value">No pending imports</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>