Minor tweaks and code clean up (#357)

This commit is contained in:
Exzap 2022-10-11 09:17:34 +02:00 committed by GitHub
parent b07e9efba4
commit 2b9edced81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 105 additions and 130 deletions

View file

@ -605,14 +605,12 @@ wxPanel* GeneralSettings2::AddAccountPage(wxNotebook* notebook)
content->Add(m_delete_account, 0, wxEXPAND | wxALL | wxALIGN_RIGHT, 5);
m_delete_account->Bind(wxEVT_BUTTON, &GeneralSettings2::OnAccountDelete, this);
if (NetworkConfig::XMLExists()) {
wxString choices[] = { _("Nintendo"), _("Pretendo"), _("Custom") };
m_active_service= new wxRadioBox(online_panel, wxID_ANY, _("Network Service"), wxDefaultPosition, wxDefaultSize, std::size(choices), choices, 3, wxRA_SPECIFY_COLS);
}
else {
wxString choices[] = { _("Nintendo"), _("Pretendo") };
m_active_service= new wxRadioBox(online_panel, wxID_ANY, _("Network Service"), wxDefaultPosition, wxDefaultSize, std::size(choices), choices, 2, wxRA_SPECIFY_COLS);
}
wxString choices[] = { _("Nintendo"), _("Pretendo"), _("Custom") };
m_active_service = new wxRadioBox(online_panel, wxID_ANY, _("Network Service"), wxDefaultPosition, wxDefaultSize, std::size(choices), choices, 3, wxRA_SPECIFY_COLS);
if (!NetworkConfig::XMLExists())
m_active_service->Enable(2, false);
m_active_service->SetToolTip(_("Connect to which Network Service"));
m_active_service->Bind(wxEVT_RADIOBOX, &GeneralSettings2::OnAccountServiceChanged,this);
content->Add(m_active_service, 0, wxEXPAND | wxALL, 5);