The changes of r70066 improved the layout for icon and small icon modes but
broke it for the list mode if items had icons because the item width should
account for the icon as well in this case. Simply disable the code added in
this revision when in list mode, we don't need to do anything then anyhow as
the layout already worked correctly for it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We could crash when deleting a column after switching to report view from icon
view. As deleting a column works just fine under MSW in this case, make it
work in the generic version as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions are more convenient than directly testing for styles and are
already used outside wxWidgets do make them officially part of the public API.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use NSDatePicker to implement both of these controls. Almost all of
wxDatePickerCtrl styles are not supported in the native version but the basic
functionality does work and looks much better than the generic version (which
is still available as wxDatePickerCtrlGeneric if needed) under Mac.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions will be used in the upcoming native implementations of
wxDatePickerCtrl and wxTimePickerCtrl but could also be reused elsewhere in
wxOSX/Cocoa, notably in wxDataViewCtrl where strange ad hoc code is currently
used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make it possible to set the picker styles and set its range and not only the
current value.
Also log the events generated by it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Apparently some code expects to be able to call wxRegion::GetWXHRGN() even on
an invalid wxRegion. Return NULL in this case instead of crashing.
This fixes crash on startup of the widgets sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The webview library wasn't linked in correctly when using MSW bakefile
presets. Fix this by adding the corresponding <sys-lib> for it (this needs to
be done for MSW only, under Unix it's handled by wx-config).
Closes#13789.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Apparently we need this bogus "inline" for g++ < 3.4 but there is no reason to
use it for the other compilers and this results in linking errors with e.g.
MSVC, so remove it.
Closes#13775.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changed wxSlider::GetLabelsSize to let the widthMin and widthMax values contain the width of what the minimum (always on the left/top) and maximum (always on the right/bottom) _label_ will contain. This is not the same as the minimum and maximum _value_ in case of using wxSL_INVERSE.
Also don't swap the position of the min/max labels in a horizontal slider with wxSL_INVERSE (just how the labels already stay in place in a vertical slider, regardless of wxSL_INVERSE usage), nor their width.
Regression since r65941.
Fixes#13416.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While docs/tech/tn0011.txt does document this, it's still too simple to forget
to update version.bkl, as my experience shows, so add a reminder to the script
itself too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method allows to configure the initial directory to be shown when
browsing for files in an initially empty wxFileDirPickerCtrl.
It is also available for wxDirPickerCtrl but is less useful there.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxScopedPtr in wxGenericFileDirButton to ensure that the dialog created by
it is always destroyed, even if an exception is thrown while showing the
dialog or while processing the event we generate after showing it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The input data is never modified so should be const (it is also documented as
being const and actually is const in the other ports).
Closes#13776.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As the dialog is not shown yet at this moment, activating it didn't work
correctly and the dialog didn't get the focus when it was shown later.
Fix this by preventing ::SetWindowPos() from activating it, which it does by
default.
Closes#13765.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Log the original and new paths of the rename event to help debugging the extra
modification events detected during the buildbot builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The last check in this test couldn't pass under MSW as it relied on the (long)
line of text being wrapped but the style used for the control prevented this
from happening. Not sure how could it have ever worked before but in any case
removing wxTE_DONTWRAP does make the test pass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changing the text of the selected wxChoice (or wxComboBox, as it derives from
it in wxMSW) item made it unselected. Fix this by explicitly restoring the
selection to the item if needed.
Closes#13769.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Checking M_REGION is not enough as the region can be invalid (meaning
m_refData dereferenced inside M_REGION is NULL itself) and not just not
initialized, so it resulted in crashes and not just the expected assert
failure when wxRegion::Offset() was called for an invalid region.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
IsEnabled() returns false if the parent window is disabled and calling
Enable() does not help with this, so we could keep trying and trying to enable
the window unsuccessfully if it was reenabled while its parent was disabled,
resulting in a never-ending stream of EVT_IDLE events.
Closes#13767.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
At least for some versions of Windows (Server 2003 with classic look and feel)
the native checkboxes auto wrapped the label as it wrongly considered that the
width we specified for it was not big enough. Compensate for this by making
the checkbox wider -- this is just a hack but still better than corrupting the
checkbox display.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As we use AC_ARG_ENABLE() instead of WX_ARG_ENABLE() for it, we need to call
AC_MSG_RESULT() explicitly or its value is never reported and configure output
is corrupted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxCRIT_SECT_DECLARE_MEMBER/wxCRIT_SECT_LOCKER macros which expand to
nothing in wxUSE_THREADS==0 case instead of using wxCriticalSection[Locker]
classes which are not defined then.
Also explicitly include wx/thread.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This member variable could be used before it was initialized as
OnTLPChanging() was called from Create() before Init2(), where m_tlp was
assigned NULL, was called.
Closes#13552.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If the wxDataViewCtrl control was destroyed while an inline editor
control was still active, it wouldn't get destroyed in the right order
and the ~wxWindow assert about unpopped event handlers would be
triggered.
Fix this by popping the handler as one of the first things in
wxDataViewRendererBase destructor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When ScrollTo() or EnsureVisible() was called in the generic
wxDataViewCtrl implementation with unspecified column, horizontal scroll
position was reset to left-most position, which doesn't make much sense.
Instead, leave horizontal position unchanged in this case and only
change it when explicitly requested.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775