diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-07-13 04:38:15 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-07-13 04:38:15 +0000 |
commit | f57403fe466cf5dacbc7bff1dc9b0c77514c1f2c (patch) | |
tree | a63f258f6d1ff5bcdd3fbea3fcf9f78b72f156a0 /print.h | |
parent | 8369394c079da21a2c8196f376f0e82a0bf045ba (diff) | |
download | wireshark-f57403fe466cf5dacbc7bff1dc9b0c77514c1f2c.tar.gz wireshark-f57403fe466cf5dacbc7bff1dc9b0c77514c1f2c.tar.bz2 wireshark-f57403fe466cf5dacbc7bff1dc9b0c77514c1f2c.zip |
When printing a packet, do it from the protocol tree, not from the GTK+
tree constructed from the protocol tree:
1) The value of "level" field of GTK+ tree items appears to
depend on various random things - see a change I made to
"packet-dns.c" a while ago, to change the order in which
items were put in the tree, so that DNS trees printed with
correct indentation - and, right now, we appear to be doing
*something* wrong, as some packets I printed from one file
here had randomly bogus indentation; I could probably track
the problem down and fix it, but that might just hold us
until we accidentally do something *else* wrong by GTK+'s
lights.
The new code provides its own tree level as it goes.
2) The new code is independent of GTK+, so it could be used with
other toolkits, or with non-GUI variants of Ethereal.
3) This may make it easier to add a "Print..." menu item to let
the user print packets other than the currently selected
packet.
Make the internal routines used to print the packet static.
For the "Print Packet" menu item, put up a message box if they haven't
yet selected a packet.
svn path=/trunk/; revision=362
Diffstat (limited to 'print.h')
-rw-r--r-- | print.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* print.h * Definitions for printing packet analysis trees. * - * $Id: print.h,v 1.6 1998/10/28 21:38:11 gerald Exp $ + * $Id: print.h,v 1.7 1999/07/13 04:38:15 guy Exp $ * * Gilbert Ramirez <gram@verdict.uthscsa.edu> * @@ -34,8 +34,6 @@ GtkWidget *printer_prefs_show(); void printer_prefs_ok(GtkWidget *w); void printer_prefs_save(GtkWidget *w); void printer_prefs_cancel(GtkWidget *w); -void print_tree(const u_char *pd, frame_data *fd, GtkTree *tree); -void print_tree_text(FILE *fh, const u_char *pd, frame_data *fd, GtkTree *tree); -void print_tree_ps(FILE *fh, const u_char *pd, frame_data *fd, GtkTree *tree); +void proto_tree_print(GNode *protocol_tree, const u_char *pd, frame_data *fd); #endif /* print.h */ |