From 5aac02dddfe932cafca52bc61dfdf12242cf4853 Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Fri, 11 Jul 2025 08:38:11 -0400 Subject: [PATCH] Fix minor typos in comments Closes #25629. --- src/aui/auibook.cpp | 4 ++-- src/aui/tabmdi.cpp | 4 ++-- src/common/affinematrix2d.cpp | 2 +- src/common/filename.cpp | 4 ++-- src/common/image.cpp | 2 +- src/common/statbar.cpp | 2 +- src/common/utilscmn.cpp | 2 +- src/common/webrequest_curl.cpp | 2 +- src/dfb/dc.cpp | 4 ++-- src/generic/buttonbar.cpp | 2 +- src/generic/dbgrptg.cpp | 2 +- src/generic/treebkg.cpp | 2 +- src/msw/bitmap.cpp | 4 ++-- src/msw/brush.cpp | 2 +- src/msw/dc.cpp | 2 +- src/msw/dlmsw.cpp | 4 ++-- src/msw/fontenum.cpp | 2 +- src/msw/gdiimage.cpp | 2 +- src/msw/graphics.cpp | 4 ++-- src/msw/listbox.cpp | 2 +- src/msw/notebook.cpp | 10 +++++----- src/msw/ole/droptgt.cpp | 2 +- src/msw/spinctrl.cpp | 4 ++-- src/msw/toolbar.cpp | 2 +- src/msw/utilsexc.cpp | 2 +- src/msw/volume.cpp | 2 +- src/osx/core/hid.cpp | 2 +- src/richtext/richtextprint.cpp | 2 +- src/univ/menu.cpp | 2 +- src/unix/mediactrl.cpp | 2 +- 30 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 58605c49c8..4ec6f2406f 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -1870,7 +1870,7 @@ public: ~wxAuiTabFrame() { // use pending delete because sometimes during - // window closing, refreshs are pending + // window closing, refreshes are pending if (!wxPendingDelete.Member(m_tabs)) wxPendingDelete.Append(m_tabs); } @@ -4074,7 +4074,7 @@ public: unsigned char m_dir; /* - As the caulculation is done from the inner to the outermost pane, the + As the calculation is done from the inner to the outermost pane, the panes are sorted in the following order: layer, direction, row, position. */ diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index f396ab86ba..b91016e662 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -458,12 +458,12 @@ wxAuiMDIChildFrame::wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent, { Init(); - // There are two ways to create an tabbed mdi child fram without + // There are two ways to create a tabbed mdi child frame without // making it the active document. Either Show(false) can be called // before Create() (as is customary on some ports with wxFrame-type // windows), or wxMINIMIZE can be passed in the style flags. Note that // wxAuiMDIChildFrame is not really derived from wxFrame, as wxMDIChildFrame - // is, but those are the expected symantics. No style flag is passed + // is, but those are the expected semantics. No style flag is passed // onto the panel underneath. if (style & wxMINIMIZE) m_activateOnCreate = false; diff --git a/src/common/affinematrix2d.cpp b/src/common/affinematrix2d.cpp index 1b663e4f30..84d2132120 100644 --- a/src/common/affinematrix2d.cpp +++ b/src/common/affinematrix2d.cpp @@ -26,7 +26,7 @@ void wxAffineMatrix2D::Set(const wxMatrix2D &mat2D, const wxPoint2DDouble &tr) m_ty = tr.m_y; } -// gets the component valuess of the matrix +// gets the component values of the matrix void wxAffineMatrix2D::Get(wxMatrix2D *mat2D, wxPoint2DDouble *tr) const { mat2D->m_11 = m_11; diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 9714d69fdd..f41ea2470e 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -169,7 +169,7 @@ public: : FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | // sharing mode FILE_SHARE_WRITE, // (allow everything) - nullptr, // no secutity attr + nullptr, // no security attr OPEN_EXISTING, // creation disposition flags, // flags nullptr // no template file @@ -923,7 +923,7 @@ static wxString wxCreateTempImpl( } else { - // easier if it alwasys points to something + // easier if it always points to something deleteOnClose = &wantDeleteOnClose; } diff --git a/src/common/image.cpp b/src/common/image.cpp index a456c5a5fe..799afa28c5 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -1065,7 +1065,7 @@ wxImage wxImage::ResampleBicubic(int width, int height) const const double pixel_weight = vPrecalc.weight[k + 1] * hPrecalc.weight[i + 1]; - // Create a sum of all velues for each color channel + // Create a sum of all values for each color channel // adjusted for the pixel's calculated weight if ( src_alpha ) { diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index 50345fc943..c81dabe257 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -194,7 +194,7 @@ wxArrayInt wxStatusBarBase::CalculateAbsWidths(wxCoord widthTotal) const for ( size_t i = m_panes.size(); i > 0; i-- ) { - // divide the unassigned width evently between the + // divide the unassigned width evenly between the // not yet processed fields: int w = widthToUse / i; widths.Add(w); diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 9001d58337..f75150161c 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -1320,7 +1320,7 @@ wxFindMenuItemId(wxFrame *frame, } // Try to find the deepest child that contains 'pt'. -// We go backwards, to try to allow for controls that are spacially +// We go backwards, to try to allow for controls that are spatially // within other controls, but are still siblings (e.g. buttons within // static boxes). Static boxes are likely to be created _before_ controls // that sit inside them. diff --git a/src/common/webrequest_curl.cpp b/src/common/webrequest_curl.cpp index 7d148ccfce..8b3f49b689 100644 --- a/src/common/webrequest_curl.cpp +++ b/src/common/webrequest_curl.cpp @@ -787,7 +787,7 @@ LRESULT CALLBACK WinSock1SocketPoller::MsgProc(WXHWND hwnd, WXUINT uMsg, if ( uMsg == SOCKET_MESSAGE ) { - // Extract the result any any errors from lParam. + // Extract the result and any errors from lParam. int winResult = LOWORD(lParam); int error = HIWORD(lParam); diff --git a/src/dfb/dc.cpp b/src/dfb/dc.cpp index 0d5b7cc217..5450c91b1e 100644 --- a/src/dfb/dc.cpp +++ b/src/dfb/dc.cpp @@ -479,7 +479,7 @@ wxCoord wxDFBDCImpl::GetCharWidth() const int w = -1; GetCurrentFont()->GetStringWidth("H", 1, &w); - // VS: YDEV is corrent, it should *not* be XDEV, because font's are only + // VS: YDEV is correct, it should *not* be XDEV, because fonts are only // scaled according to m_scaleY return YDEV2LOGREL(w); } @@ -505,7 +505,7 @@ void wxDFBDCImpl::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y if ( f->GetStringExtents(string.utf8_str(), -1, &rect, nullptr) ) { - // VS: YDEV is corrent, it should *not* be XDEV, because font's are + // VS: YDEV is correct, it should *not* be XDEV, because fonts are // only scaled according to m_scaleY xx = YDEV2LOGREL(rect.w); yy = YDEV2LOGREL(rect.h); diff --git a/src/generic/buttonbar.cpp b/src/generic/buttonbar.cpp index d4d46b180a..98ae209c42 100644 --- a/src/generic/buttonbar.cpp +++ b/src/generic/buttonbar.cpp @@ -413,7 +413,7 @@ void wxButtonToolBar::DoLayout() dc.GetTextExtent(tool->GetShortHelp(), & tw, & th); // If the label is bigger than the icon, the label width - // becomes the new tool width, and we need to centre the + // becomes the new tool width, and we need to centre // the bitmap in this box. if (tw > sz.x) { diff --git a/src/generic/dbgrptg.cpp b/src/generic/dbgrptg.cpp index f55df99131..9e1538707b 100644 --- a/src/generic/dbgrptg.cpp +++ b/src/generic/dbgrptg.cpp @@ -126,7 +126,7 @@ class wxDumpOpenExternalDlg : public wxDialog public: wxDumpOpenExternalDlg(wxWindow *parent, const wxFileName& filename); - // return the command chosed by user to open this file + // return the command chosen by user to open this file const wxString& GetCommand() const { return m_command; } wxString m_command; diff --git a/src/generic/treebkg.cpp b/src/generic/treebkg.cpp index 649f56b38c..3e4a4692da 100644 --- a/src/generic/treebkg.cpp +++ b/src/generic/treebkg.cpp @@ -640,7 +640,7 @@ int wxTreebook::HitTest(wxPoint const & pt, long * flags) const if ( flags ) *flags = wxBK_HITTEST_NOWHERE; - // convert from wxTreebook coorindates to wxTreeCtrl ones + // convert from wxTreebook coordinates to wxTreeCtrl ones const wxTreeCtrl * const tree = GetTreeCtrl(); const wxPoint treePt = tree->ScreenToClient(ClientToScreen(pt)); diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index bf9ba72afa..44bb897995 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -473,7 +473,7 @@ static bool CheckAlpha(HBITMAP hbmp, HBITMAP* hdib = nullptr) // explicitly. static HBITMAP CreatePremultipliedDIBIfNeeded(HBITMAP hbmp) { - // Check if 32-bit bitmap realy has premultiplied RGB data + // Check if 32-bit bitmap really has premultiplied RGB data // and premuliply it if necessary. BITMAP bm; @@ -557,7 +557,7 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon, wxLogLastError(wxT("wxBitmap::CopyFromIconOrCursor - BitBlt")); } // Prepare the AND mask to be compatible with wxBitmap mask - // by seting its bits to 0 wherever XOR mask (image) bits are set to 1. + // by setting its bits to 0 wherever XOR mask (image) bits are set to 1. // This is done in-place by applying the following ROP: // dest = dest AND (NOT src) where dest=AND mask, src=XOR mask // diff --git a/src/msw/brush.cpp b/src/msw/brush.cpp index 196742cc42..e5c6e10095 100644 --- a/src/msw/brush.cpp +++ b/src/msw/brush.cpp @@ -111,7 +111,7 @@ wxBrushRefData::~wxBrushRefData() } // ---------------------------------------------------------------------------- -// wxBrushRefData accesors +// wxBrushRefData accessors // ---------------------------------------------------------------------------- bool wxBrushRefData::operator==(const wxBrushRefData& data) const diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index fffe1d1dd7..1d774daeb0 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -1218,7 +1218,7 @@ void wxMSWDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool bool ok = false; #if wxUSE_SYSTEM_OPTIONS - // On some systems, MaskBlt succeeds yet is much much slower + // On some systems, MaskBlt succeeds yet is much, much slower // than the wxWidgets fall-back implementation. So we need // to be able to switch this on and off at runtime. // diff --git a/src/msw/dlmsw.cpp b/src/msw/dlmsw.cpp index 4a1e3bea01..8c2cc65d80 100644 --- a/src/msw/dlmsw.cpp +++ b/src/msw/dlmsw.cpp @@ -248,8 +248,8 @@ void* wxDynamicLibrary::GetModuleFromAddress(const void* addr, wxString* path) if ( !::GetModuleFileName(hmod, libname, MAX_PATH) ) { // GetModuleFileName could also return extended-length paths (paths - // prepended with "//?/", maximum length is 32767 charachters) so, - // in principle, MAX_PATH could be unsufficient and we should try + // prepended with "//?/", maximum length is 32767 characters) so, + // in principle, MAX_PATH could be insufficient and we should try // increasing the buffer size here. wxLogLastError(wxT("GetModuleFromAddress")); return nullptr; diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 3c62e2eaff..402474db9b 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -41,7 +41,7 @@ // the helper class which calls ::EnumFontFamilies() and whose OnFont() is // called from the callback passed to this function and, in its turn, calls the -// appropariate wxFontEnumerator method +// appropriate wxFontEnumerator method class wxFontEnumeratorHelper { public: diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index ec1a88547a..a5758edbe1 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -502,7 +502,7 @@ bool wxICOFileHandler::LoadIcon(wxIcon *icon, // Unfortunately this doesn't work, because ExtractIconEx // will scale the icon to the 'desired' size, even if that // size of icon isn't explicitly stored. So we would have - // to parse the icon file outselves. + // to parse the icon file ourselves. if ( desiredWidth == -1 && desiredHeight == -1) { diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index b5ad6895c7..6638b72ade 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -118,7 +118,7 @@ inline StringFormat* GetDrawTextStringFormat(wxLayoutDirection dir = wxLayout_De // device context implementation // // more and more of the dc functionality should be implemented by calling -// the appropricate wxGDIPlusContext, but we will have to do that step by step +// the appropriate wxGDIPlusContext, but we will have to do that step by step // also coordinate conversions should be moved to native matrix ops //----------------------------------------------------------------------------- @@ -830,7 +830,7 @@ wxGDIPlusPenBrushBaseData::CreateRadialGradientBrush( int count = 1; brush->SetSurroundColors(&col, &count); - // TODO: There doesn't seem to be an equivallent for SetWrapMode, so + // TODO: There doesn't seem to be an equivalent for SetWrapMode, so // the area outside of the gradient's radius is not getting painted. // Apply the matrix if there is one diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 6bb2ee406a..ed52938fa7 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -196,7 +196,7 @@ void wxListBox::MSWOnItemsChanged() { // we need to do two things when items change: update their max horizontal // extent so that horizontal scrollbar could be shown or hidden as - // appropriate and also invlaidate the best size + // appropriate and also invalidate the best size // // updating the max extent is slow (it's an O(N) operation) and so we defer // it until the idle time but the best size should be invalidated diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 1ea15c7c08..e82349f603 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -51,7 +51,7 @@ #define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) // you can set USE_NOTEBOOK_ANTIFLICKER to 0 for desktop Windows versions too -// to disable code whih results in flicker-less notebook redrawing at the +// to disable code which results in flicker-less notebook redrawing at the // expense of some extra GDI resource consumption #define USE_NOTEBOOK_ANTIFLICKER 1 @@ -612,7 +612,7 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage) if ( m_pages.empty() ) { - // no selection any more, the notebook becamse empty + // no selection any more, the notebook becomes empty m_selection = wxNOT_FOUND; } else // notebook still not empty @@ -621,9 +621,9 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage) if ( selNew != wxNOT_FOUND ) { // No selection change, just refresh the current selection. - // Because it could be that the slection index changed + // Because it could be that the selection index changed // we need to update it. - // Note: this does not mean the selection it self changed. + // Note: this does not mean the selection itself changed. m_selection = selNew; m_pages[m_selection]->Refresh(); } @@ -1637,7 +1637,7 @@ void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event) { // no, it doesn't come from child, case (b) or (c): forward to a // page but only if entering notebook page (i.e. direction is - // backwards (Shift-TAB) comething from out-of-notebook, or + // backwards (Shift-TAB) something from out-of-notebook, or // direction is forward (TAB) from ourselves), if ( m_selection != wxNOT_FOUND && (!event.GetDirection() || isFromSelf) ) diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 87521ce50e..64697e2545 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -588,7 +588,7 @@ wxDataFormat wxDropTarget::GetMatchingPair() wxDataFormat wxDropTarget::MSWGetSupportedFormat(IDataObject *pIDataSource) const { - // this strucutre describes a data of any type (first field will be + // this structure describes a data of any type (first field will be // changing) being passed through global memory block. static FORMATETC s_fmtMemory = { 0, diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 73fb1855ac..99e0960bf3 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -345,7 +345,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, // associate the text window with the spin button (void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)m_hwndBuddy, 0); - // set up fonts and colours (This is nomally done in MSWCreateControl) + // set up fonts and colours (This is normally done in MSWCreateControl) InheritAttributes(); if (!m_hasFont) SetFont(GetDefaultAttributes().font); @@ -534,7 +534,7 @@ void wxSpinCtrl::SetLayoutDirection(wxLayoutDirection dir) WXHWND wxSpinCtrl::MSWGetFocusHWND() const { - // Return the buddy hwnd because it shuld be focused instead of the + // Return the buddy hwnd because it should be focused instead of the // wxSpinCtrl itself. return m_hwndBuddy; } diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index d6aadd0119..c5e0b9239e 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -220,7 +220,7 @@ public: // Because new label can have different length than the old one // so updating button's label with TB_SETBUTTONINFO would require - // also manual re-positionining items in the control tools located + // also manual re-positioning items in the control tools located // to the right in the toolbar and recalculation of stretchable // spacers so it is easier just to recreate the toolbar with // Realize(). Performance penalty should be negligible. diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index a422ad0b5b..87b04670c3 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -553,7 +553,7 @@ wxExecuteDDE(const wxString& ddeServer, // XTYP_EXECUTE for their DDE API, some important ones -- like Word // and other MS stuff - use XTYP_REQUEST! // - // moreover, anotheri mportant program (IE) understands both but + // moreover, another important program (IE) understands both but // returns an error from Execute() so we must try Request() first // to avoid doing it twice { diff --git a/src/msw/volume.cpp b/src/msw/volume.cpp index ef8243dc04..5506e7fa83 100644 --- a/src/msw/volume.cpp +++ b/src/msw/volume.cpp @@ -323,7 +323,7 @@ static int CompareFcn(const wxString& first, const wxString& second) //============================================================================= // Function: BuildRemoteList // Purpose: Append Network Neighborhood items to the list. -// Notes: - Mounted gets transalated into Connected. FilteredAdd is told +// Notes: - Mounted gets translated into Connected. FilteredAdd is told // to ignore the Mounted flag since we need to handle it in a weird // way manually. // - The resulting list is sorted alphabetically. diff --git a/src/osx/core/hid.cpp b/src/osx/core/hid.cpp index 9d4e4c6075..7343c9e41d 100644 --- a/src/osx/core/hid.cpp +++ b/src/osx/core/hid.cpp @@ -67,7 +67,7 @@ bool wxHIDDevice::Create (int nClass, int nType, int nDev) //then later some registry properties from an iterator (see below) // //The call to IOServiceMatching filters down the - //the services we want to hid services (and also eats the + //services we want to hid services (and also eats the //dictionary up for us (consumes one reference)) CFMutableDictionaryRef pDictionary = IOServiceMatching(kIOHIDDeviceKey); if(pDictionary == nullptr) diff --git a/src/richtext/richtextprint.cpp b/src/richtext/richtextprint.cpp index 9d9c84a1cb..fefa3572e1 100644 --- a/src/richtext/richtextprint.cpp +++ b/src/richtext/richtextprint.cpp @@ -327,7 +327,7 @@ void wxRichTextPrintout::CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& he int ppiPrinterX, ppiPrinterY; GetPPIPrinter(&ppiPrinterX, &ppiPrinterY); - // This scales the DC so that the printout roughly represents the + // This scales the DC so that the printout roughly represents // the screen scaling. const double scale = double(ppiPrinterX) / ppiScreenX; diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index c4f3e9a6a4..cba2f54230 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -1297,7 +1297,7 @@ void wxMenu::Attach(wxMenuBarBase *menubar) // unfortunately, we can't use m_menuBar->GetEventHandler() here because, // if the menubar is currently showing a menu, its event handler is a - // temporary one installed by wxPopupWindow and so will disappear soon any + // temporary one installed by wxPopupWindow and so will disappear soon and // any attempts to use it from the newly attached menu would result in a // crash // diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index d1a068968f..3b8cd81c7d 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -497,7 +497,7 @@ static GstBusSyncReply gst_bus_sync_callback(GstBus* bus, // wxGStreamerMediaBackend::HandleStateChange // // Handles a state change event from our C Callback for "state-change" or -// the async queue in 0.10. (Mostly this is here to avoid locking the +// the async queue in 0.10. (Mostly this is here to avoid locking // the mutex twice...) //----------------------------------------------------------------------------- void wxGStreamerMediaBackend::HandleStateChange(GstState oldstate,