Allocate our own exclusive copy of the data before modifying it, otherwise
calling ClearAlpha() would clear alpha not only for the image it was called on
but also for all the other images sharing data with it.
Don't mix signed/unsigned integers in arithmetic operations when normalizing
wxDC scale factors: variable holding GCD value should be of the same type as
variables holding devExt and logExt to avoid wrong results of /= operation
when dividend is a negative value.
Closes#16908.
This is useless at best and resulted in GTK+ warnings because we ended up
(somehow -- is there another bug lurking here?) with negative items height in
this case.
Closes#16862.
When the TZ offset specified in the RFC 822 string was equal to the local TZ
offset but the date fell in the DST period, the result was one hour off.
Fix this by converting the date to the UTC explicitly, and then converting it
back to the local TZ to ensure that the DST is taken into effect.
See #15370.
This was broken due to a wrong cast from WPARAM (i.e. 32 bit unsigned int in
Win32) value containing the ID to WORD (i.e. 16 bit unsigned short) which
truncated the ID value.
Notice that MSDN documents the requirement for the IDs to be positive, but
negative IDs seem to work, at least with Windows 7, after this fix.
Closes#16880.
Restore original list of wxPG-specific colours. wxPG-specific colours are added to the colour database when wxColourProperty is created (already existing colours are not overwritten by wxPG ones).
This is the backport of r76893 and r76894.
See #15597.
There is no need to check if referenced array with values is valid since "reference cannot be bound to dereferenced null pointer in well-defined C++ code". Moreover, conditional call of wxPGChoices::Add() methods (one with explicit parameter and one with default one) is not necessary.
This is the backport of r78343.
See #16759 (http://trac.wxwidgets.org/ticket/16759).
When wxPGProperty is loosing focus in 'invalid value' state its pending value should be stored before resetting property to 'normal' state because this operation (wxPG::OnValidationFailureReset) also resets pending value.
This is the backport of r77887.
See #16587.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This avoids failing to set the host name if the system /etc/hosts file has any
host names that wouldn't fit in our buffer: at least under Linux/glibc,
gethostname_r() returns error if any such names exist even if we don't ask for
them.
Closes#16641.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
On OS X, wxDateTime::Format() uses wxString::Replace() to
unconditionally replace locale-specific %c, %x and %X specifiers in the
format string if present. Doing so causes three wxLocale::GetInfo()
calls that are often not necessary.
Check for the presence of these specifiers before calling GetInfo().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Unicode TR #35 v26 allows for five-letter (MMMMM) or even six-letter
(EEEEEE) forms of some of the fields, but TranslateFromUnicodeFormat()
asserts in these situations.
Fix it to fall back to short forms for MMMMM and EEEEEE that are used in
practice e.g. on OS X if the user has custom formatting settings.
Consulting the table of sensible specifiers from
http://userguide.icu-project.org/formatparse/datetime, it appears these
two were the only omissions in this function.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use GET_{X,Y}_LPARAM() to extract them from the event position, which handle
negative coordinates (and coordinates can perfectly well be negative when
using multiple displays) correctly, unlike {LO,HI}WORD().
Closes#16812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add Windows-specific wxMSWDisableSettingHighDPIAware() function then can
be called before startup (i.e. wxEntry() call) to disable wxWidgets'
handling of DPI awareness. This is useful for code embedded in non-wx
applications as well as for purely wx application that are not
HiDPI-ready (although the latter has the option of forcing
dpiAware=false in the manifest).
See also https://groups.google.com/d/msg/wx-dev/Z0VpgzCY34U/f1FfPqGDppMJ
and #16116.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The size of the dialog in wxPreferencesEditor's generic implementation
is determined from notebook pages alone and doesn't account for label
size, which may be significantly longer in some languages (German,
Danish). If the labels don't fit into the window, some of the tabs are
hidden behind scroll buttons that are easy to overlook.
Improve usability by using wxNB_MULTILINE, which will use multiple rows
of tabs in this situation. This is what e.g. Internet Explorer does in
its preferences as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.
Closes#16551.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775