Define the function calling setlocale("xx_YY") first and then just
setlocale("xx") if the former failed, instead of doing the same thing
manually in 3 different places.
Also avoid attempting the second setlocale() call completely if there is
no "_YY" part in the first place.
No real changes.
Call the info->CanonicalName "shortName", as it's done in many other
places in the code instead of using "locale" for it here, even though we
do use it as a name of locale.
No real changes.
There doesn't seem to be any reason to partially duplicate Unix-specific
code in a separate Mac branch when we can just use the same code. Parts
of it which are not necessary under Mac, such as trying ".UTF-8" locales
in wxSetlocaleTryUTF8(), can be separately disabled there (even though
they are harmless), but other parts are probably needed, e.g. setting
Norwegian locale failed under macOS before because we didn't translate
nb_NO that we use to no_NO actually supported under macOS.
There is no need to try setting "loc.UTF-8" and "loc.UTF8" when we had
just called wxSetlocaleTryUTF8() which tried these variants and also
their lower-case equivalents already.
wxBitmapButton without inner border should work better with themes
if we reduce inner border in a more GTK-compliant way by applying
a dedicated GTK style to the button.
The way wxBU_EXACTFIT is implemented in commit c1bb80987f
("Improve implementation of wxBU_EXACTFIT style for wxButton under wxGTK2",
2020-04-12) is too intrusive and disrupts button's appearance in some
themes. It should work better with themes if we reduce inner border in
a more GTK-compliant way by applying a dedicated GTK style to the button.
Closes#19081.
The Scintilla engine will automatically truncate lines in the
autocomplete listbox based on the call to AutoCompSetMaxWidth().
It is not good to do it in the wx implementation code as well,
since then the meaning of AutoCompSetMaxWidth(0) (e.g. no truncation)
is not valid and the list items will be truncated anyway.
Closes https://github.com/wxWidgets/wxWidgets/pull/2250
This could be further improved by defining array matchers instead of
using the macros, but for now just get rid of the last traces of CppUnit
in this file.
No real changes.
Replace "equal" parameter with the (opposite) "lowerBound" one with a
more descriptive name, add a comment describing it and also remove the
default value to force explaining how it is used in the caller.
No real changes.