Skip to content

Commit 9c2c6e5

Browse files
authored
Merge pull request #6107 from Vulpine05/Vulpine05_wxWidgets_deprecations
Refactor code related to wxWidgets deprecations
2 parents d4acba1 + 0ccb74e commit 9c2c6e5

25 files changed

+210
-210
lines changed

clientgui/AccountInfoPage.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2018 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717

1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "AccountInfoPage.h"
@@ -125,7 +125,7 @@ void CAccountInfoPage::CreateControls()
125125

126126
m_pTitleStaticCtrl = new wxStaticText;
127127
m_pTitleStaticCtrl->Create( itemWizardPage56, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
128-
m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
128+
m_pTitleStaticCtrl->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("Verdana")));
129129
itemBoxSizer57->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxGROW|wxALL, 5);
130130

131131
m_pAccountQuestionStaticCtrl = new wxStaticText;
@@ -190,7 +190,7 @@ void CAccountInfoPage::CreateControls()
190190

191191
m_pAccountPasswordRequirmentsStaticCtrl = new wxStaticText;
192192
m_pAccountPasswordRequirmentsStaticCtrl->Create( itemWizardPage56, ID_ACCOUNTREQUIREMENTSSTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
193-
m_pAccountPasswordRequirmentsStaticCtrl->SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE));
193+
m_pAccountPasswordRequirmentsStaticCtrl->SetFont(wxFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, FALSE));
194194
itemFlexGridSizer64->Add(m_pAccountPasswordRequirmentsStaticCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
195195

196196
m_pAccountManagerLinkLabelStaticCtrl = new wxStaticText;

clientgui/AccountManagerInfoPage.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2022 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717
//
1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "AccountManagerInfoPage.h"
@@ -128,7 +128,7 @@ void CAccountManagerInfoPage::CreateControls()
128128

129129
m_pTitleStaticCtrl = new wxStaticText;
130130
m_pTitleStaticCtrl->Create( itemWizardPage23, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
131-
m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
131+
m_pTitleStaticCtrl->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("Verdana")));
132132
itemBoxSizer24->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
133133

134134
m_pDescriptionStaticCtrl = new wxStaticText;
@@ -156,7 +156,7 @@ void CAccountManagerInfoPage::CreateControls()
156156
m_pProjectDetailsDescriptionCtrl = new wxTextCtrl( itemWizardPage23, ID_PROJECTDESCRIPTION, wxT(""), wxDefaultPosition, wxSize(descriptionWidth, 100), wxTE_MULTILINE|wxTE_READONLY );
157157
itemFlexGridSizer4->Add(m_pProjectDetailsDescriptionCtrl, 0, wxGROW);
158158

159-
m_pOpenWebSiteButton = new wxButton( this, ID_PROJECTWEBPAGECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
159+
m_pOpenWebSiteButton = new wxButton( this, ID_PROJECTWEBPAGECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
160160
itemFlexGridSizer4->Add(m_pOpenWebSiteButton, 0, wxALIGN_CENTER|wxTOP|wxBOTTOM, 5);
161161

162162
wxFlexGridSizer* itemFlexGridSizer11 = new wxFlexGridSizer(2, 1, 0, 0);

clientgui/AccountManagerProcessingPage.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2022 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717
//
1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "AccountManagerProcessingPage.h"
@@ -136,7 +136,7 @@ void CAccountManagerProcessingPage::CreateControls()
136136

137137
m_pTitleStaticCtrl = new wxStaticText;
138138
m_pTitleStaticCtrl->Create( itemWizardPage36, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
139-
m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
139+
m_pTitleStaticCtrl->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("Verdana")));
140140
itemBoxSizer37->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
141141

142142
m_pPleaseWaitStaticCtrl = new wxStaticText;
@@ -307,7 +307,7 @@ void CAccountManagerProcessingPage::OnStateChange( CAccountManagerProcessingPage
307307
SetProjectAttachSucceeded(false);
308308

309309
if ((ERR_NOT_FOUND == reply.error_num) ||
310-
(ERR_DB_NOT_FOUND == reply.error_num) ||
310+
(ERR_DB_NOT_FOUND == reply.error_num) ||
311311
(ERR_BAD_EMAIL_ADDR == reply.error_num) ||
312312
(ERR_BAD_PASSWD == reply.error_num)
313313
) {

clientgui/AccountManagerPropertiesPage.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2022 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717
//
1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "AccountManagerPropertiesPage.h"
@@ -143,7 +143,7 @@ void CAccountManagerPropertiesPage::CreateControls()
143143

144144
m_pTitleStaticCtrl = new wxStaticText;
145145
m_pTitleStaticCtrl->Create( itemWizardPage36, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
146-
m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
146+
m_pTitleStaticCtrl->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("Verdana")));
147147
itemBoxSizer37->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
148148

149149
m_pPleaseWaitStaticCtrl = new wxStaticText;

clientgui/AlreadyExistsPage.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2008 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717
//
1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "AlreadyExistsPage.h"
@@ -104,7 +104,7 @@ void CErrAlreadyExistsPage::CreateControls()
104104

105105
m_pTitleStaticCtrl = new wxStaticText;
106106
m_pTitleStaticCtrl->Create( itemWizardPage96, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
107-
m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
107+
m_pTitleStaticCtrl->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("Verdana")));
108108
itemBoxSizer97->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
109109

110110
itemBoxSizer97->Add(5, 5, 0, wxALIGN_LEFT|wxALL, 5);

clientgui/BOINCListCtrl.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2023 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717

1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "BOINCListCtrl.h"
@@ -60,7 +60,7 @@ BEGIN_EVENT_TABLE(CBOINCListCtrl, LISTCTRL_BASE)
6060
EVT_DRAW_PROGRESSBAR(CBOINCListCtrl::OnDrawProgressBar)
6161
#else
6262
#ifdef __WXMAC__
63-
EVT_SIZE(CBOINCListCtrl::OnSize) // In MacAccessibility.mm
63+
EVT_SIZE(CBOINCListCtrl::OnSize) // In MacAccessibility.mm
6464
#endif
6565
#endif
6666

@@ -589,7 +589,7 @@ void CBOINCListCtrl::DrawProgressBars()
589589
}
590590

591591
dc.SetLogicalFunction(wxCOPY);
592-
dc.SetBackgroundMode(wxSOLID);
592+
dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID);
593593
dc.SetPen(progressColor);
594594
dc.SetBrush(progressBrush);
595595
dc.DrawRectangle( rr );
@@ -612,7 +612,7 @@ void CBOINCListCtrl::DrawProgressBars()
612612
dc.DrawRectangle( rr );
613613

614614
dc.SetPen(*wxBLACK_PEN);
615-
dc.SetBackgroundMode(wxTRANSPARENT);
615+
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
616616
if (xx > (r.width - 7)) {
617617
dc.DrawText(progressString, r.x, r.y);
618618
} else {

clientgui/CompletionErrorPage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void CCompletionErrorPage::CreateControls()
107107

108108
m_pTitleStaticCtrl = new wxStaticText;
109109
m_pTitleStaticCtrl->Create( itemWizardPage85, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
110-
m_pTitleStaticCtrl->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
110+
m_pTitleStaticCtrl->SetFont(wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("Verdana")));
111111
itemBoxSizer86->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
112112

113113
itemBoxSizer86->Add(5, 5, 0, wxALIGN_LEFT|wxALL, 5);

clientgui/CompletionPage.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2008 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717
//
1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "CompletionPage.h"
@@ -107,12 +107,12 @@ void CCompletionPage::CreateControls()
107107

108108
m_pCompletionTitle = new wxStaticText;
109109
m_pCompletionTitle->Create( itemWizardPage79, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
110-
m_pCompletionTitle->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD, FALSE, wxT("Verdana")));
110+
m_pCompletionTitle->SetFont(wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("Verdana")));
111111
itemBoxSizer80->Add(m_pCompletionTitle, 0, wxALIGN_LEFT|wxALL, 5);
112112

113113
m_pCompletionWelcome = new wxStaticText;
114114
m_pCompletionWelcome->Create( itemWizardPage79, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
115-
m_pCompletionWelcome->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE));
115+
m_pCompletionWelcome->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE));
116116
itemBoxSizer80->Add(m_pCompletionWelcome, 0, wxALIGN_LEFT|wxALL, 5);
117117

118118
m_pCompletionBrandedMessage = new wxStaticText;

clientgui/DlgAbout.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2023 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717
//
1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "DlgAbout.h"
@@ -156,7 +156,7 @@ void CDlgAbout::CreateControls() {
156156

157157
m_AboutBOINCTitleCtrl = new wxStaticText;
158158
m_AboutBOINCTitleCtrl->Create( itemDialog1, wxID_STATIC, _("BOINC Manager"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
159-
m_AboutBOINCTitleCtrl->SetFont(wxFont(16, wxDEFAULT, wxNORMAL, wxBOLD, false, _T("")));
159+
m_AboutBOINCTitleCtrl->SetFont(wxFont(16, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("")));
160160
itemBoxSizer2->Add(m_AboutBOINCTitleCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
161161

162162
wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);

clientgui/NoInternetConnectionPage.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of BOINC.
2-
// http://boinc.berkeley.edu
3-
// Copyright (C) 2008 University of California
2+
// https://boinc.berkeley.edu
3+
// Copyright (C) 2025 University of California
44
//
55
// BOINC is free software; you can redistribute it and/or modify it
66
// under the terms of the GNU Lesser General Public License
@@ -13,7 +13,7 @@
1313
// See the GNU Lesser General Public License for more details.
1414
//
1515
// You should have received a copy of the GNU Lesser General Public License
16-
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
16+
// along with BOINC. If not, see <https://www.gnu.org/licenses/>.
1717
//
1818
#if defined(__GNUG__) && !defined(__APPLE__)
1919
#pragma implementation "NoInternetConnectionPage.h"
@@ -103,7 +103,7 @@ void CErrNoInternetConnectionPage::CreateControls()
103103

104104
m_pTitleStaticCtrl = new wxStaticText;
105105
m_pTitleStaticCtrl->Create( itemWizardPage96, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
106-
m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
106+
m_pTitleStaticCtrl->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, FALSE, _T("Verdana")));
107107
itemBoxSizer97->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
108108

109109
itemBoxSizer97->Add(5, 5, 0, wxALIGN_LEFT|wxALL, 5);

0 commit comments

Comments
 (0)