The code was buggy (e.g. it didn't update the last item correctly after
executing "Append many items" menu command) and seems to be unnecessary.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't override HAVE_TR1_TYPE_TRAITS detected by configure with
HAVE_TYPE_TRAITS detected by clang __has_include() as the latter is less
reliable and can return true even when the header is not actually usable, as
it happens with g++ 4.8 <type_traits> in non C++11 mode.
Closes#15915.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Provide a built-in alternative for using external files for the bitmaps in
SVG: allow embedding them inside the SVG itself using "data:" URI.
And also allow to define custom handlers to make the behaviour even more
flexible.
Closes#15968.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Loss of precision when converting floating point numbers to text and back
could result in several problems, notably comparing a valid value with the
minimum could fail after a round trip through wxSpinCtrl.
Fix this by using a specialization of NumericValidation() handling floating
point values specially and correctly.
Closes#15625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was possible to call SetAttribute() to change this attribute value but not
to get it back. Override DoGetAttribute() to also allow the latter.
See #15625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document the somewhat counter intuitive (but difficult to change) behaviour of
the splitter when both sash position and gravity are set.
See #15996.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Memory allocated by wxFindFirstFile() was only freed when no more files could
be found by wxFindNextFile(), resulting in a memory leak if the iteration was
never finished.
Closes#4631.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxPGProperty::GetItemAtY() uses its input/output "nextItem" parameter, so it
must be initialized before calling it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replace wxASSERT() with wxCHECK_MSG() to ensure that we don't read beyond the
end of the array even if we are given an invalid index.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Delete the pointer before returning from the function if we don't pass its
ownership to CGDataProviderCreateWithData().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxScopedPtr to make memory management simpler and to ensure that all
pointers allocated in this function are deleted: this wasn't the case when we
returned false earlier due to the MO file being invalid.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code was written to use the default resolution if getting it from the
printer failed but only handled failure of PMPrinterGetOutputResolution() and
not of PMSessionGetCurrentPrinter() itself.
Use default resolution if obtaining it failed for any reason (alternative
could be to return error if obtaining it failed for any return...).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't return invalid column pointer if it was freed because actually appending
it to the control failed.
Fixes corresponding Coverity warnings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When not using compiler TLS support (which is the default now), TLS variable
itself needs to be initialized and user-defined code in the global objects
ctor could be called before this happened, resulting in using uninitialized
CRITICAL_SECTION under Windows and a crash.
Fix this by wrapping global wxThreadSpecificInfo itself in an accessor
function ensuring that it is always initialized before use.
Notice that this required adding wxTLS_TYPE_REF() as wxTLS_TYPE() itself can't
be used for the function return value (__thread or similar can only be used on
the variables).
Closes#16009.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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