Temporary compilation fix for wxUSE_INTL=0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1092,8 +1092,12 @@ void wxGridCellFloatEditor::StartingKey(wxKeyEvent& event)
|
|||||||
tmpbuf[0] = (char) keycode;
|
tmpbuf[0] = (char) keycode;
|
||||||
tmpbuf[1] = '\0';
|
tmpbuf[1] = '\0';
|
||||||
wxString strbuf(tmpbuf, *wxConvCurrent);
|
wxString strbuf(tmpbuf, *wxConvCurrent);
|
||||||
|
#if wxUSE_INTL
|
||||||
bool is_decimal_point = ( strbuf ==
|
bool is_decimal_point = ( strbuf ==
|
||||||
wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) );
|
wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) );
|
||||||
|
#else
|
||||||
|
bool is_decimal_point = ( strbuf == _T(".") );
|
||||||
|
#endif
|
||||||
if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
|
if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
|
||||||
|| is_decimal_point )
|
|| is_decimal_point )
|
||||||
{
|
{
|
||||||
@@ -1166,9 +1170,13 @@ bool wxGridCellFloatEditor::IsAcceptedKey(wxKeyEvent& event)
|
|||||||
tmpbuf[0] = (char) keycode;
|
tmpbuf[0] = (char) keycode;
|
||||||
tmpbuf[1] = '\0';
|
tmpbuf[1] = '\0';
|
||||||
wxString strbuf(tmpbuf, *wxConvCurrent);
|
wxString strbuf(tmpbuf, *wxConvCurrent);
|
||||||
|
#if wxUSE_INTL
|
||||||
bool is_decimal_point =
|
bool is_decimal_point =
|
||||||
( strbuf == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT,
|
( strbuf == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT,
|
||||||
wxLOCALE_CAT_NUMBER) );
|
wxLOCALE_CAT_NUMBER) );
|
||||||
|
#else
|
||||||
|
bool is_decimal_point = ( strbuf == _T(".") );
|
||||||
|
#endif
|
||||||
if ( (keycode < 128) &&
|
if ( (keycode < 128) &&
|
||||||
(wxIsdigit(keycode) || tolower(keycode) == 'e' ||
|
(wxIsdigit(keycode) || tolower(keycode) == 'e' ||
|
||||||
is_decimal_point || keycode == '+' || keycode == '-') )
|
is_decimal_point || keycode == '+' || keycode == '-') )
|
||||||
|
Reference in New Issue
Block a user