]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datectlg.cpp
Fix typo in last commit
[wxWidgets.git] / src / generic / datectlg.cpp
index 2ebe9c7c4b601f744a59d71ca0f734546c9b0188..f45dba82ab5e824d7f60823826e163f12657402a 100644 (file)
@@ -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;
 }