diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-11-20 10:37:16 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-11-20 10:37:16 +0000 |
commit | 1c3f2e4cd550a4bf76185c5c074e5864abf57f11 (patch) | |
tree | 994860e8b8eecf1545e6eb294514cdc65538d4ff /gtk/packet_win.c | |
parent | 800030b8a0755c88b1bef45e447dba2be22bb584 (diff) | |
download | wireshark-1c3f2e4cd550a4bf76185c5c074e5864abf57f11.tar.gz wireshark-1c3f2e4cd550a4bf76185c5c074e5864abf57f11.tar.bz2 wireshark-1c3f2e4cd550a4bf76185c5c074e5864abf57f11.zip |
Have a routine to add all the hex dump tabs to the hex dump notebook,
and call it both from "select_packet()" and "create_new_window()",
rather than having two similar loops in both places.
svn path=/trunk/; revision=4233
Diffstat (limited to 'gtk/packet_win.c')
-rw-r--r-- | gtk/packet_win.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gtk/packet_win.c b/gtk/packet_win.c index 0cdac5c660..8f016bb2c4 100644 --- a/gtk/packet_win.c +++ b/gtk/packet_win.c @@ -3,7 +3,7 @@ * * Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com> * - * $Id: packet_win.c,v 1.24 2001/11/20 10:10:45 guy Exp $ + * $Id: packet_win.c,v 1.25 2001/11/20 10:37:16 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -126,8 +126,8 @@ void new_window_cb(GtkWidget *w){ static void -create_new_window ( char *Title, gint tv_size, gint bv_size){ - +create_new_window(char *Title, gint tv_size, gint bv_size) +{ GtkWidget *main_w, *main_vbox, *pane, *tree_view, *tv_scrollw, *bv_scrollw, @@ -192,16 +192,10 @@ create_new_window ( char *Title, gint tv_size, gint bv_size){ GTK_SIGNAL_FUNC(destroy_new_window), DataPtr); /* draw the protocol tree & print hex data */ + add_byte_views(DataPtr->frame, DataPtr->protocol_tree, tree_view, + DataPtr->bv_nb_ptr); proto_tree_draw(DataPtr->protocol_tree, tree_view); - i=0; /* do all the hex views */ - while((bv_tvb = g_slist_nth_data ( DataPtr->frame->data_src, i++))){ - add_byte_tab( DataPtr->bv_nb_ptr, tvb_get_name( bv_tvb), - tvb_get_ptr(bv_tvb, 0, -1), tvb_length(bv_tvb), - DataPtr->protocol_tree, tree_view); - - } - DataPtr->finfo_selected = NULL; gtk_widget_show(main_w); } |