Fix minor typos in comments

Closes #25629.
This commit is contained in:
Blake-Madden
2025-07-12 16:06:05 +02:00
committed by Vadim Zeitlin
parent 0b3ef1feaa
commit 5aac02dddf
30 changed files with 42 additions and 42 deletions
+2 -2
View File
@@ -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.
*/
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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 )
{
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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));
+2 -2
View File
@@ -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
//
+1 -1
View File
@@ -111,7 +111,7 @@ wxBrushRefData::~wxBrushRefData()
}
// ----------------------------------------------------------------------------
// wxBrushRefData accesors
// wxBrushRefData accessors
// ----------------------------------------------------------------------------
bool wxBrushRefData::operator==(const wxBrushRefData& data) const
+1 -1
View File
@@ -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.
//
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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)
{
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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) )
+1 -1
View File
@@ -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,
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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
{
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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
//
+1 -1
View File
@@ -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,