aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/main.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-09-09 10:26:58 +0000
committerGuy Harris <guy@alum.mit.edu>2000-09-09 10:26:58 +0000
commitf0efbd1a0216cc5eca9beddd3b1bd64d6420e818 (patch)
tree274d5eb905c47271a6d8d41817cea20086aec986 /gtk/main.c
parent6e04ac48f9d597f7f9a6a98410cd3c1ab13ece6f (diff)
"redraw_hex_dump()" can't use "cfile.pd" or "cfile.current_frame", as it
may be redrawing a packet window that displays a frame other than the current frame; give it arguments to specify the raw frame data and "frame_data" structure for the frame. This requires that each packet window have, associated with it, a pointer to the "frame_data" structure; that replaces the "cap_len" and "encoding" fields in a "PacketWinData" structure, as those are just copies of fields from the frame's "frame_data" structure. "packet_hex_print()" needn't be passed both the start and length values from a "field_info" structure - just pass it a pointer to that structure, or NULL for "no field is selected in the packet". It also needn't, any longer, be passed the "cap_len" and "flags.encoding" fields of a "frame_data" structure - just pass it a pointer to that structure. In "redraw_hex_dump_all()", don't redraw the hex dump pane of the main window if there is no current frame. svn path=/trunk/; revision=2404
Diffstat (limited to 'gtk/main.c')
-rw-r--r--gtk/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/main.c b/gtk/main.c
index cbda9e18c4..7903eba651 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.155 2000/09/08 10:59:15 guy Exp $
+ * $Id: main.c,v 1.156 2000/09/09 10:26:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -571,8 +571,8 @@ tree_view_select_row_cb(GtkCTree *ctree, GList *node, gint column, gpointer user
g_free(help_str);
}
- packet_hex_print(GTK_TEXT(byte_view), cfile.pd, cfile.current_frame->cap_len,
- finfo->start, finfo->length, cfile.current_frame->flags.encoding);
+ packet_hex_print(GTK_TEXT(byte_view), cfile.pd, cfile.current_frame,
+ finfo);
}
static void
@@ -581,8 +581,8 @@ tree_view_unselect_row_cb(GtkCTree *ctree, GList *node, gint column, gpointer us
gtk_statusbar_pop(GTK_STATUSBAR(info_bar), help_ctx);
finfo_selected = NULL;
set_menus_for_selected_tree_row(FALSE);
- packet_hex_print(GTK_TEXT(byte_view), cfile.pd, cfile.current_frame->cap_len,
- -1, -1, cfile.current_frame->flags.encoding);
+ packet_hex_print(GTK_TEXT(byte_view), cfile.pd, cfile.current_frame,
+ NULL);
}
void collapse_all_cb(GtkWidget *widget, gpointer data) {