Blind Compile fix for GTK 2.0 non-Unicode mode.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-10-31 19:49:11 +00:00
parent ef807ad05c
commit b598e25cad
2 changed files with 16 additions and 2 deletions

View File

@@ -1355,12 +1355,19 @@ static void gtk_wxwindow_commit_cb (GtkIMContext *context,
wxKeyEvent event( wxEVT_KEY_DOWN );
// I wonder how well keyval represents a Unicode char
#if wxUSE_UNICODE
event.m_uniChar = g_utf8_get_char( str );
// Backward compatible for ISO-8859
if (event.m_uniChar < 256)
event.m_keyCode = event.m_uniChar;
#else
gunichar uniChar = g_utf8_get_char( str );
// We cannot handle Unicode in non-Unicode mode
if (uniChar > 255) return;
event.m_keyCode = uniChar;
#endif
if (!ret)
{

View File

@@ -1355,12 +1355,19 @@ static void gtk_wxwindow_commit_cb (GtkIMContext *context,
wxKeyEvent event( wxEVT_KEY_DOWN );
// I wonder how well keyval represents a Unicode char
#if wxUSE_UNICODE
event.m_uniChar = g_utf8_get_char( str );
// Backward compatible for ISO-8859
if (event.m_uniChar < 256)
event.m_keyCode = event.m_uniChar;
#else
gunichar uniChar = g_utf8_get_char( str );
// We cannot handle Unicode in non-Unicode mode
if (uniChar > 255) return;
event.m_keyCode = uniChar;
#endif
if (!ret)
{