]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
Added support for the wxFRAME_FLOAT_ON_PARENT style
[wxWidgets.git] / src / generic / datavgen.cpp
index 6e22f1e1cf8a2af97e65074ac0cc48d5109a142d..f1bcc09c3cf2a1ba0e7866de5a3cc2a2747a6bf1 100644 (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;
 }