This would seem to make more sense and might also fix the test failures
resulting from tiny differences in arithmetic operations when compiled with
different compilers/under different architectures.
Regenerate the test files and commit (disabled) change to the unit test
allowing to do it again in the future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The previous m_ModelNotifier became invalid but wasn't always replaced with a
valid one, resulting in a crash due to the use of an invalid pointer.
Closes#15910.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't leave currentContext set to the temporary context indefinitely,
but restore the previous one when done. It's apparent from the code that
this is how it was meant to be done.
Not doing this can result in strange, insanely hard to debug errors in
completely unrelated places, because OS X (at least < 10.9) reuses a
pool of contexts. For example, this change fixes Quicklook crashes in
file open panel on 10.8.
For detailed explanation, see the lengthy discussion at
https://code.google.com/p/chromium/issues/detail?id=90140
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This declaration conflicted with the one in the latest MinGW-W64 headers and
wasn't needed anyhow as we don't use neither the enum itself nor its members
in our code, so just remove it to fix the build in 64 bits with MinGW-W64 4.8.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Blind fix to avoid strange warnings given by OS X build slave about the ctor
being deprecated when it's defined, not used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This virtual dtor is not really needed as manager objects are static
singletons and are not destroyed via their pointer, but add a virtual dtor
just to avoid g++ warnings about its absence.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is not necessary to test for the condition which is already known to be
true or false because the code is inside the if statement checking it.
See #15893.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just avoid the unnecessary copying and also make the
signatures more consistent by adding the apparently forgotten "&" in a couple
of places.
See #15893.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes in this revision meant to prevent the closure of transient dialogs
from quitting the application (see #15880) prevented any application using AUI,
including the aui sample, from exiting as the AUI utility frames deleted
during the main frame destruction were returning false from their
IsLastBeforeExit() now.
Fix this by relaxing the check and ignoring the parent if it is already being
deleted anyhow -- in this case there is no danger of closing it accidentally.
Closes#15894.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Somewhat surprisingly, Windows can return a non-ASCII string from
gethostname(). It's not really clear what happens if the host name is not
representable in the current locale encoding at all, but at least make the
function work in case it is.
Closes#15875.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't set the pending size to (-1, valid-height) as it is always supposed to
be either fully valid or fully invalid (meaning there is no pending size
change).
Closes#15723.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
NEVER_USE_DIB is meant to be used only in conjunction with
{SOMETIMES,ALWAYS}_USE_DIB constants, use wxUSE_WXDIB elsewhere.
This is more logical and also fixes inadvertent use of NEVER_USE_DIB before it
is defined added by the changes of r75648.
See #13328.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use alpha in the combined toolbar bitmap if any of its tools has a bitmap
using alpha. This greatly improves the appearance of the automatically
generated disabled images for the tools with bitmaps using alpha.
See #15876.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Recent changes broke the handling of tools with alpha bitmaps as drawing them
on the global toolbar bitmap changes its underlying HBITMAP now, but the code
in wxToolBar didn't expect this.
Fix it by updating the HBITMAP used after every DrawBitmap() call, just in
case it changed (it doesn't cost anything to reset it if it did not).
Closes#15876.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that 32bpp bitmaps selected in wxMemoryDC use DIB for their internal
representation as GDI+ functions don't seem to work correctly with DDBs with
alpha channel.
Closes#13328.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
AssocQueryString() is more reliable and should work under all Windows
versions, including Windows 8 for which our previous implementation, reading
the values directly from the registry, had some problems.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes of r74515 didn't quite restore the old behaviour, the document was
still not being cleaned up if its OnCreate() simply returned false and not
threw an exception.
Do add cleanup in this code branch too, just duplicating what we in case of
exception (this duplication can't be easily avoided unfortunately).
Closes#15883.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is consistent with the behaviour of the native control under MSW and GTK
and generally makes sense as otherwise focus could remain on a completely
unrelated control.
Closes#15885.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
{Freeze,Thaw}() themselves are not virtual any more, so overriding them
doesn't really work and it is unnecessary to reimplement the reference
counting already done by the base class anyhow, so override the DoXXX()
versions instead.
Closes#15877.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make MyThread a friend to allow it accessing the private fields of MyFrame.
Notice that this example still remains badly written and should be ideally
entirely redone using conditions and mutexes.
See #15881.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775