From e37842419ec34d48619c74854602985451f1ec32 Mon Sep 17 00:00:00 2001 From: Andreas Falkenhahn Date: Sun, 20 Sep 2015 13:51:04 +0200 Subject: [PATCH] Add dependency of generic wxDatePickerCtrl on wxComboCtrl The generic implementation requires wxComboCtrl, so pull it in if wxDatePickerCtrl is enabled. Explicitly testing for the platform here is ugly, as it duplicates the checks in wx/datectrl.h and will get out of date when/if they're changed there, but there just doesn't seem to be any other way. See #17159. --- include/wx/chkconf.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 0af9b74d9a..78e477af0b 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -1781,6 +1781,20 @@ # endif #endif /* wxUSE_CALENDARCTRL */ +#if wxUSE_DATEPICKCTRL + /* Only the generic implementation, not used under MSW and OSX, needs + * wxComboCtrl. */ +# if !wxUSE_COMBOCTRL && (defined(__WXUNIVERSAL__) || \ + !(defined(__WXMSW__) || defined(__WXOSX_COCOA__))) +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxDatePickerCtrl requires wxUSE_COMBOCTRL" +# else +# undef wxUSE_COMBOCTRL +# define wxUSE_COMBOCTRL 1 +# endif +# endif +#endif /* wxUSE_DATEPICKCTRL */ + #if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL # if !wxUSE_DATETIME # ifdef wxABORT_ON_CONFIG_ERROR