TRUE and FALSE, not true and false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -376,7 +376,7 @@ void wxCalendarCtrl::EnableMonthChange(bool enable)
|
|||||||
|
|
||||||
bool wxCalendarCtrl::SetDate(const wxDateTime& date)
|
bool wxCalendarCtrl::SetDate(const wxDateTime& date)
|
||||||
{
|
{
|
||||||
bool retval = false;
|
bool retval = FALSE;
|
||||||
|
|
||||||
bool sameMonth = m_date.GetMonth() == date.GetMonth(),
|
bool sameMonth = m_date.GetMonth() == date.GetMonth(),
|
||||||
sameYear = m_date.GetYear() == date.GetYear();
|
sameYear = m_date.GetYear() == date.GetYear();
|
||||||
@@ -386,7 +386,7 @@ bool wxCalendarCtrl::SetDate(const wxDateTime& date)
|
|||||||
if ( sameMonth && sameYear )
|
if ( sameMonth && sameYear )
|
||||||
{
|
{
|
||||||
// just change the day
|
// just change the day
|
||||||
retval = true;
|
retval = TRUE;
|
||||||
ChangeDay(date);
|
ChangeDay(date);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -398,7 +398,7 @@ bool wxCalendarCtrl::SetDate(const wxDateTime& date)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// change everything
|
// change everything
|
||||||
retval = true;
|
retval = TRUE;
|
||||||
m_date = date;
|
m_date = date;
|
||||||
|
|
||||||
if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) )
|
if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) )
|
||||||
@@ -469,15 +469,15 @@ void wxCalendarCtrl::SetDateAndNotify(const wxDateTime& date)
|
|||||||
|
|
||||||
bool wxCalendarCtrl::SetLowerDateLimit(const wxDateTime& date /* = wxDefaultDateTime */)
|
bool wxCalendarCtrl::SetLowerDateLimit(const wxDateTime& date /* = wxDefaultDateTime */)
|
||||||
{
|
{
|
||||||
bool retval = true;
|
bool retval = TRUE;
|
||||||
|
|
||||||
if ( !(date.IsValid()) || ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : true ) )
|
if ( !(date.IsValid()) || ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : TRUE ) )
|
||||||
{
|
{
|
||||||
m_lowdate = date;
|
m_lowdate = date;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
retval = false;
|
retval = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@@ -485,15 +485,15 @@ bool wxCalendarCtrl::SetLowerDateLimit(const wxDateTime& date /* = wxDefaultDate
|
|||||||
|
|
||||||
bool wxCalendarCtrl::SetUpperDateLimit(const wxDateTime& date /* = wxDefaultDateTime */)
|
bool wxCalendarCtrl::SetUpperDateLimit(const wxDateTime& date /* = wxDefaultDateTime */)
|
||||||
{
|
{
|
||||||
bool retval = true;
|
bool retval = TRUE;
|
||||||
|
|
||||||
if ( !(date.IsValid()) || ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : true ) )
|
if ( !(date.IsValid()) || ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : TRUE ) )
|
||||||
{
|
{
|
||||||
m_highdate = date;
|
m_highdate = date;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
retval = false;
|
retval = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@@ -501,18 +501,18 @@ bool wxCalendarCtrl::SetUpperDateLimit(const wxDateTime& date /* = wxDefaultDate
|
|||||||
|
|
||||||
bool wxCalendarCtrl::SetDateRange(const wxDateTime& lowerdate /* = wxDefaultDateTime */, const wxDateTime& upperdate /* = wxDefaultDateTime */)
|
bool wxCalendarCtrl::SetDateRange(const wxDateTime& lowerdate /* = wxDefaultDateTime */, const wxDateTime& upperdate /* = wxDefaultDateTime */)
|
||||||
{
|
{
|
||||||
bool retval = true;
|
bool retval = TRUE;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
( !( lowerdate.IsValid() ) || ( ( upperdate.IsValid() ) ? ( lowerdate <= upperdate ) : true ) ) &&
|
( !( lowerdate.IsValid() ) || ( ( upperdate.IsValid() ) ? ( lowerdate <= upperdate ) : TRUE ) ) &&
|
||||||
( !( upperdate.IsValid() ) || ( ( lowerdate.IsValid() ) ? ( upperdate >= lowerdate ) : true ) ) )
|
( !( upperdate.IsValid() ) || ( ( lowerdate.IsValid() ) ? ( upperdate >= lowerdate ) : TRUE ) ) )
|
||||||
{
|
{
|
||||||
m_lowdate = lowerdate;
|
m_lowdate = lowerdate;
|
||||||
m_highdate = upperdate;
|
m_highdate = upperdate;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
retval = false;
|
retval = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@@ -558,16 +558,16 @@ bool wxCalendarCtrl::IsDateShown(const wxDateTime& date) const
|
|||||||
|
|
||||||
bool wxCalendarCtrl::IsDateInRange(const wxDateTime& date) const
|
bool wxCalendarCtrl::IsDateInRange(const wxDateTime& date) const
|
||||||
{
|
{
|
||||||
bool retval = true;
|
bool retval = TRUE;
|
||||||
// Check if the given date is in the range specified
|
// Check if the given date is in the range specified
|
||||||
retval = ( ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : true )
|
retval = ( ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : TRUE )
|
||||||
&& ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : true ) );
|
&& ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : TRUE ) );
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const
|
bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const
|
||||||
{
|
{
|
||||||
bool retval = false;
|
bool retval = FALSE;
|
||||||
|
|
||||||
if ( !(IsDateInRange(*target)) )
|
if ( !(IsDateInRange(*target)) )
|
||||||
{
|
{
|
||||||
@@ -576,7 +576,7 @@ bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const
|
|||||||
if ( target->GetYear() >= GetLowerDateLimit().GetYear() )
|
if ( target->GetYear() >= GetLowerDateLimit().GetYear() )
|
||||||
{
|
{
|
||||||
*target = GetLowerDateLimit();
|
*target = GetLowerDateLimit();
|
||||||
retval = true;
|
retval = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -588,7 +588,7 @@ bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const
|
|||||||
if ( target->GetYear() <= GetUpperDateLimit().GetYear() )
|
if ( target->GetYear() <= GetUpperDateLimit().GetYear() )
|
||||||
{
|
{
|
||||||
*target = GetUpperDateLimit();
|
*target = GetUpperDateLimit();
|
||||||
retval = true;
|
retval = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -598,7 +598,7 @@ bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
retval = true;
|
retval = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@@ -606,11 +606,11 @@ bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const
|
|||||||
|
|
||||||
bool wxCalendarCtrl::ChangeMonth(wxDateTime* target) const
|
bool wxCalendarCtrl::ChangeMonth(wxDateTime* target) const
|
||||||
{
|
{
|
||||||
bool retval = true;
|
bool retval = TRUE;
|
||||||
|
|
||||||
if ( !(IsDateInRange(*target)) )
|
if ( !(IsDateInRange(*target)) )
|
||||||
{
|
{
|
||||||
retval = false;
|
retval = FALSE;
|
||||||
|
|
||||||
if ( target->GetMonth() < m_date.GetMonth() )
|
if ( target->GetMonth() < m_date.GetMonth() )
|
||||||
{
|
{
|
||||||
@@ -858,7 +858,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
wxDateTime ldpm = wxDateTime(1,m_date.GetMonth(), m_date.GetYear()) - wxDateSpan::Day(); // last day prev month
|
wxDateTime ldpm = wxDateTime(1,m_date.GetMonth(), m_date.GetYear()) - wxDateSpan::Day(); // last day prev month
|
||||||
// Check if range permits change
|
// Check if range permits change
|
||||||
if ( IsDateInRange(ldpm) && ( ( ldpm.GetYear() == m_date.GetYear() ) ? true : AllowYearChange() ) )
|
if ( IsDateInRange(ldpm) && ( ( ldpm.GetYear() == m_date.GetYear() ) ? TRUE : AllowYearChange() ) )
|
||||||
{
|
{
|
||||||
m_leftArrowRect = wxRect(larrowx - 3, arrowy - 3, (arrowheight / 2) + 8, (arrowheight + 6));
|
m_leftArrowRect = wxRect(larrowx - 3, arrowy - 3, (arrowheight / 2) + 8, (arrowheight + 6));
|
||||||
dc.SetBrush(wxBrush(*wxBLACK, wxSOLID));
|
dc.SetBrush(wxBrush(*wxBLACK, wxSOLID));
|
||||||
@@ -868,7 +868,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
dc.DrawRectangle(m_leftArrowRect);
|
dc.DrawRectangle(m_leftArrowRect);
|
||||||
}
|
}
|
||||||
wxDateTime fdnm = wxDateTime(1,m_date.GetMonth(), m_date.GetYear()) + wxDateSpan::Month(); // first day next month
|
wxDateTime fdnm = wxDateTime(1,m_date.GetMonth(), m_date.GetYear()) + wxDateSpan::Month(); // first day next month
|
||||||
if ( IsDateInRange(fdnm) && ( ( fdnm.GetYear() == m_date.GetYear() ) ? true : AllowYearChange() ) )
|
if ( IsDateInRange(fdnm) && ( ( fdnm.GetYear() == m_date.GetYear() ) ? TRUE : AllowYearChange() ) )
|
||||||
{
|
{
|
||||||
m_rightArrowRect = wxRect(rarrowx - 4, arrowy - 3, (arrowheight / 2) + 8, (arrowheight + 6));
|
m_rightArrowRect = wxRect(rarrowx - 4, arrowy - 3, (arrowheight / 2) + 8, (arrowheight + 6));
|
||||||
dc.SetBrush(wxBrush(*wxBLACK, wxSOLID));
|
dc.SetBrush(wxBrush(*wxBLACK, wxSOLID));
|
||||||
@@ -952,7 +952,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
bool changedColours = FALSE,
|
bool changedColours = FALSE,
|
||||||
changedFont = FALSE;
|
changedFont = FALSE;
|
||||||
|
|
||||||
bool isSel = false;
|
bool isSel = FALSE;
|
||||||
wxCalendarDateAttr *attr = NULL;
|
wxCalendarDateAttr *attr = NULL;
|
||||||
|
|
||||||
if ( date.GetMonth() != m_date.GetMonth() || !IsDateInRange(date) )
|
if ( date.GetMonth() != m_date.GetMonth() || !IsDateInRange(date) )
|
||||||
@@ -1218,7 +1218,7 @@ void wxCalendarCtrl::HighlightRange(wxPaintDC* pDC, const wxDateTime& fromdate,
|
|||||||
|
|
||||||
bool wxCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) const
|
bool wxCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) const
|
||||||
{
|
{
|
||||||
bool retval = true;
|
bool retval = TRUE;
|
||||||
|
|
||||||
#if DEBUG_PAINT
|
#if DEBUG_PAINT
|
||||||
wxLogDebug("+++ GetDateCoord: (%s) +++", date.Format("%d %m %Y"));
|
wxLogDebug("+++ GetDateCoord: (%s) +++", date.Format("%d %m %Y"));
|
||||||
@@ -1295,7 +1295,7 @@ bool wxCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) c
|
|||||||
{
|
{
|
||||||
*day = -1;
|
*day = -1;
|
||||||
*week = -1;
|
*week = -1;
|
||||||
retval = false;
|
retval = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_PAINT
|
#if DEBUG_PAINT
|
||||||
|
@@ -5454,7 +5454,7 @@ int wxGrid::SendEvent( const wxEventType type,
|
|||||||
wxMouseEvent& mouseEv )
|
wxMouseEvent& mouseEv )
|
||||||
{
|
{
|
||||||
bool claimed;
|
bool claimed;
|
||||||
bool vetoed= false;
|
bool vetoed= FALSE;
|
||||||
|
|
||||||
if ( type == wxEVT_GRID_ROW_SIZE || type == wxEVT_GRID_COL_SIZE )
|
if ( type == wxEVT_GRID_ROW_SIZE || type == wxEVT_GRID_COL_SIZE )
|
||||||
{
|
{
|
||||||
@@ -5525,7 +5525,7 @@ int wxGrid::SendEvent( const wxEventType type,
|
|||||||
int row, int col )
|
int row, int col )
|
||||||
{
|
{
|
||||||
bool claimed;
|
bool claimed;
|
||||||
bool vetoed= false;
|
bool vetoed= FALSE;
|
||||||
|
|
||||||
if ( type == wxEVT_GRID_ROW_SIZE || type == wxEVT_GRID_COL_SIZE )
|
if ( type == wxEVT_GRID_ROW_SIZE || type == wxEVT_GRID_COL_SIZE )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user