X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9e41db760792a4e666492d77290f4c51e9c5b19..abd474ea63667f727940a009cc3e0b23ba9f418f:/src/generic/datectlg.cpp?ds=inline diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index 2ebe9c7c4b..f45dba82ab 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -209,11 +209,15 @@ private: // functions honours wxDP_SHOWCENTURY flag. wxString GetLocaleDateFormat() const { +#if wxUSE_INTL wxString fmt = wxLocale::GetInfo(wxLOCALE_SHORT_DATE_FMT); if ( HasDPFlag(wxDP_SHOWCENTURY) ) fmt.Replace("%y", "%Y"); return fmt; +#else // !wxUSE_INTL + return wxT("x"); +#endif // wxUSE_INTL/!wxUSE_INTL } bool SetFormat(const wxString& fmt) @@ -381,8 +385,10 @@ wxSize wxDatePickerCtrlGeneric::DoGetBestSize() const wxWindowList wxDatePickerCtrlGeneric::GetCompositeWindowParts() const { wxWindowList parts; - parts.push_back(m_combo); - parts.push_back(m_popup); + if (m_combo) + parts.push_back(m_combo); + if (m_popup) + parts.push_back(m_popup); return parts; }