Calling out the user-defined wxThread dtor while holding gs_mutexDeleteThread
lock is a bad idea as it may result in deadlocks if the dtor deletes another
thread. Only lock the mutex directly before manipulating the data it protects.
Thanks to Neno Ganchev.
Closes#11501.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxLogChain::DoLogRecord() only called DoLogRecord() on the old logger but not
the new one when the new logger was the same object as wxLogChain itself as is
always the case for wxLogWindow. The result was that nothing was logged into
the window.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't fail loudly if the image file is not found (which can happen under Unix
if the image sample wasn't built yet or if we're not running the sample from
its own directory) but just don't create the bitmap.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove the assert added in r62101 (see #10917), it was wrong as the other
ports do not assert in this case. Instead, just ensure that the path we use
with the GTK+ native chooser is absolute.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replace all occurrences of
@interface wxFoo : NSFoo
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
<NSProtocol>
#endif
which we used for protocols new in 10.6 with just
@interface wxFoo : NSFoo wxOSX_10_6_AND_LATER(<NSProtocol>)
which looks better and simpler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Defining lfind as _lfind is not enough and a warning C4996 is still generated
by MSVC9 when the function is called.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid dozens of warnings about "unsafe" use of the standard C library
functions in 3rd party code which are harmless and which we don't care about
in any case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calls to wxStrchr(char-string, wide-char) would previously fail if wide
character couldn't be converted to a single character in the current locale
encoding. Change it to simply return NULL in this case as it's a safe and
useful generalization: a narrow string will never contain a wide character not
representable in the current locale.
Add wxUniChar::GetAsChar() to help with implementing this.
Closes#11487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix VC6 compilation: INVALID_FILE_ATTRIBUTES is not defined in its headers so
we need to do it ourselves (this was done in filefn.cpp before but part of the
code using this constant was moved to filename.cpp in r62735 so now we need to
define it here too).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxFileName from the global functions instead of using global functions in
wxFileName methods as wxFileName is the preferred API for all these
operations.
Closes#11488.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Introducing a system option for all toolbars and then ignoring it inside wx
itself is ridiculous and just goes to prove that this option itself was a
mistake. But as we have it, we should respect whatever value it's set to
(which should hopefully be 0 anyhow for most modern systems) instead of
overriding it forcefully making the mockery of the whole "option" concept.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Reset m_needsRealizing flag before calling wxToolBar::Realize() as doing this
can result in another call to wxToolbook::OnSize() itself.
Closes#11942.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In spite of the name, we need to use otmpFamilyName member of
OUTLINETEXTMETRIC struct and not otmpFaceName to get the font face name: the
latter may contain (locale-dependent, so the changes of r62708 didn't work for
non-English versions of Windows) "Italic" or "Bold" suffix while the former
does not and is what we want.
This should really fix the unit test failures, even in French locale.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxUSE_CAIRO used to be defined only in wx/cairo.h but this header wasn't
included by src/common/dcgraph.cpp so the code there was compiled as if we
were not using Cairo even when we were (thanks g++ for the warning).
Define it in wx/chkconf.h (included from wx/defs.h, i.e. always) now to ensure
that not only this bug is fixed but also that it can't happen any more.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGridCellAttr didn't provide any way to query its alignment attributes
without falling back to the (always defined) default alignment so the code in
wxGridCellNumberRenderer and similar classes simply always used right
alignment,
Add a new wxGridCellAttr::GetNonDefaultAlignment() function which allows to
retrieve the alignment defined in the attribute and use it to use right
alignment by default but allow overriding it.
Add a test to the sample showing a non right-aligned numeric cell.
Incidentally fix a long-standing bug in wxGridCell{DateTime,Enum}Renderers
which used wxRIGHT instead of wxALIGN_RIGHT and so were not aligned properly
even by default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGridCellAttr was using literal -1 to indicate "no alignment" which wasn't
immediately obvious, use a new wxALIGN_INVALID (which has the same value)
instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxFileDialog::GetPath() didn't return the value set by a previous call to
SetPath() in wxMSW version. Fix this and also implement SetPath() and
SetDirectory() methods in the generic versions in the same way as
SetFilename().
Closes#3672.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775