]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datectlg.cpp
use wxLanguageInfo::GetLocaleName() instead of Desscription which can't be passed...
[wxWidgets.git] / src / generic / datectlg.cpp
index 7648284451e3f69aaed31bdde8430cd00d3be375..6527a991b64b17b482d919d0c17c4031e09327b5 100644 (file)
@@ -113,7 +113,7 @@ public:
 
         wxPoint yearPosition = yearControl->GetPosition();
 
-        SetFormat(wxT("%x"));
+        SetFormat("%x");
 
         width = yearPosition.x + yearSize.x+2+CALBORDER/2;
         if (width < calSize.x-4)
@@ -181,7 +181,7 @@ public:
 
         if ( !s.empty() )
         {
-            pDt->ParseFormat(s, m_format);
+            pDt->ParseFormat(s.c_str(), m_format);
             if ( !pDt->IsValid() )
                 return false;
         }
@@ -199,10 +199,10 @@ public:
         cev.SetEventObject(datePicker);
         cev.SetId(datePicker->GetId());
         cev.SetDate(dt);
-        GetParent()->ProcessEvent(cev);
+        datePicker->GetEventHandler()->ProcessEvent(cev);
 
         wxDateEvent event(datePicker, dt, wxEVT_DATE_CHANGED);
-        datePicker->GetParent()->ProcessEvent(event);
+        datePicker->GetEventHandler()->ProcessEvent(event);
     }
 
 private:
@@ -259,7 +259,7 @@ private:
         return m_combo->GetParent()->HasFlag(flag);
     }
 
-    bool SetFormat(const wxChar *fmt)
+    bool SetFormat(const wxString& fmt)
     {
         m_format.clear();
 
@@ -419,7 +419,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
 
     m_popup->SetDateValue(date.IsValid() ? date : wxDateTime::Today());
 
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
     return true;
 }
@@ -515,7 +515,7 @@ void wxDatePickerCtrlGeneric::OnText(wxCommandEvent &ev)
 {
     ev.SetEventObject(this);
     ev.SetId(GetId());
-    GetParent()->ProcessEvent(ev);
+    GetParent()->GetEventHandler()->ProcessEvent(ev);
 
     // We'll create an additional event if the date is valid.
     // If the date isn't valid, the user's probably in the middle of typing