use GTK_WRAP_WORD instead of GTK_WRAP_WORD_CHAR which is not defined in older GTK versions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-03-23 20:04:31 +00:00
parent 62075bca1f
commit 9ddb394878
2 changed files with 12 additions and 6 deletions

View File

@ -598,12 +598,15 @@ bool wxTextCtrl::Create( wxWindow *parent,
gtk_container_add( GTK_CONTAINER(m_widget), m_text ); gtk_container_add( GTK_CONTAINER(m_widget), m_text );
// translate wx wrapping style to GTK+ // translate wx wrapping style to GTK+
GtkWrapMode wrap;
if ( HasFlag( wxTE_DONTWRAP ) ) if ( HasFlag( wxTE_DONTWRAP ) )
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_NONE ); wrap = GTK_WRAP_NONE;
else if ( HasFlag( wxTE_LINEWRAP ) ) else if ( HasFlag( wxTE_LINEWRAP ) )
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_CHAR ); wrap = GTK_WRAP_CHAR;
else // HasFlag(wxTE_WORDWRAP) always true as wxTE_WORDWRAP == 0 else // HasFlag(wxTE_WORDWRAP) always true as wxTE_WORDWRAP == 0
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_WORD_CHAR ); wrap = GTK_WRAP_WORD;
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), wrap );
if (!HasFlag(wxNO_BORDER)) if (!HasFlag(wxNO_BORDER))
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(m_widget), GTK_SHADOW_IN ); gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(m_widget), GTK_SHADOW_IN );

View File

@ -598,12 +598,15 @@ bool wxTextCtrl::Create( wxWindow *parent,
gtk_container_add( GTK_CONTAINER(m_widget), m_text ); gtk_container_add( GTK_CONTAINER(m_widget), m_text );
// translate wx wrapping style to GTK+ // translate wx wrapping style to GTK+
GtkWrapMode wrap;
if ( HasFlag( wxTE_DONTWRAP ) ) if ( HasFlag( wxTE_DONTWRAP ) )
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_NONE ); wrap = GTK_WRAP_NONE;
else if ( HasFlag( wxTE_LINEWRAP ) ) else if ( HasFlag( wxTE_LINEWRAP ) )
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_CHAR ); wrap = GTK_WRAP_CHAR;
else // HasFlag(wxTE_WORDWRAP) always true as wxTE_WORDWRAP == 0 else // HasFlag(wxTE_WORDWRAP) always true as wxTE_WORDWRAP == 0
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_WORD_CHAR ); wrap = GTK_WRAP_WORD;
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), wrap );
if (!HasFlag(wxNO_BORDER)) if (!HasFlag(wxNO_BORDER))
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(m_widget), GTK_SHADOW_IN ); gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(m_widget), GTK_SHADOW_IN );