X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ddb394878d390c3eb065f393d9a5664010d9ada..8f2ee25db4652f96f28bc8f8370bebc974e533ff:/src/gtk/textctrl.cpp?ds=sidebyside diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 08fd4c335c..5ec85604f1 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -601,10 +601,22 @@ bool wxTextCtrl::Create( wxWindow *parent, GtkWrapMode wrap; if ( HasFlag( wxTE_DONTWRAP ) ) wrap = GTK_WRAP_NONE; - else if ( HasFlag( wxTE_LINEWRAP ) ) + else if ( HasFlag( wxTE_CHARWRAP ) ) wrap = GTK_WRAP_CHAR; - else // HasFlag(wxTE_WORDWRAP) always true as wxTE_WORDWRAP == 0 + else if ( HasFlag( wxTE_WORDWRAP ) ) wrap = GTK_WRAP_WORD; + else // HasFlag(wxTE_BESTWRAP) always true as wxTE_BESTWRAP == 0 + { + // GTK_WRAP_WORD_CHAR seems to be new in GTK+ 2.4 +#ifdef __WXGTK24__ + if ( !gtk_check_version(2,4,0) ) + { + wrap = GTK_WRAP_WORD_CHAR; + } + else +#endif + wrap = GTK_WRAP_WORD; + } gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), wrap );