m_colBgOld = m_control->GetBackgroundColour();
m_control->SetBackgroundColour(attr->GetBackgroundColour());
- // Workaround for GTK+1 font setting problem on some platforms
+ // Workaround for GTK+1 font setting problem on some platforms
#if !defined(__WXGTK__) || defined(__WXGTK20__)
m_fontOld = m_control->GetFont();
m_control->SetFont(attr->GetFont());
m_control->SetBackgroundColour(m_colBgOld);
m_colBgOld = wxNullColour;
}
-
- // Workaround for GTK+1 font setting problem on some platforms
+ // Workaround for GTK+1 font setting problem on some platforms
#if !defined(__WXGTK__) || defined(__WXGTK20__)
if ( m_fontOld.Ok() )
{
default:
// accept 8 bit chars too if isprint() agrees
- if ( (keycode < 255) && (wxIsprint((wxChar)keycode)) )
+ if ( (keycode < 255) && (wxIsprint(keycode)) )
return true;
}
}
{
m_valueOld = 0;
wxString sValue = table->GetValue(row, col);
- if (! sValue.ToLong(&m_valueOld) && ! sValue.empty())
+ if (! sValue.ToLong(&m_valueOld) && ! sValue.IsEmpty())
{
wxFAIL_MSG( _T("this cell doesn't have numeric value") );
return;
else
{
text = Text()->GetValue();
- changed = (text.empty() || text.ToLong(&value)) && (value != m_valueOld);
+ changed = (text.IsEmpty() || text.ToLong(&value)) && (value != m_valueOld);
}
if ( changed )
return true;
default:
- if ( (keycode < 128) && wxIsdigit((wxChar)keycode) )
+ if ( (keycode < 128) && wxIsdigit(keycode) )
return true;
}
}
if ( !HasRange() )
{
int keycode = event.GetKeyCode();
- if ( wxIsdigit((wxChar)keycode) || keycode == '+' || keycode == '-'
+ if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
|| keycode == WXK_NUMPAD0
|| keycode == WXK_NUMPAD1
|| keycode == WXK_NUMPAD2
{
m_valueOld = 0.0;
wxString sValue = table->GetValue(row, col);
- if (! sValue.ToDouble(&m_valueOld) && ! sValue.empty())
+ if (! sValue.ToDouble(&m_valueOld) && ! sValue.IsEmpty())
{
wxFAIL_MSG( _T("this cell doesn't have float value") );
return;
double value = 0.0;
wxString text(Text()->GetValue());
- if ( (text.empty() || text.ToDouble(&value)) && (value != m_valueOld) )
+ if ( (text.IsEmpty() || text.ToDouble(&value)) && (value != m_valueOld) )
{
if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT))
grid->GetTable()->SetValueAsDouble(row, col, value);
wxString strbuf(tmpbuf, *wxConvCurrent);
bool is_decimal_point = ( strbuf ==
wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) );
- if ( wxIsdigit((wxChar)keycode) || keycode == '+' || keycode == '-'
+ if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
|| is_decimal_point
|| keycode == WXK_NUMPAD0
|| keycode == WXK_NUMPAD1
tmpbuf[0] = (char) keycode;
tmpbuf[1] = '\0';
wxString strbuf(tmpbuf, *wxConvCurrent);
- bool is_decimal_point =
+ bool is_decimal_point =
( strbuf == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT,
wxLOCALE_CAT_NUMBER) );
if ( (keycode < 128) &&
- (wxIsdigit((wxChar)keycode) || tolower(keycode) == 'e' ||
+ (wxIsdigit(keycode) || tolower(keycode) == 'e' ||
is_decimal_point || keycode == '+' || keycode == '-') )
return true;
}