X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3103e8a97e834e9793f0eb149aa82a99fd64ef9a..fbc1d11bde64cc1cc826fecea7acf99ff288ca2d:/src/generic/calctrl.cpp diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index dc5004f9d6..854e28ed00 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "calctrl.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -755,9 +751,9 @@ wxSize wxCalendarCtrl::DoGetBestSize() const height += m_spinYear->GetBestSize().y; - wxCoord w2= m_comboMonth->GetBestSize().x + HORZ_MARGIN + GetCharWidth()*6; - if (width < w2) - width=w2; + wxCoord w2 = m_comboMonth->GetBestSize().x + HORZ_MARGIN + GetCharWidth()*6; + if (width < w2) + width = w2; } if ( !HasFlag(wxBORDER_NONE) ) @@ -840,12 +836,11 @@ void wxCalendarCtrl::RecalcGeometry() wxClientDC dc(this); dc.SetFont(GetFont()); - int day = 10; // determine the column width (weekday names are not necessarily wider // than the numbers (in some languages), so let's not assume that they are) m_widthCol = 0; - for ( day = 10; day <= 31; day++) + for ( int day = 10; day <= 31; day++) { wxCoord width; dc.GetTextExtent(wxString::Format(wxT("%d"), day), &width, &m_heightRow); @@ -979,7 +974,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) dc.DrawRectangle(0, y, GetClientSize().x, m_heightRow); bool startOnMonday = (GetWindowStyle() & wxCAL_MONDAY_FIRST) != 0; - for ( size_t wd = 0; wd < 7; wd++ ) + for ( int wd = 0; wd < 7; wd++ ) { size_t n; if ( startOnMonday ) @@ -1019,7 +1014,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) wxLogDebug("painting week %d at y = %d\n", nWeek, y); #endif - for ( size_t wd = 0; wd < 7; wd++ ) + for ( int wd = 0; wd < 7; wd++ ) { if ( IsDateShown(date) ) { @@ -1419,9 +1414,9 @@ void wxCalendarCtrl::OnClick(wxMouseEvent& event) case wxCAL_HITTEST_HEADER: { - wxCalendarEvent event(this, wxEVT_CALENDAR_WEEKDAY_CLICKED); - event.m_wday = wday; - (void)GetEventHandler()->ProcessEvent(event); + wxCalendarEvent eventWd(this, wxEVT_CALENDAR_WEEKDAY_CLICKED); + eventWd.m_wday = wday; + (void)GetEventHandler()->ProcessEvent(eventWd); } break; @@ -1783,4 +1778,3 @@ wxCalendarCtrl::GetClassDefaultAttributes(wxWindowVariant variant) } #endif // wxUSE_CALENDARCTRL -