Knowing msgIdLanguage is necessary for correct evaluation of preferred
languages order; without it, it would be possible to load undesirable
translation file.
See 2af36e9560 for details.
This commit partially reverts 94b1a17aeb.
The above commit changed translation lookup logic to differentiate
between msgid and "available" translations (the latter being loaded from
a file or resource). It first attempted to use available translations
and only felt back to msgid language as the last resort.
Unfortunately, doing that broke lookup in cases when the user had msgid
language as not-last preference in their UI languages list, or even when
a similar translation was available. For example:
- msgid=en, user preference [cs,en,fr], only fr.po available: fr would
be used instead of en
- msgid=en_US or en, user preference [en], but en_GB.po available:
British English would be used even for US users
This commit fixes this by restoring the previous behavior where msgid
language was treated as a first-class citizen in lookup, while
preserving the API that allows distinguishing between the two cases.
It also reimplements AddStdCatalog() in a more straightforward way that
doesn't rely on AddAvailableCatalog().
The only real change in this commit is the use of wxRound() instead of
truncating cast to int when rescaling icons.
The rest consists of just some cleanup:
- Initialize (mostly) pointer member variables in their declaration.
- Remove wxT() from strings.
- Replace checks for __WXMAC__ with checks for __WXOSX__.
- Replace macros with lambda functions.
- Add "explicit"
- Replace wxString::IsEmpty() with empty().
- Use wxNOT_FOUND instead of -1.
- Use static_cast<> instead of C-style casts.
Closes#24261.
Check that ms_pfnSetThreadDpiAwarenessContext function pointer was
initialized before using it.
This fixes a regression introduced in 9befda5c26 (Only use
AutoSystemDpiAware when displays have different DPI, 2023-12-10).
See #24121, #24196.
Closes#24288.
This allows to get the name of the node which is needed for XRC handlers
using specific elements instead of using the object elements with
specific name attribute.
Allow specifying recurse="1" to inherit the attribute, as this is much
nicer than having to specify it for all the children.
Also add support for this to wxPropertyGridPopulator, which is used by
the XRC handler.
We don't need to take wxString here, when we only ever call this
function ourselves with ASCII strings only.
This should result in slightly shorter generated code too, as the
conversion from C string to wxString now happens only in a single place
inside MaybeStore() instead of being done in all places calling
wxLogSysError() or wxLogStatus().
Just rename wxPropertyGridState to wxPropertyGridPageState and add make
wxPropertyGridXmlHandler a friend of this class to allow it to use its
protected methods.
Also remove some preprocessor checks for non-existent symbols.
Enable wxGenericValidator(int*) to work with wxRadioButton groups
when applied to the first element of the group. The value will be
the index of the selected button within the group.
Closes#24264.
Stop consuming all wxEVT_KEY_UP events in wxGrid as this broke the
standard keyboard handling: pressing and releasing "Alt" didn't give
focus to the menu bar when wxGrid had it.
This also seems completely unnecessary.
Closes#24246.
See #24247.
Restrict the input to not allow values that are greater than the
positive maximum or less than the negative minimum.
In many cases it is not necessary to allow invalid characters to be
entered. For example, if the specified range is 0 to 100.
See #24220.
This function was replaced with a more useful function taking
wxOrientation and returning wxSize in bbba3b7cb9 (Make
wxAuiToolBar::RealizeHelper() return value actually useful, 2023-12-25)
but there is some existing code using the old RealizeHelper() from its
overridden Realize(), so restore it for compatibility, even if it's
quite useless now.
See #24023, #24164, #24244.
This ensures that any messages passed to wxLogError() or other functions
are shown before wxMessageBox() that could be referring to them instead
of it happening while the message box is shown (most ports, including
wxGTK) or only after it is dismissed (wxMSW).
See #24231.
Closes#24228.
wxMSW could already be compiled for ARM with MSVC, but due to not
defining any ARCH_SUFFIX for ARM, makefile.vc used to place objectsi
and libraries to the same folder as x86 objects and libraries.
A completely different question is what kind of Windows runs on 32-bit
ARM, and whether one can run regular desktop apps on it.
This commit mimics what f69dbaa1 did for ARM64, and adapts it for ARM.
Closes#24222.
Without a DLL export declaration on this class MSVS complains about
using it as a base class for DLL-exported wxImageList, so do provide
this declaration, even if it's not normally necessary because there are
no member functions of this class in the shared library, just to avoid
the warning.
Closes#24232.
While such arrays are deprecated, we still use some of them, e.g. in
wxAUI code, so make using them slightly less painful by allowing
iterating over them naturally.
Really fix wxSetCursorEvent handling for wxAUI done in commit f608b34
(Send set cursor events whenever there is mouse movement) without
breaking the other controls, i.e. wxSplitterWindow, wxHeaderCtrl and
wxGrid.
Pass the mouse position by const reference to QtSendSetCursorEvent().
Closes#24217.
To find a page by ID currently you have to use a recursive FindWindow
(which would also look at the child Panel windows). This function allows
for finding a page by ID more elegantly.
Closes#24211.
Add new wxWebViewConfigurationChromium class which corresponds to the
"native" configuration used in the other backends and contains (some)
fields of CefSettings in this one.
Add the option 'msw.native-dialogs-pmdpi' that will always show the native msw dialogs
as per monitor dpi aware, even when there are displays with different dpi.