diff options
author | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-16 21:08:48 +0000 |
---|---|---|
committer | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-16 21:08:48 +0000 |
commit | ec5366cedec69a3899bcf829be3a47e94708a6b5 (patch) | |
tree | 6ca0c04f3d419e0bea77d2e6ffcde98dc849f9d8 /gtk/follow_dlg.c | |
parent | e4c5d20f3a37826b5f57a7cb105392a10bed9cfa (diff) | |
download | wireshark-ec5366cedec69a3899bcf829be3a47e94708a6b5.tar.gz wireshark-ec5366cedec69a3899bcf829be3a47e94708a6b5.tar.bz2 wireshark-ec5366cedec69a3899bcf829be3a47e94708a6b5.zip |
Fix a long standing bug in the scrolled window handling in follow TCP stream
which make ethereal aborts if the preferences were modified (or cancel) after
the TCP window was closed.
Fix the same bug in the other scrolled window handling (help & protocols).
(forget_scrolled_window() was not called at the window closure).
svn path=/trunk/; revision=2283
Diffstat (limited to 'gtk/follow_dlg.c')
-rw-r--r-- | gtk/follow_dlg.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/follow_dlg.c b/gtk/follow_dlg.c index 8c7dd8f36c..7cd0ff7c6f 100644 --- a/gtk/follow_dlg.c +++ b/gtk/follow_dlg.c @@ -1,6 +1,6 @@ /* follow_dlg.c * - * $Id: follow_dlg.c,v 1.5 2000/08/11 22:18:22 deniel Exp $ + * $Id: follow_dlg.c,v 1.6 2000/08/16 21:08:48 deniel Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -105,6 +105,9 @@ static void follow_stream_om_server(GtkWidget * w, gpointer data); FILE *data_out_file = NULL; +/* keep a static to the scrolled window to be able to remove it from + * the scrolled windows list */ +static GtkWidget *txt_scrollw = NULL; #define E_FOLLOW_INFO_KEY "follow_info_key" @@ -114,7 +117,7 @@ FILE *data_out_file = NULL; void follow_stream_cb(GtkWidget * w, gpointer data) { - GtkWidget *streamwindow, *vbox, *txt_scrollw, *text, *filter_te; + GtkWidget *streamwindow, *vbox, *text, *filter_te; GtkWidget *hbox, *button, *radio_bt; GtkWidget *stream_om, *stream_menu, *stream_mi; int tmp_fd; @@ -364,6 +367,11 @@ follow_destroy_cb(GtkWidget *w, gpointer data) { follow_info_t *follow_info; + if (txt_scrollw) { + forget_scrolled_window(txt_scrollw); + txt_scrollw = NULL; + } + follow_info = gtk_object_get_data(GTK_OBJECT(w), E_FOLLOW_INFO_KEY); unlink(follow_info->data_out_filename); gtk_widget_destroy(w); |