[Git][wxwidgets/wxwidgets][master] 56 commits: Fix processing preferred languages list in wxMSW

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Jul 15, 2025, 8:04:30 PMJul 15
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • b64d4684
    by Harrie Levels at 2025-07-08T00:44:59+02:00
    Fix processing preferred languages list in wxMSW
    
    The value returned by RegQueryValueEx() is not necessarily
    NUL-terminated, but the code added in 57e1c9e1ee (Update wxWidgets
    language database and improve locale matching, 2024-11-18), see #24855,
    assumed that it was which could result in buffer overrun.
    
    Make the value NUL-terminated to ensure that this works as intended.
    
    Closes #25612.
    
  • e3994203
    by Vadim Zeitlin at 2025-07-08T00:47:20+02:00
    Fix possible confusion between bytes and characters in wxUILocale
    
    The code used "valueSize", which is the size in bytes, as size of the
    array of WCHAR, which is supposed to be expressed in elements, i.e.
    (wide) characters in this case.
    
    Make the intention clear by introducing an explicitly named "numChars".
    
    This also means that we allocate enough space for 256, and not 128,
    characters here, which was probably the intention.
    
    We may still want to change this code to allocate the required size if
    256 is not enough, even if this seems unlikely in practice.
    
  • 41d298ab
    by Vadim Zeitlin at 2025-07-08T00:58:04+02:00
    Add wxRegKey::GetHkey()
    
    Provide access to the underlying HKEY, especially as we already allow
    setting it.
    
  • 4faf3d6a
    by Vadim Zeitlin at 2025-07-08T00:59:44+02:00
    Use wxRegKey to ensure that HKEY is always closed
    
    No real changes, just simplify the code a bit by using wxRegKey instead
    of opening and closing the key manually.
    
    It would be even better to add support for REG_MULTI_SZ to wxRegKey
    itself and use it directly here, but for now keep the code handling the
    values of this type here as we don't need it anywhere else.
    
    This commit is best viewed ignoring whitespace-only changes.
    
  • 1e65eaf6
    by Vadim Zeitlin at 2025-07-08T17:45:50+02:00
    Make code iterating over REG_MULTI_SZ even more robust
    
    Don't assume that there is even a single NUL at the end of the returned
    buffer (instead of not assuming that there were two of them) and check
    that we never read beyond the buffer length.
    
  • f5030df2
    by Vadim Zeitlin at 2025-07-08T18:12:40+02:00
    Replace wxBoxSizer with wxFlexGridSizer in the internat sample
    
    No real changes so far, just make it simpler to add more controls to
    this sample in the upcoming commit.
    
  • da91e731
    by Vadim Zeitlin at 2025-07-08T18:12:42+02:00
    Show wxDatePickerCtrl and wxTimePickerCtrl in internal sample too
    
    These controls are also locale-dependent, so it's useful to see how they
    behave depending on the UI locale.
    
  • 128ace42
    by Vadim Zeitlin at 2025-07-08T19:00:34+02:00
    Add wxUILocale::IsSet()
    
    This can be used to check whether GetCurrent() returns the
    application-set locale or the default "C" one.
    
  • 9d21fe33
    by Vadim Zeitlin at 2025-07-08T19:08:26+02:00
    Do not use "C" locale for date/time pickers in wxMSW by default
    
    Using "C" date/time formats by default was a gratuitous change compared
    to the behaviour in the previous versions of wxWidgets and is
    inconsistent with wxCalendarCtrl, which makes it especially jarring.
    
    Revert to the pre-6bcbcf9d09 (Make wxMSW date/time picker controls
    locale aware, 2023-10-14) behaviour by default, although still use the
    UI locale if it has been explicitly set.
    
    Closes #25511.
    
  • aa0ebbe8
    by Vadim Zeitlin at 2025-07-08T19:12:21+02:00
    Document that wxMSW wxCalendarCtrl always use default user locale
    
    There genuinely doesn't seem to be any way to change it.
    
  • 172f34ce
    by Vadim Zeitlin at 2025-07-09T19:53:30+02:00
    Add a note updating docs page on the web site when releasing
    
    See https://github.com/wxWidgets/wxwidgets.github.io/pull/110
    
  • f305d67b
    by Blake-Madden at 2025-07-09T19:55:32+02:00
    Make wxNumberFormatter::RemoveTrailingZeroes() public
    
    This function can be helpful in the application too.
    
    Closes #25614.
    
  • 85b976cc
    by Vadim Zeitlin at 2025-07-10T18:21:47+02:00
    Revert "Remove wxGtkTreeModelNode::GetNodesCount()"
    
    This reverts commit adbb1e5348a969f01d3f9d4d2efff85bb5e99b8e because its
    assumption ("m_nodes and m_children must be always in sync") wasn't
    actually true, "m_nodes" can be empty even if "m_children" is not if the
    node hadn't been expanded yet.
    
    Actually, checking m_nodes size is important as not doing it could
    result in trying to access non-existent element of this container and
    crashing.
    
    Closes #25625.
    
  • f7df62c5
    by Vadim Zeitlin at 2025-07-10T18:37:41+02:00
    Fix type of wxAuiToolBarArt::Get{Label,Tool}Size "dc" parameters
    
    They are now wxReadOnlyDC and not wxDC.
    
  • 72d5da63
    by Vadim Zeitlin at 2025-07-10T18:37:41+02:00
    Fix default value of wxUIntPtr data in wxDataViewCtrl docs
    
    wxUIntPtr is not a pointer, so can't be set to nullptr by default, use
    the same 0 as is used in the actual C++ header.
    
  • bcfed7d0
    by jensgoe at 2025-07-10T19:23:23+02:00
    Fix wxBitmapComboBox::Append() and Insert() documentation
    
    Their parameters are of type wxBitmapBundle now and not wxBitmap.
    
    See #25623.
    
    Closes #25622.
    
  • 2f4861b5
    by Vadim Zeitlin at 2025-07-10T19:23:29+02:00
    Remove member functions of wxRibbon{MSW,AUI}ArtProvider from the docs
    
    Having them there wasn't really useful, all the overridden functions are
    already present in the base class and it would only make sense to have
    them in the derived ones if we had any documentation specific to these
    classes, but this is not the case,
    
  • fe090c6d
    by Vadim Zeitlin at 2025-07-10T19:23:29+02:00
    Update type of "dc" parameters in wxRibbonArtProvider docs
    
    They are now of type wxReadOnlyDC and not wxDC.
    
  • 5d7fc6ec
    by Vadim Zeitlin at 2025-07-10T19:23:29+02:00
    Add compatibility note to wxReadOnlyDC documentation
    
    Explain that functions taking it used to take wxDC parameters and still
    accept them.
    
  • 9613378b
    by Vadim Zeitlin at 2025-07-10T19:23:29+02:00
    Fix wxXmlParseError offset field documentation
    
    It was somehow added with an incorrect name and type in 38d8980283 (Add
    optional wxXmlParseError to wxXmlDocument::Load(), 2024-01-14).
    
    See #24215.
    
  • ff28461e
    by Vadim Zeitlin at 2025-07-10T19:23:29+02:00
    Fix default value of wxPGSplitterPositionFlags parameter
    
    This parameter of wxPropertyGridPageState::DoSetSplitter() must default
    to wxPGSplitterPositionFlags::Null, which is of correct type, and not 0,
    which is not.
    
  • 7c7bd142
    by Vadim Zeitlin at 2025-07-10T19:23:29+02:00
    Remove wxPGProperty::AddChild() documentation
    
    This function was removed from the actual class in 5e2da5a106 (Get rid
    of v2.8 code, 2022-08-01), so remove it from the documentation as well.
    
    See #22692.
    
  • f8f2d688
    by Vadim Zeitlin at 2025-07-12T03:55:27+02:00
    Get rid of CppUnit machinery in wxListCtrl unit tests
    
    We still use some macros to avoid having to define the same test cases
    for wxListCtrl and wxListView, but the code structure is much more
    understandable and explicit now.
    
    No changes in behaviour.
    
  • 61b71e59
    by Vadim Zeitlin at 2025-07-12T04:01:19+02:00
    Replace all CppUnit-compatible macros with CATCH ones
    
    No real changes, just get rid of the last vestiges of CppUnit in
    wxListCtrl tests.
    
  • 6bc4a1e1
    by Vadim Zeitlin at 2025-07-12T04:12:59+02:00
    Fix losing text of generic wxListCtrl items when copying them
    
    During the switch from copy to move ctor of wxListCtrl in a5777cdcbd
    (Make wxListItemData movable and not copyable, 2023-01-19) copying the
    item text was simply lost, resulting in items forgetting their text when
    they were moved internally by the vector in which they are stored, which
    could result in e.g. their text becoming empty when a new column was
    appended.
    
    Fix this by adding the missing text (and also image and user data) field
    to the move ctor and move assignment operator.
    
    Closes #25519.
    
  • c178cf9f
    by Vadim Zeitlin at 2025-07-12T15:57:58+02:00
    Restore compatibility with code using wxPG_XXX flags
    
    Defining wxPG_XXX of type different from (and not convertible to) "int"
    wasn't enough to make all code using these constants compile, as it
    could rely on storing them in int variables.
    
    Change the type of these compatibility constants to "int" to be really
    compatible and also remove deprecation messages from them, as getting
    such message when passing them to any function taking a new style enum
    is enough, there is no need for multiple deprecation messages for the
    same line of code.
    
    Closes #25627.
    
  • a1a0d385
    by Blake-Madden at 2025-07-12T16:04:01+02:00
    Add functions for testing wxColour opacity
    
    Add IsTransparent(), IsOpaque() and IsTranslucent() as more readable
    synonyms for testing the value of GetAlpha() directly.
    
    Closes #25628.
    
  • 0b3ef1fe
    by Blake-Madden at 2025-07-12T16:05:36+02:00
    Fix and clarify wxRect2DDouble explainations
    
    See #25629.
    
  • 5aac02dd
    by Blake-Madden at 2025-07-12T16:06:05+02:00
    Fix minor typos in comments
    
    Closes #25629.
    
  • e7155d72
    by Blake-Madden at 2025-07-12T16:49:03+02:00
    Cache wxVERSION and wxCOPYRIGHT CMake variable
    
    This makes them available to the applications using CMake.
    
    Closes #25596.
    
  • 6e744087
    by Vadim Zeitlin at 2025-07-12T16:50:53+02:00
    Merge branch 'msw-get-pref-lang-fixes'
    
    Fix/improve GetUserPreferredLanguagesFromRegistry() in wxMSW code, most
    importantly fixing a buffer overrun reported in #25612.
    
    See #25613.
    
  • a424a1e8
    by Vadim Zeitlin at 2025-07-12T16:51:52+02:00
    Merge branch 'use-default-locale'
    
    Use default locale for date/time picker controls in wxMSW by default to
    restore their behaviour in pre-3.3.0 wxWidgets versions.
    
    See #25617.
    
  • 823d3e53
    by Vadim Zeitlin at 2025-07-12T16:55:56+02:00
    Don't change invalid current wxGrid cell in SetTable()
    
    Changing the table shouldn't make the cell (0, 0) current if we hadn't
    had any current cell before, this was unintentional side effect of
    e570d85164 (Ensure current cell remains valid when wxGrid table changes,
    2023-09-15) which resulted in an unwanted wxEVT_GRID_SELECT_CELL event
    when creating the grid.
    
    Fix this by only calling UpdateCurrentCellOnRedim() if we have a valid
    current cell to update.
    
    See #23751.
    
    Closes #25498.
    
  • f862e628
    by Vadim Zeitlin at 2025-07-12T16:57:12+02:00
    Merge branch 'listctrl-fixes'
    
    Fix losing text of generic wxListCtrl items: fixes #25519 and also
    refactors/simplifies the unit tests for this class.
    
    See #25630.
    
  • 6cdeab5a
    by Vadim Zeitlin at 2025-07-12T17:03:34+02:00
    Document consequences of setting Windows app user model ID
    
    Mention that some functionality requires writing Windows-specific code
    to re-enable it after setting the app user model ID.
    
    See #25548.
    
  • f02f9629
    by Vadim Zeitlin at 2025-07-14T16:57:49+02:00
    Correct document type of wxControl::Ellipsize() "dc" parameter
    
    It is now wxReadOnlyDC, not wxDC.
    
    See #25639.
    
  • 7756b052
    by Vadim Zeitlin at 2025-07-14T17:42:10+02:00
    Document incompatible change to wxStyledTextCtrl::AddSelection()
    
    This function doesn't have any return value any more.
    
    See #25639.
    
  • c2502beb
    by Bill Su at 2025-07-14T22:45:05+02:00
    Add wxNUM_VAL_SIGN_PLUS and wxNUM_VAL_SIGN_SPACE
    
    Add numeric formatting and validation styles for displaying
    non-negative numbers with "+" or space prefix.
    
    Closes #25635.
    
  • 4f3ff42c
    by Vadim Zeitlin at 2025-07-14T23:12:01+02:00
    Restore wxPG_XXX_FLAGS enums for compatibility
    
    Don't gratuitously remove the previously existing enums, this doesn't
    have any benefits but may break the existing code, so bring back
    definitions of wxPG_PROPERTYVALUES_FLAGS, wxPG_MISC_ARG_FLAGS and
    wxPG_SETVALUE_FLAGS removed ca3acd7a03 (Use enum class to implement
    wxPGPropValFormatFlags as bitmask, 2024-01-06).
    
  • b107ec47
    by Vadim Zeitlin at 2025-07-14T23:13:59+02:00
    Rename scoped enum wxPGPropertyFlags to wxPGFlags
    
    This allows to reintroduce wxPGPropertyFlags enum compatible with its
    3.2 definition.
    
    The new name for the scoped enum is not great because it less precise
    but is shorter, which is more convenient, and it seems difficult to find
    something else sufficiently different from wxPGPropertyFlags as to not
    provoke confusion with it.
    
  • e03be360
    by Vadim Zeitlin at 2025-07-14T23:26:02+02:00
    Add back default value for AddActionTrigger(int) overload
    
    Allow the existing code calling it using int and without specifying
    modifiers explicitly to still work.
    
  • ebf2d2ba
    by Vadim Zeitlin at 2025-07-14T23:53:56+02:00
    Revert "Use enum class to represent NumericType"
    
    This reverts commit 3cb3d622120800a3c2b6d19360faef06eccce4da as this is
    a backwards-incompatible change which is simply not worth it.
    
  • 89a0a338
    by Vadim Zeitlin at 2025-07-14T23:54:01+02:00
    Add compatible wxPGProperty::ChangeFlag() overload
    
    This was apparently just forgotten, breaking old code using int values
    for the flags.
    
  • 12572b39
    by Vadim Zeitlin at 2025-07-14T23:54:01+02:00
    Add back previously existing enums for compatiblity
    
    Add back wxPGNumericValidationConstants, wxPG_KEYBOARD_ACTIONS,
    wxPG_SELECT_PROPERTY_FLAGS, wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS,
    wxPG_SET_SPLITTER_POSITION_SPLITTER_FLAGS which were removed without any
    good reason -- so restore them for compatibility.
    
  • 86dd299d
    by Vadim Zeitlin at 2025-07-15T16:54:15+02:00
    Add compatibility SetFlag[Recursively]() overloads too
    
    This was apparently just forgotten.
    
  • e6c7c16c
    by Maarten Bent at 2025-07-15T21:44:44+02:00
    CMake: Always use MSVC naming with MSVC compiler
    
    Fixes #25592
    
  • cebe0a99
    by Maarten Bent at 2025-07-15T23:07:58+02:00
    CMake: Make using MSVC naming convention configurable
    
    functions.cmake is included before options.cmake, so WIN32_MSVC_NAMING variable
    cannot be used directly in the script. Only use it in functions and macros.
    For the same reason, move initializing GEN_EXPR_DIR and wxINSTALL_INCLUDE_DIR to init.cmake.
    
    see #25466
    
  • d39e707e
    by Maarten Bent at 2025-07-15T23:07:59+02:00
    CMake: Make runtime dir name dependent on MSCV naming
    
    see #25466
    
  • 32ca3660
    by Maarten Bent at 2025-07-15T23:07:59+02:00
    CMake: Only enable wxUSE_HOTKEY on wxMSW and wxOSX
    
    Fixes #25503
    
  • 4904fd66
    by Maarten Bent at 2025-07-15T23:08:00+02:00
    CMake: Always enable wxUSE_DBGHELP
    
    see #25466
    
  • f5ee95f8
    by Maarten Bent at 2025-07-15T23:08:00+02:00
    CMake: Include DESTDIR in symlink target
    
    See #25466
    
  • d1be72aa
    by Vadim Zeitlin at 2025-07-16T01:28:53+02:00
    Don't assert in wxGridSizer::Calc{Cols,Rows}() if sizer is empty
    
    When the sizer is completely empty, it makes more sense to return 0
    from these functions without asserting.
    
    See #25642.
    
    Closes #25641.
    
  • 8b4dc557
    by Vadim Zeitlin at 2025-07-16T01:29:04+02:00
    Merge branch 'cmake-improvements-20250715' of github.com:MaartenBent/wxWidgets
    
    Miscellaneous CMake improvements.
    
    See #25643.
    
  • ea87876f
    by Vadim Zeitlin at 2025-07-16T01:30:56+02:00
    Merge branch 'pg-compat'
    
    Restore compatibility with code using wxPG_XXX flags.
    
    See #25632.
    
  • 608b38ef
    by Vadim Zeitlin at 2025-07-16T01:32:52+02:00
    Merge branch 'doc-fixes'
    
    Fix many inconsistencies between real and interface headers.
    
    See #25531, #25626.
    
  • 0396c266
    by Vadim Zeitlin at 2025-07-16T01:36:04+02:00
    Avoid collapsing wxDVC node if already done by event handler
    
    If an event handler for wxEVT_DATAVIEW_SELECTION_CHANGED called
    Collapse() itself (which is weird but allowed), Collapse() still tried
    to collapse it again, which could result in the count of items becoming
    negative and all sorts of other problems.
    
    Avoid them by not doing anything if the item has been collapsed after
    the selection change.
    
    See #25638.
    
    Closes #25631.
    

101 changed files:

The diff was not included because it is too large.

Vadim Zeitlin (@_VZ_)

unread,
Jul 15, 2025, 8:05:30 PMJul 15
to wx-commi...@googlegroups.com

Vadim Zeitlin (@_VZ_)

unread,
Jul 15, 2025, 8:06:34 PMJul 15
to wx-commi...@googlegroups.com

Vadim Zeitlin (@_VZ_)

unread,
Jul 15, 2025, 8:07:03 PMJul 15
to wx-commi...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages