X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2231d4d0bc3374edd8a930bf2fabdfadcab4410..c02f03d563e895258dcac98a2ade423a1acbf7f9:/src/generic/calctrlg.cpp diff --git a/src/generic/calctrlg.cpp b/src/generic/calctrlg.cpp index effd171d21..1129f56c54 100644 --- a/src/generic/calctrlg.cpp +++ b/src/generic/calctrlg.cpp @@ -248,11 +248,11 @@ bool wxGenericCalendarCtrl::Create(wxWindow *parent, if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) { CreateYearSpinCtrl(); - m_staticYear = new wxStaticText(GetParent(), wxID_ANY, m_date.Format(_T("%Y")), + m_staticYear = new wxStaticText(GetParent(), wxID_ANY, m_date.Format(wxT("%Y")), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE); CreateMonthComboBox(); - m_staticMonth = new wxStaticText(GetParent(), wxID_ANY, m_date.Format(_T("%B")), + m_staticMonth = new wxStaticText(GetParent(), wxID_ANY, m_date.Format(wxT("%B")), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE); } @@ -296,7 +296,7 @@ void wxGenericCalendarCtrl::SetWindowStyleFlag(long style) // created/shown/hidden accordingly wxASSERT_MSG( (style & wxCAL_SEQUENTIAL_MONTH_SELECTION) == (m_windowStyle & wxCAL_SEQUENTIAL_MONTH_SELECTION), - _T("wxCAL_SEQUENTIAL_MONTH_SELECTION can't be changed after creation") ); + wxT("wxCAL_SEQUENTIAL_MONTH_SELECTION can't be changed after creation") ); wxControl::SetWindowStyleFlag(style); } @@ -335,7 +335,7 @@ void wxGenericCalendarCtrl::CreateMonthComboBox() void wxGenericCalendarCtrl::CreateYearSpinCtrl() { m_spinYear = new wxSpinCtrl(GetParent(), wxID_ANY, - GetDate().Format(_T("%Y")), + GetDate().Format(wxT("%Y")), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS | wxCLIP_SIBLINGS, @@ -520,7 +520,7 @@ bool wxGenericCalendarCtrl::SetDate(const wxDateTime& date) if ( AllowYearChange() ) { if ( !m_userChangedYear ) - m_spinYear->SetValue(m_date.Format(_T("%Y"))); + m_spinYear->SetValue(m_date.Format(wxT("%Y"))); } } @@ -800,7 +800,7 @@ wxSize wxGenericCalendarCtrl::DoGetBestSize() const + VERT_MARGIN; #ifdef __WXMAC__ // the spin control get clipped otherwise - width += 10; + width += 25; #endif wxCoord w2 = bestSizeCombo.x + HORZ_MARGIN + GetCharWidth()*6; @@ -1081,7 +1081,7 @@ void wxGenericCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) { // don't use wxDate::Format() which prepends 0s unsigned int day = date.GetDay(); - wxString dayStr = wxString::Format(_T("%u"), day); + wxString dayStr = wxString::Format(wxT("%u"), day); wxCoord width; dc.GetTextExtent(dayStr, &width, NULL); @@ -1176,7 +1176,7 @@ void wxGenericCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) break; default: - wxFAIL_MSG(_T("unknown border type")); + wxFAIL_MSG(wxT("unknown border type")); } } @@ -1500,7 +1500,7 @@ void wxGenericCalendarCtrl::OnClick(wxMouseEvent& event) break; default: - wxFAIL_MSG(_T("unknown hittest code")); + wxFAIL_MSG(wxT("unknown hittest code")); // fall through case wxCAL_HITTEST_NOWHERE: @@ -1719,7 +1719,7 @@ void wxGenericCalendarCtrl::OnChar(wxKeyEvent& event) wxDateTime target; switch ( event.GetKeyCode() ) { - case _T('+'): + case wxT('+'): case WXK_ADD: target = m_date + wxDateSpan::Year(); if ( ChangeYear(&target) ) @@ -1728,7 +1728,7 @@ void wxGenericCalendarCtrl::OnChar(wxKeyEvent& event) } break; - case _T('-'): + case wxT('-'): case WXK_SUBTRACT: target = m_date - wxDateSpan::Year(); if ( ChangeYear(&target) ) @@ -1815,7 +1815,7 @@ void wxGenericCalendarCtrl::OnChar(wxKeyEvent& event) void wxGenericCalendarCtrl::SetHoliday(size_t day) { - wxCHECK_RET( day > 0 && day < 32, _T("invalid day in SetHoliday") ); + wxCHECK_RET( day > 0 && day < 32, wxT("invalid day in SetHoliday") ); wxCalendarDateAttr *attr = GetAttr(day); if ( !attr ) @@ -1842,7 +1842,7 @@ void wxGenericCalendarCtrl::ResetHolidayAttrs() void wxGenericCalendarCtrl::Mark(size_t day, bool mark) { - wxCHECK_RET( day > 0 && day < 32, _T("invalid day in Mark") ); + wxCHECK_RET( day > 0 && day < 32, wxT("invalid day in Mark") ); const wxCalendarDateAttr& m = wxCalendarDateAttr::GetMark(); if (mark) {