wxListBox's width adjustment code appears to have been written before
wxCheckListBox's existence, and still assumed there's only one column, at
index 0, in some places.
In wxCheckListBox, however, there are two columns, and column 0 is the
non-resizable checkbox one. We need to use column 1 (aka the last
column) for automatic width updates, because that's where the text is.
In native OS X apps, focus ring is not shown around NSTableView controls
(focus is indicated differently, with selection's color).
See eece498 for the same fix in wxDataViewCtrl.
The simple test added in 59a8f26b01 (Add a unit test for wxWebRequest
query using URL parameters, 2021-03-06) worked when using httpbin.org,
but not when running httpbin locally, as it doesn't pretty-print JSON by
default.
Skip optional whitespace to make it work in both cases.
Not doing it, i.e. creating the window inside the static box as its
siblings, rather than children, may appear to work, but actually doesn't
always do it, for example the windows are not shown correctly when using
RTL locale.
Closes#19086.
For generic wx{Dir|File}PickerCtrl with text field the picker button
should be as high as the associated text field also when
wx{FLP|DIRP}_SMALL flag is set.
Closes#19087.
Avoid the need for ugly WX_NO_LOCALE_SUPPORT macro at the cost of a
couple of extra #ifs, which seems to be a worthy trade-off.
This also allows making the code calling setlocale("") for the default
language platform-independent.
No real changes.
Even if we do know about the system language, it's still better to let
OS/CRT handle it, as we may not know enough about it. E.g. "system
language" may actually be a mix of the different languages and formats
and we don't handle this case at all, while OS/CRT do just fine.
We must use GetUserDefaultUILanguage() and not GetUserDefaultLCID().
Although still not ideal, this is much better when the UI language and
the locale differ: when everything is in some language, it's better to
use this language and wrong date/number format than use correct
date/number format but a wrong language.
See #11594.
Check if the path is at least two characters long before accessing its
second character.
Add test cases for wxIsAbsolutePath() on MS Windows.
Closes https://github.com/wxWidgets/wxWidgets/pull/2262
X11 headers and libraries are only required if we're actually using X11
which may not be the case.
This allows to build wxGTK on the systems using Wayland-only GTK.
At least on Microsoft Windows, it is possible to start dragging an unselected
wxTreeCtrl item. Therefore, in wxEVT_TREE_BEGIN_DRAG handler do not use the
path that is currently selected in the control but the one that is actually
being dragged.
Closes https://github.com/wxWidgets/wxWidgets/pull/2258
Don't return unconditionally before another return. Somehow gcc doesn't
warn about it, but other compilers (and static analyzer tools)
definitely do.
No real changes.
If we can't find an exact match for the system locale in the database,
try to at least find the corresponding language.
This is almost certainly what the intention of the original code was, as
otherwise the entire loop was useless because it couldn't find anything
that wouldn't have been found in the loop just above.
This allows to correctly load German translations when using unsupported
locale such as "de_IT", for example.
See #19082.
wxGetKeyStateGTK() is intended to be used only with non-X11 GTK backends.
wxGetKeyStateX11() should still be used on GTK3 w/ X11 as the GTK
variant does not provide all key states.