From 21ead7676a8625a1225d24e82fa7af4a96b8ba68 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 7 Jan 2007 20:13:16 +0000 Subject: [PATCH] don't compile wxDataViewDateRendererPopupTransient if !wxUSE_POPUPWIN (as is always the case under Mac) (bug 1616964) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 6e22f1e1cf..f1bcc09c3c 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -495,7 +495,9 @@ wxSize wxDataViewProgressRenderer::GetSize() // wxDataViewDateRenderer // --------------------------------------------------------- -#if wxUSE_CALENDARCTRL +#define wxUSE_DATE_RENDERER_POPUP (wxUSE_CALENDARCTRL && wxUSE_POPUPWIN) + +#if wxUSE_DATE_RENDERER_POPUP class wxDataViewDateRendererPopupTransient: public wxPopupTransientWindow { @@ -543,7 +545,7 @@ void wxDataViewDateRendererPopupTransient::OnCalendar( wxCalendarEvent &event ) DismissAndNotify(); } -#endif // wxUSE_CALENDARCTRL +#endif // wxUSE_DATE_RENDERER_POPUP IMPLEMENT_ABSTRACT_CLASS(wxDataViewDateRenderer, wxDataViewCustomRenderer) @@ -584,16 +586,16 @@ bool wxDataViewDateRenderer::Activate( wxRect WXUNUSED(cell), wxDataViewListMode model->GetValue( variant, col, row ); wxDateTime value = variant.GetDateTime(); -#if wxUSE_CALENDARCTRL +#if wxUSE_DATE_RENDERER_POPUP wxDataViewDateRendererPopupTransient *popup = new wxDataViewDateRendererPopupTransient( GetOwner()->GetOwner()->GetParent(), &value, model, col, row ); wxPoint pos = wxGetMousePosition(); popup->Move( pos ); popup->Layout(); popup->Popup( popup->m_cal ); -#else +#else // !wxUSE_DATE_RENDERER_POPUP wxMessageBox(value.Format()); -#endif +#endif // wxUSE_DATE_RENDERER_POPUP/!wxUSE_DATE_RENDERER_POPUP return true; }