Also free internal handlers when wxMSW wxStaticBitmap is destroyed.

r76141 fixed the resource leak when wxStaticBitmap image was replaced by
another one but the leak still happened at the end, when the wxStaticBitmap
was destroyed.

Fix it there as well in the same way.

Closes #16068.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
for GTK+ 3.6 and later, invalidate cached best size when GTK's style cache is updated, see #16088


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
build fixes for wxUniversal

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Disable the use of new style wxDirDialog under Vista.

IFileDialog-based dialog has a bug making it return a wrong path sometimes
under Vista, disable its use there to avoid it.

Closes #16005.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
update for GTK3

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add margin to the right of the message in wxGenericProgressDialog.

For some reason the border was used only on the left side but not on the right
one, resulting in the ugly looking label flush to the right dialog border if
it was long enough.

Closes #16094.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "MultiProcessorCompilation" instead of explicit /MP in MSVS projects.

Use the user-visible option instead of the command line option which is now
hidden in the IDE.

Closes #16093.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Small refactoring in wxFileSystemWatcher MSW implementation.

Make wxIOCPService::GetStatus() smarter about its return value, it makes sense
to encapsulate the convention used to indicate the thread exit condition
inside wxIOCPService class itself instead of sharing it between it
wxIOCPThread itself.

It will also make it easier to detect more detailed error conditions in this
code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix handling deletion of watched directory in MSW wxFileSystemWatcher.

Don't log an incomprehensible error when the watched directory itself is
deleted, but generate wxFSW_EVENT_DELETE for it. This is consistent with the
behaviour under Unix and generally more useful.

Closes #13294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wxFileSystemWatcher::RemoveAll() to actually work.

We need to call DoRemove() on all watcher objects to really remove them, just
removing our record of them was not enough and e.g. resulted in errors if we
tried to re-add a previously watched path again.

Closes #15531.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix toolbar repainting after deleting a tool in wxMSW.

The toolbar was in an inconsistent state when recalculating the sizes of the
separators used as placeholders for the controls and stretch spacers as the
tool was already deleted from the native toolbar but still present in wx
internal toolbar data and this resulted in discrepancies between the indices
in the native and wx toolbars.

Fix this by specially marking the already deleted but not yet removed tool and
ignoring it during the recalculations.

This makes the old, and only partially successful, attempt to work around this
bug in DoDeleteTool() unnecessary and so the code is actually simplified by
this change.

Closes #16095.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix reentrancy issues in wxMSW wxTextCtrl max length handling code.

The changes of r75936 didn't work correctly if the handler of wxEVT_TEXT in
some text control modified a (potentially) different text control, as the same
global variable was reused with disastrous results. Avoid this by keeping a
stack of insertion lengths instead.

Additionally, fix another problem in r75936 which used 0 as a special marker
for the insertion length, which result in redoing each insertion of empty
string (which is another word for Remove()) twice unnecessarily, by using -1
instead.

Closes #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Close monitoring thread handles as soon as possible in wxMSW.

Don't leave the handles of all threads used for monitoring the child processes
open until the main process termination, rather close them as soon as the
monitored process terminates.

This ensures that we don't accumulate potentially unbounded number of open
handles if we keep launching new child processes. An even better idea would be
to actually use a single thread for monitoring all of them, but this fix is
much simpler and should fix the most acute problem for now.

Closes #16123.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't emit wxEVT_TEXT in wxMSW's wxTextCtrl::SetFont().

Native text control sends EN_CHANGE when the font changes, producing a
wxEVT_TEXT event as if the user changed the value. This is not the case,
so supress the event.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
OS X: fix wxFileDialog::SetupExtraControls()'s sandbox test.

OS X 10.9 (possibly earlier) don't have nil contentView in NSSavePanel
anymore, a NSRemoteView instance is used. The wx code that follows this
test still crashes under sandbox, though, so update the check to use the
APP_SANDBOX_CONTAINER_ID environment variable, which is only set when
running under the sandbox.

This is just another quick fix for the existing uncomfortably long-lived
sandbox crash hotfix, not a proper solution.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Revert "Don't emit wxEVT_TEXT in wxMSW's wxTextCtrl::SetFont()."

This reverts accidentally committed r76207.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix use of expander in non left most position in wxDataViewCtrl.

Correct the expander rectangle definition to work when the expander column
left boundary is not 0, i.e. if the expander column is not the left most one.

Closes #16131.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix clicking on activatable toggle column in generic wxDataViewCtrl.

Call PrepareForItem() after calling GetLineStart() as the latter calls
PrepareForItem() for other items internally, undoing the effects of the first
call.

Closes #16132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Another PrepareForItem()-related fix in generic wxDataViewCtrl.

This fix is similar to the previous commit but more speculative, as we
currently don't have a bug scenario for it. Still, it seems to be wrong to
call PrepareForItem() just before GetLineStart() which undoes its effect, so
exchange the order of the calls.

See #16132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid overflows when calculating metafile coordinates in wxMSW.

Use MulDiv() instead of naive multiplication followed by division as this
could overflow, and did when large paper sizes were used in print preview.

Closes #16138.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775