From: Włodzimierz Skiba Date: Mon, 16 Oct 2006 12:37:29 +0000 (+0000) Subject: Allow building without calendar. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8d0ca2928ba442c8873263672ff7f9541be0c3f0?ds=inline Allow building without calendar. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 73aa09f1ae..771dab7a47 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -29,6 +29,7 @@ #include "wx/dcclient.h" #include "wx/timer.h" #include "wx/settings.h" + #include "wx/msgdlg.h" #endif #include "wx/stockitem.h" @@ -494,6 +495,8 @@ wxSize wxDataViewProgressRenderer::GetSize() // wxDataViewDateRenderer // --------------------------------------------------------- +#if wxUSE_CALENDARCTRL + class wxDataViewDateRendererPopupTransient: public wxPopupTransientWindow { public: @@ -540,6 +543,8 @@ void wxDataViewDateRendererPopupTransient::OnCalendar( wxCalendarEvent &event ) DismissAndNotify(); } +#endif // wxUSE_CALENDARCTRL + IMPLEMENT_ABSTRACT_CLASS(wxDataViewDateRenderer, wxDataViewCustomRenderer) wxDataViewDateRenderer::wxDataViewDateRenderer( const wxString &varianttype, @@ -579,13 +584,16 @@ bool wxDataViewDateRenderer::Activate( wxRect WXUNUSED(cell), wxDataViewListMode model->GetValue( variant, col, row ); wxDateTime value = variant.GetDateTime(); +#if wxUSE_CALENDARCTRL 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 + wxMessageBox(value.Format()); +#endif return true; } @@ -624,7 +632,7 @@ void wxDataViewColumn::SetSortable( bool WXUNUSED(sortable) ) } bool wxDataViewColumn::GetSortable() -{ +{ // TODO return false; }