diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-06-19 15:22:56 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-06-19 15:22:56 +0000 |
commit | 909d2eb3090c773d271097d2c9dc5e164aa2f03b (patch) | |
tree | 23e926d38c1b4cf03da4c2adaa2ddc5dac5810ce /ui/win32 | |
parent | 54d58d66f71496a23c948144e1ad9fccad9fe39a (diff) | |
download | wireshark-909d2eb3090c773d271097d2c9dc5e164aa2f03b.tar.gz wireshark-909d2eb3090c773d271097d2c9dc5e164aa2f03b.tar.bz2 wireshark-909d2eb3090c773d271097d2c9dc5e164aa2f03b.zip |
Allow for column headers not to be printed in order to make it possible to export packets as plain text in a format that could then have a chance of being imported again (assuming other factors such as packet bytes were printed, etc.) in order to recover the original pcap file.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1636
svn path=/trunk/; revision=50036
Diffstat (limited to 'ui/win32')
-rw-r--r-- | ui/win32/file_dlg_win32.c | 19 | ||||
-rw-r--r-- | ui/win32/file_dlg_win32.h | 11 |
2 files changed, 22 insertions, 8 deletions
diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index 0d2007cf6d..0f2a384467 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -655,6 +655,7 @@ win32_export_file(HWND h_wnd, capture_file *cf, export_type_e export_type) { print_args.to_file = TRUE; print_args.cmd = NULL; print_args.print_summary = TRUE; + print_args.print_col_headings = TRUE; print_args.print_dissections = print_dissections_as_displayed; print_args.print_hex = FALSE; print_args.print_formfeed = FALSE; @@ -1031,10 +1032,20 @@ print_update_dynamic(HWND dlg_hwnd, print_args_t *args) { HWND cur_ctrl; cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_PKT_SUMMARY_CB); - if (SendMessage(cur_ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (SendMessage(cur_ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) { args->print_summary = TRUE; - else + cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_COL_HEADINGS_CB); + EnableWindow(cur_ctrl, TRUE); + if (SendMessage(cur_ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) + args->print_col_headings = TRUE; + else + args->print_col_headings = FALSE; + } else { args->print_summary = FALSE; + args->print_col_headings = FALSE; + cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_COL_HEADINGS_CB); + EnableWindow(cur_ctrl, FALSE); + } cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_PKT_DETAIL_CB); if (SendMessage(cur_ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) { @@ -1076,9 +1087,11 @@ static void format_handle_wm_initdialog(HWND dlg_hwnd, print_args_t *args) { HWND cur_ctrl; - /* Set the "Packet summary" box */ + /* Set the "Packet summary" and "Include column headings" boxes */ cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_PKT_SUMMARY_CB); SendMessage(cur_ctrl, BM_SETCHECK, args->print_summary, 0); + cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_COL_HEADINGS_CB); + SendMessage(cur_ctrl, BM_SETCHECK, args->print_col_headings, 0); /* Set the "Packet details" box */ cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_PKT_DETAIL_CB); diff --git a/ui/win32/file_dlg_win32.h b/ui/win32/file_dlg_win32.h index a62e2cd402..3c3b07508f 100644 --- a/ui/win32/file_dlg_win32.h +++ b/ui/win32/file_dlg_win32.h @@ -72,7 +72,7 @@ gboolean win32_save_as_file(HWND h_wnd, capture_file *cf, * @param file_type Wiretap file type. * @param compressed Compress the file with gzip. * @param range Range of packets to export. - * + * * @return TRUE if packets were discarded when saving, FALSE otherwise */ gboolean win32_export_specified_packets_file(HWND h_wnd, GString *file_name, @@ -190,10 +190,11 @@ void file_set_save_marked_sensitive(); /* These MUST be contiguous */ #define EWFD_PKT_FORMAT_GB 1050 #define EWFD_PKT_SUMMARY_CB 1051 -#define EWFD_PKT_DETAIL_CB 1052 -#define EWFD_PKT_DETAIL_COMBO 1053 -#define EWFD_PKT_BYTES_CB 1054 -#define EWFD_PKT_NEW_PAGE_CB 1055 +#define EWFD_COL_HEADINGS_CB 1052 +#define EWFD_PKT_DETAIL_CB 1053 +#define EWFD_PKT_DETAIL_COMBO 1054 +#define EWFD_PKT_BYTES_CB 1055 +#define EWFD_PKT_NEW_PAGE_CB 1056 #ifdef __cplusplus } |