Check if using Init(wxLANGUAGE_DEFAULT) is going to succeed by actually
calling wxSetLocale(LC_ALL, "") in this special case, as we can't if
it's going to work otherwise if we don't recognize the language.
The wxUILocale function really returns the default language unlike the
one in wxLocale which must kepe using the default locale for
compatibility, making its name confusing.
This can be useful to compare the results of calling
wxUILocale::GetSystemLanguage() and the function with the same name in
wxLocale (which actually corresponds to wxUILocale::GetSystemLocale()).
Explain that we need to call our (i.e. wxLocale) GetSystemLanguage()
here instead of letting wxUILocale::GetLanguageInfo() call its own (i.e.
wxUILocale) GetSystemLanguage() which does _not_ do the same thing.
No real changes, just try to explain this confusing code better.
The documentation for wxChoiceBook discusses using this method, but it
was not previously documented.
See #23211.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
Similar items were added context in d85f0e311d (Use translation context
for standard OSX menu items, 2022-05-02) but some were missed back then.
The context primarily serves as a translator comment, informing that these
are indeed OSX menu item names, and not something else.
Also to match the established translations of OSX itself, for some
languages these may need to be translated using particular terminology
different than on other platforms.
See #23213.
When wxWidgets itself is embedded into another repository as a
submodule, it may not be obvious that the given command must be run from
wxWidgets subdirectory and not the top-level repository itself, so make
it more explicit.
wxGraphicsContext::ResetClip (wxOSX)
Using native CGContextResetClip() to reset the clip causes some
drawing glitches - especially with drawing text with CT - see
https://github.com/wxWidgets/wxWidgets/issues/22629#issuecomment-1399554002
For the time being we have to revert to the previous code
with emulated resetting based on restoring the graphics context state.
We also have to disable a unit tests that fails with emulated
resetting the clip.
See #22629.
Including that header breaks any use of placement new, such as the one
in wx/any.h, so we need to explicitly undefine (and then redefine it
back) "new" to make it compile in case wx/msw/msvcrt.h is included
first.
Ubuntu configured to use apport by default, which intercepts core files
creation and creates them in a different directory.
Force creating core files in the current directory by overwriting the
corresponding kernel option. Note that this requires using --privileged
docker option as otherwise /proc/sys is mounted read-only inside the
contains and cannot be modified.
See #23189.
This is slightly more efficient as it avoids allocating an object which
is possibly not ever going to be used on startup of any application
linking with the propgrid library (at the price of slower access to this
object, but this should never be done in performance-critical parts of
the code, hopefully) and avoids a problem with losing the previously
registered editors when re-initializing wx modules, as wxPython does.
Closes#23165.
See #23187.
Show short version on the same line as the program name and put the
copyright at the bottom, as in the other versions.
This makes the simple message box more similar to the fuller dialog
shown by wxAboutBox() if the web site or any other "non simple" field is
specified.
This is consistent with the native GTK and macOS dialogs and it makes
sense to try be more consistent with them, as the generic version is
used as a fallback under Mac.
Also use a smaller font for the copyright as is customary.
They were wrongly declared as taking (which is not very important) and
returning (which was very bad as it resulted to interpreting the return
values incorrectly in optimized builds) Win32 4-byte BOOL instead of the
C++ 1-byte bool that they actually use.
Closes#23169.
See #23186.
An additional call to wxWebViewHandlerRequest::GetDataString() would
return an empty string because the underlying memory stream wasn't
reset.
Closes#23181.
This resulted in its base class wxNavigationEnabled<wxBookCtrlBase>
being instantiated both in the application itself (when using it
directly) and inside the wx DLLs (when using another class using the
same base class, but defined in the DLL, such as wxAuiNotebook) and gave
linking errors.
Work around this by explicitly defining wxCompositeBookCtrlBase,
corresponding to this base class, ourselves and export it from the DLL
so that it's the single instance which is always used.
Closes#22805.
This is a generalization of the existing "platform" attribute and allows
to only include some XRC elements if and only if an arbitrary "feature"
is enabled by the application before loading the XRC document.
Move "alpha" initialization inside the conditional to ensure that it's
calculated correctly, as it was apparently hoisted out of the loop due
to an optimizer bug otherwise.
This commit is best viewed with Git --color-moved option.
Closes#23164.