]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/calctrlg.cpp
do not add files in wxDebugReport::AddFile if copy failed
[wxWidgets.git] / src / generic / calctrlg.cpp
index effd171d216f09cc9bb2fa30f8e9ce38d4d09fb9..1129f56c54be1154ae9a330c9dfec556a6329c81 100644 (file)
@@ -248,11 +248,11 @@ bool wxGenericCalendarCtrl::Create(wxWindow *parent,
     if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) )
     {
         CreateYearSpinCtrl();
     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();
                                         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);
     }
                                          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),
     // 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);
 }
 
     wxControl::SetWindowStyleFlag(style);
 }
@@ -335,7 +335,7 @@ void wxGenericCalendarCtrl::CreateMonthComboBox()
 void wxGenericCalendarCtrl::CreateYearSpinCtrl()
 {
     m_spinYear = new wxSpinCtrl(GetParent(), wxID_ANY,
 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,
                                 wxDefaultPosition,
                                 wxDefaultSize,
                                 wxSP_ARROW_KEYS | wxCLIP_SIBLINGS,
@@ -520,7 +520,7 @@ bool wxGenericCalendarCtrl::SetDate(const wxDateTime& date)
                     if ( AllowYearChange() )
                     {
                         if ( !m_userChangedYear )
                     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
                     + VERT_MARGIN;
 #ifdef __WXMAC__
         // the spin control get clipped otherwise
-        width += 10;
+        width += 25;
 #endif
 
         wxCoord w2 = bestSizeCombo.x + HORZ_MARGIN + GetCharWidth()*6;
 #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();
             {
                 // 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);
 
                 wxCoord width;
                 dc.GetTextExtent(dayStr, &width, NULL);
 
@@ -1176,7 +1176,7 @@ void wxGenericCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
                             break;
 
                         default:
                             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:
             break;
 
         default:
-            wxFAIL_MSG(_T("unknown hittest code"));
+            wxFAIL_MSG(wxT("unknown hittest code"));
             // fall through
 
         case wxCAL_HITTEST_NOWHERE:
             // fall through
 
         case wxCAL_HITTEST_NOWHERE:
@@ -1719,7 +1719,7 @@ void wxGenericCalendarCtrl::OnChar(wxKeyEvent& event)
     wxDateTime target;
     switch ( event.GetKeyCode() )
     {
     wxDateTime target;
     switch ( event.GetKeyCode() )
     {
-        case _T('+'):
+        case wxT('+'):
         case WXK_ADD:
             target = m_date + wxDateSpan::Year();
             if ( ChangeYear(&target) )
         case WXK_ADD:
             target = m_date + wxDateSpan::Year();
             if ( ChangeYear(&target) )
@@ -1728,7 +1728,7 @@ void wxGenericCalendarCtrl::OnChar(wxKeyEvent& event)
             }
             break;
 
             }
             break;
 
-        case _T('-'):
+        case wxT('-'):
         case WXK_SUBTRACT:
             target = m_date - wxDateSpan::Year();
             if ( ChangeYear(&target) )
         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)
 {
 
 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 )
 
     wxCalendarDateAttr *attr = GetAttr(day);
     if ( !attr )
@@ -1842,7 +1842,7 @@ void wxGenericCalendarCtrl::ResetHolidayAttrs()
 
 void wxGenericCalendarCtrl::Mark(size_t day, bool mark)
 {
 
 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) {
 
     const wxCalendarDateAttr& m = wxCalendarDateAttr::GetMark();
     if (mark) {