Use some arbitrary but relatively large width and height instead of falling
back to wxControlBase best size computation which, at least in wxGTK, simply
returns (1, 1) resulting in list control of unusably small size.
This is, of course, still far from ideal and we should really use the items to
calculate the best width but it at least allow the list control in the generic
log dialog to be shown correctly in wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Verify that we do have a valid TLW parent: even though this normally should be
always the case, it might not be when the window is being created or destroyed,
see #14355.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't process WM_ERASEBKGND if we're being destroyed. This is at best useful
and at worst harmful as we currently crash in wxStaticBox::GetClientSize() if
there is no valid TLW parent.
Closes#14355.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't check the toolkit unnecessarily, this doesn't really change anything
right now but will not break wxGTK build under MSW when support for it is
added.
Closes#14379.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This resulted in double border around wxListCtrl contents in wxOSX and almost
certainly other ports except wxGTK for which we already had an explicit
preprocessor check in the generic list control code. Remove it and simply
don't use any wxListCtrl-specific styles, including borders, for its main
window as it doesn't make any sense.
Closes#3701.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle creating nested TreeItemUnlocker objects correctly. This fixes the
problem when a wxTreeCtrl method unlocking some item is called with another
item is already unlocked, e.g. from a selection changed event handler.
Closes#14400.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxString::FromUTF8() and utf8_str() instead of directly using wxConvUTF8
as this is simpler and also works correctly in non-Unicode build (and more
efficiently in UTF-8 build as no conversion is done there).
Do not allocate -- and leak -- buffer in wxHTMLDataObject::GetDataHere(),
we're supposed to be putting data into the caller-provided buffer instead of
using our own.
Closes#14391.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Passing the window itself as IsDescendant() argument for a top level window
resulted in a NULL pointer dereference. Fix this and also simplify the
function code by not using the parent window before checking it's !NULL.
Closes#14387.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Creating a new wxString from c_str() of the old one resulted in dropping all
string data after the first embedded NUL. Fix this by using Clone() method
that exists specifically for this purpose. It also makes the code more clear.
Closes#14380.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes as the output is currently the same for all supported
PLATFORM/TOOLKIT combinations anyhow but prefer checking for PLATFORM to
prepare for the support of GTK toolkit under MSW platform.
Closes#14379.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775