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
This commit is contained in:
Vadim Zeitlin 2007-01-07 20:13:16 +00:00
parent 8854a202f4
commit 21ead7676a

View File

@ -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;
}