Using base class methods such as AppendBitmapColumn() resulted in
wxDataViewListCtrl::AppendColumn() being called but this function always
assumed the column was of "string" variant type -- which was, of course, false
for bitmap columns and so resulted in heap corruption (thanks to the
wonderfully type unsafe code using wxVariant) and a crash.
Get the correct type to use from the column itself now to fix this.
Closes#16008.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We kept doing it for compatibility with pre-2.5.3 versions but this was a long
time ago and we don't need this any longer.
See #2508.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling Found() without providing the second "value" argument started
generating an assert since introduction of the negated options as it reused
FoundSwitch() which can only be used for switches, i.e. options without
values.
Fix this to revert a regression since 2.8 and also add unit tests for the
different Found() overloads.
Closes#15986, #16001.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just extract the code for finding options from their names
into a separate function instead of repeating it 4 (and 5, after the next
commit changes) times.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We can receive WM_NOTIFY for other than CDN_XXX messages if we have a native
control as our immediate child (which can happen with "extra" controls) and
the LPARAM is not a pointer to OFNOTIFY at all in this case, so don't try to
use it as such.
This fixes a crash when adding a "bare" extra control, see #16003.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMSW automatically extended wxTextCtrl length limit beyond the tiny standard
32KB when it was exceeded, but part of the text being appended into the
control was lost when doing it.
Fix this by retrying insertion after extending the limit.
Closes#15980.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do it only once now that it's used in 3 different places (it recently started
to be used in src/msw/anybutton.cpp as well) instead of defining it thrice.
This also fixes MinGW build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is an incompatible change compared to 2.8 which can make the existing
code crash and it also goes against the usual rule that the windows are never
owned by sizers, only other windows.
Closes#15698.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Owner drawn buttons were not drawn in the same way as normal ones when they
were disabled, use Win32 DrawState() to do it now to achieve the correct
appearance.
Closes#11746.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Appending the names of all fonts could take a significant amount of time if
there were a lot of them, freeze the controls while doing it to speed it up.
Closes#15978.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Starting to watch a path, stopping to watch it, starting to watch it again and
stopping again resulted in a crash in wxMSW wxFileSystemWatcher implementation
because the watcher object wasn't kept artificially kept alive when it was
stopped for the second time. This happened because our way of keeping it alive
was to store it in a hash map indexed by path, but if a watcher for the same
path (added there when this path was first unwatched) was already present in
the map, the watcher wasn't added to it and not kept alive.
Fix this by using a vector instead of a map. We obviously sacrifice quick
access to it by path but at least this doesn't crash any more. And we could
actually still use a map, just indexed by the (unique) pointer to the object
stored inside wxSharedPtr itself, and not its path. But a vector might be a
more efficient data structure in practice, if we keep it from becoming too big
as we should try to do by triggering artificial port completions when a watch
is removed.
At any rate, at least the crash is fixed for now.
Closes#15995.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Attempts to wait for thread termination after wxTheApp was destroyed resulted
in an error in wxMSW since 2.9.something whereas it used to work in 2.8 and
also generally makes sense to be allowed. So do make this work again by
falling back to the simple non-interruptible wait for thread if we don't have
the application object any more.
Closes#13391.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Due to a typo when copy-and-pasting code wrong control was being updated.
It would be better to have a function updating the given control from the
given flag, of course, but for now just fix the bug.
Closes#15990.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't crash by accessing an out of bands array element if the format string
index had been set to an invalid value, just use the default (decimal) format
in this case.
Closes#15984.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just use symbolic constants instead of hard coded magical
constants. The code is still difficult to understand but slightly better than
before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make sure that OnInit() is called before MacReopenApp(). This is
normally the case, but it is possible for it to be called as the first
thing. This can happen when OS X restores running apps when starting a
new user session. Apps that were hidden (dock only) when the previous
session terminated are only restored in a limited, resources-saving way
- the event loop is running, but didn't call anything in the app
delegate yet. When the user clicks the icon,
applicationShouldHandleReopen: is called, but we didn't call OnInit()
yet. In this case, we shouldn't call MacReopenApp(), but should proceed
with normal initialization.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775