No real changes, just use DST_OFFSET constant instead of 3600 and remove the
"FIXME" comments as we're not actually going to fix anything here but will
just continue to assume 1 hour shift for DST.
This reverts commit aaddf6be7f as it broke
handling of dates when local time zone is BST, whose offset not counting DST
is 0, as for UTC, but which still should be handled as local timezone,
see #17220.
With the current wxDateTime handling of time zones, FromTimezone(Local)
doesn't make much sense anyhow, so abandon attempts to try making it work as
to really do it we need to specify the time zone being converted from too, as
explained in the second point of #10445.
See #16585.
Use wxPrintf() and remove the c_str() call which is redundant with it instead
of using printf() which can't be used with non-POD objects like wxCStrData
returned by c_str() in wx 3.0+.
Even if <xlocale.h> exists, the whole API that wx requires (specifically
strtod_l() and similar) may not be available. This is the case
on e.g. OpenIndiana (SunOS).
On OpenIndiana (SunOS) the result is different when compiled as C,
and the C++ result is what matters to wxWidgets.
Fixes compilation of src/common/strconv.cpp on OpenIndiana.
Apparently, DirectWrite fonts can be created only from TrueType fonts and
therefore only such fonts can be used with Direct2D-based wxGraphicsContext.
When unsuported GDI font is passed to CreateFont() then no graphics font is
created and this unsuccessful attempt is signalled by returning
wxNullGraphicsFont. This null object can be used in e.g. wxGC::SetFont()
to check if font was actually created.
See #17790.
Since the changes of c9a458bfe8 ("Use Win32
::CommandLineToArgvW() to tokenize command line"), this is not guaranteed any
more as this Win32 function doesn't necessarily ensure it under older MSW
versions such as XP.
Just use "argc" explicitly instead of relying on this in wxCmdLineArgsArray to
fix crashing under XP.
Drawing on the Cairo surface itself can give invalid results when source and destination regions overlap.
To avoid this problem we have to copy actual source surface to the temporary one and use this copy in drawing operations.
Closes#17666.
In order to examine real colors of pixels we need to have unmodified (aliased) edges between regions drawn with different colors.
For for wxDCs backed by wxGraphicsContext (e.g. under wxGTK3) antialiasing is enabled by default and to prevent falsifying pixel colors we have to disable it prior to drawing operations.
See #17666.
Under wxGTK3 default color depth for wxBitmap is 24 bpp and therefore wxAlphaPixelData cannot be used to get access to wxBitmap's internal data in this case.
See #17666.
One of the wxMarkupParser tests expects "&" to map to "&&" however
this, purposefully, is not the case any longer since
60bd6842e4. Fix by changing the expected
result to contain a single ampersand instead of double.
Fix regression introduced in cb2474f where Wrap() stopped treating
negative widthMax as documented, i.e. not doing any wrapping at all and
only respecting newlines.
The typo resulted in, depending on compiler used, an error ("undeclared
identifier") or warning. Fix by using the intended name.
Regression since 5552351393.
The original ticket #9563 about children inside a wxScrolledWindow being
scrolled, instead of just handling the mouse click (e.g. by toggling the
checkbox), was fixed some time ago when the child was a direct child of
wxPanel. However the same problem still existed when the child was inside
another window which was itself a child of wxPanel.
Generalize the fix by ignoring the child focus event if any of the window
ancestors passes our check instead of checking only the window itself.
Closes#17154.
Handle "&" in exactly the same way as "&" in wxMarkupParser, i.e. do not
map the former to "&&" to prevent it from being interpreted as a mnemonic as
this is incompatible with using markup for anything but the control labels,
e.g. for wxDataViewCtrl items text, in which mnemonics are not recognized.
And even when using markup for control labels, it was a questionable decision
as it's really not clear at all why should the XML entity and the raw
character itself be handled differently.
Also split wxMarkupText into two classes, wxMarkupText that handles
mnemonics in the markup (which is typically a label) and a very
similar, but not derived, wxItemMarkupText that handles mnemonics-less
markup for list etc. items, uses DrawItemText() and supports
ellipsizing.
Illustrate the use of ampersands in the dataview sample.
wxAcceleratorEntry::ParseAccel() incorrectly assumes that every
single-character accelerator must be a direct character code. But
that's not true, a human-friendly name for a key (e.g. "Down") may be
translated with a single character in some languages (or because a
translator decides to use a Unicode arrow…).
Amend the test to check if the character is a 7bit ASCII one. That
would be extremely unlikely to be a translation.
This method is only used, and defined, when using rich edit controls, so don't
declare it if wxUSE_RICHEDIT==0.
This should fix a link error in this build variant.
Closes https://github.com/wxWidgets/wxWidgets/pull/452
Starting with OS X 10.10, rich text is automatically tightened if it
doesn't fit and needs to be ellipsized, in an effort to fit more text
on screen. This is not desirable in wxDataViewCtrl where the cells may
display texts of varying lengths, some tightened and some not.
Explicitly disable this functionality to have consistent appearance.
This works around GTK+ critical error messages that we get otherwise with GTK+
since the change done in its commit 7401794de6b084fea469af297b7c144724b8492c
which appeared in 3.22.8 release and is still present in the latest version.
These messages happen because gtk_combo_box_popdown() ends up being called
during the widget destruction if it's still shown, so just hide the combobox
before destroying it to avoid them.
Closes https://github.com/wxWidgets/wxWidgets/pull/449
Don't apply at best unnecessary, and actually harmful, as it uses a wrong
conversion, fn_str() when calling wxRmDir() which takes wxString.
Update unit tests to check that wxRmdir() now works with non-ASCII filenames
too.
Closes#17644.
Assert and return false instead, this is more developer-friendly.
Add unit tests to check that these functions really work as expected when
called on a closed file.
Closes#17828.
It would arguably be even better to use different derived classes for
different operations instead of doing everything inside a single class with a
big "switch", but this would require more time, so for now at least make the
code slightly more understandable and maintainable.
This also results in using useful names for the files being saved by default
instead of just "SVG Test #" used before.
This makes it too small when using GTK+ 3.22, resulting in GTK+ debug messages
about not having enough space for it -- and is, of course, wrong anyhow, as we
should always let controls determine their own best size.
Get rid of the panel and the sizer, neither of them are necessary when we have
a single control (wxNotebook in this case) taking up the entire frame client
area.
Just use wxLogStatus() instead of manually setting the status text, as this
also allows to get rid of wxUSE_STATUSBAR checks (wxLogStatus() is always
declared and just does nothing in this case).