fix missing/incorrect GTK runtime version checks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2013-12-15 01:29:56 +00:00
parent 6adf2efa20
commit 286727db5b
2 changed files with 45 additions and 34 deletions

View File

@@ -842,26 +842,24 @@ GtkEntry *wxTextCtrl::GetEntry() const
int wxTextCtrl::GTKIMFilterKeypress(GdkEventKey* event) const
{
if (IsSingleLine())
return wxTextEntry::GTKIMFilterKeypress(event);
int result;
#if GTK_CHECK_VERSION(2, 22, 0)
if ( gtk_check_version(2, 12, 0) == 0 )
#ifndef __WXGTK3__
result = false;
if (gtk_check_version(2,22,0) == NULL)
#endif
{
if ( IsSingleLine() )
{
return wxTextEntry::GTKIMFilterKeypress(event);
}
else
{
return gtk_text_view_im_context_filter_keypress(
GTK_TEXT_VIEW(m_text),
event
);
}
result = gtk_text_view_im_context_filter_keypress(GTK_TEXT_VIEW(m_text), event);
}
#else // GTK+ < 2.22
wxUnusedVar(event);
result = false;
#endif // GTK+ 2.22+
return FALSE;
return result;
}
// ----------------------------------------------------------------------------