From 9dc1d5b9a7fecaa2bc0bf4547ef002f71695894f Mon Sep 17 00:00:00 2001 From: Stephen Fisher Date: Fri, 28 Mar 2008 04:42:29 +0000 Subject: Fix bug #2286: Folow TCP stream window [needs line wrapping turned back on] wrapped lines svn path=/trunk/; revision=24742 --- gtk/follow_stream.c | 9 +++++++++ gtk/follow_tcp.c | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'gtk') diff --git a/gtk/follow_stream.c b/gtk/follow_stream.c index a05e4f0442..9ede92d6af 100644 --- a/gtk/follow_stream.c +++ b/gtk/follow_stream.c @@ -58,6 +58,14 @@ #include #endif +/* This is backwards-compatibility code for old versions of GTK+ (2.2.1 and + * earlier). It defines the new wrap behavior (unknown in earlier versions) + * as the old (slightly buggy) wrap behavior. + */ +#ifndef GTK_WRAP_WORD_CHAR +#define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD +#endif + /* static variable declarations to speed up the performance * of follow_load_text and follow_add_to_gtk_text */ @@ -780,6 +788,7 @@ follow_stream(gchar *title, follow_info_t *follow_info, #else text = gtk_text_view_new(); gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE); + gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD_CHAR); #endif gtk_container_add(GTK_CONTAINER(txt_scrollw), text); follow_info->text = text; diff --git a/gtk/follow_tcp.c b/gtk/follow_tcp.c index 71c5e8177c..665b5e629c 100644 --- a/gtk/follow_tcp.c +++ b/gtk/follow_tcp.c @@ -71,14 +71,6 @@ #include "follow_stream.h" -/* This is backwards-compatibility code for old versions of GTK+ (2.2.1 and - * earlier). It defines the new wrap behavior (unknown in earlier versions) - * as the old (slightly buggy) wrap behavior. - */ -#ifndef GTK_WRAP_WORD_CHAR -#define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD -#endif - /* With MSVC and a libwireshark.dll, we need a special declaration. */ WS_VAR_IMPORT FILE *data_out_file; -- cgit v1.2.3