diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-10-05 18:52:42 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-10-05 18:52:42 +0000 |
commit | 71ed773862716ff3a4def1884fa1d7f427f1ea47 (patch) | |
tree | a64d5aa615db95e124d5d0a94c12c70e9d82997a /ui | |
parent | dec2d034b0d4465e3c43f3a05350d9ceff06a5c1 (diff) | |
download | wireshark-71ed773862716ff3a4def1884fa1d7f427f1ea47.tar.gz |
Add a capture_file * element to packet_range_t and pass it explicitly in
packet_range_init(). Get rid of global cfile references in
packet-range.c. C++-ize packet-range.h. Shuffle some includes around.
svn path=/trunk/; revision=45333
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/capture_file_dlg.c | 14 | ||||
-rw-r--r-- | ui/gtk/print_dlg.c | 14 | ||||
-rw-r--r-- | ui/win32/file_dlg_win32.c | 18 |
3 files changed, 23 insertions, 23 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c index 32c9e7db7d..9197284a99 100644 --- a/ui/gtk/capture_file_dlg.c +++ b/ui/gtk/capture_file_dlg.c @@ -32,15 +32,16 @@ #include <gtk/gtk.h> -#include "packet-range.h" #include <epan/filesystem.h> #include <epan/addr_resolv.h> #include <epan/prefs.h> -#include "../globals.h" -#include "../color.h" -#include "../color_filters.h" -#include "../merge.h" +#include "packet-range.h" +#include "globals.h" +#include "color.h" +#include "color_filters.h" +#include "merge.h" + #include "ui/util.h" #include <wsutil/file_util.h> @@ -1975,6 +1976,7 @@ gtk_export_specified_packets_file(GtkWidget *w _U_, GString *file_name, int *fil * <platform/>_export_specified_packets_file routines should upon entry... * Set the path and fill in the filename if the path+filename is provided. * ...and upon exit... + * Not initialize range. * Return TRUE on "OK" and "FALSE" on "Cancel". * Close the window. */ @@ -1991,7 +1993,7 @@ file_export_specified_packets_cmd_cb(GtkWidget *w _U_, gpointer data _U_) { GtkWidget *msg_dialog; /* init the packet range */ - packet_range_init(&range); + packet_range_init(&range, &cfile); range.process_filtered = TRUE; range.include_dependents = TRUE; diff --git a/ui/gtk/print_dlg.c b/ui/gtk/print_dlg.c index 95bf6f8466..a43f21311d 100644 --- a/ui/gtk/print_dlg.c +++ b/ui/gtk/print_dlg.c @@ -145,7 +145,7 @@ file_print_cmd(gboolean print_selected) } /* init the printing range */ - packet_range_init(&args->range); + packet_range_init(&args->range, &cfile); args->range.process_filtered = TRUE; if(print_selected) { @@ -213,7 +213,7 @@ export_text_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) } /* init the printing range */ - packet_range_init(&args->range); + packet_range_init(&args->range, &cfile); args->range.process_filtered = TRUE; export_text_win = open_print_dialog("Wireshark: Export as \"Plain Text\" File", output_action_export_text, args); @@ -267,7 +267,7 @@ export_ps_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) } /* init the printing range */ - packet_range_init(&args->range); + packet_range_init(&args->range, &cfile); args->range.process_filtered = TRUE; export_ps_win = open_print_dialog("Wireshark: Export as \"PostScript\" file", output_action_export_ps, args); @@ -321,7 +321,7 @@ export_psml_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) } /* init the printing range */ - packet_range_init(&args->range); + packet_range_init(&args->range, &cfile); args->range.process_filtered = TRUE; export_psml_win = open_print_dialog("Wireshark: Export as \"PSML\" file", output_action_export_psml, args); @@ -374,7 +374,7 @@ export_pdml_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) } /* init the printing range */ - packet_range_init(&args->range); + packet_range_init(&args->range, &cfile); args->range.process_filtered = TRUE; export_pdml_win = open_print_dialog("Wireshark: Export as \"PDML\" file", output_action_export_pdml, args); @@ -426,7 +426,7 @@ export_csv_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) } /* init the printing range */ - packet_range_init(&args->range); + packet_range_init(&args->range, &cfile); args->range.process_filtered = TRUE; export_csv_win = open_print_dialog("Wireshark: Export as \"Comma Separated Values\" File", output_action_export_csv, args); @@ -478,7 +478,7 @@ export_carrays_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) } /* init the printing range */ - packet_range_init(&args->range); + packet_range_init(&args->range, &cfile); args->range.process_filtered = TRUE; export_carrays_win = open_print_dialog("Wireshark: Export as \"C Arrays\" File", diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index 2c233779aa..d43d455983 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -106,13 +106,13 @@ typedef enum { #define FILE_DEFAULT_COLOR 2 -static UINT_PTR CALLBACK open_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); -static UINT_PTR CALLBACK save_as_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); -static UINT_PTR CALLBACK export_specified_packets_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); -static UINT_PTR CALLBACK merge_file_hook_proc(HWND mf_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); -static UINT_PTR CALLBACK export_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); -static UINT_PTR CALLBACK export_raw_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); -static UINT_PTR CALLBACK export_sslkeys_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK open_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK save_as_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK export_specified_packets_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK merge_file_hook_proc(HWND mf_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK export_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK export_raw_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK export_sslkeys_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); static void range_update_dynamics(HWND sf_hwnd, packet_range_t *range); static void range_handle_wm_initdialog(HWND dlg_hwnd, packet_range_t *range); static void range_handle_wm_command(HWND dlg_hwnd, HWND ctrl, WPARAM w_param, packet_range_t *range); @@ -2021,7 +2021,7 @@ range_handle_wm_command(HWND dlg_hwnd, HWND ctrl, WPARAM w_param, packet_range_t TCHAR range_text[RANGE_TEXT_MAX]; if (!range) return; - + switch(w_param) { case (BN_CLICKED << 16) | EWFD_CAPTURED_BTN: case (BN_CLICKED << 16) | EWFD_DISPLAYED_BTN: @@ -2165,8 +2165,6 @@ export_file_hook_proc(HWND ef_hwnd, UINT msg, WPARAM w_param, LPARAM l_param) { switch(msg) { case WM_INITDIALOG: - /* init the printing range */ - packet_range_init(&print_args.range); /* default to displayed packets */ print_args.range.process_filtered = TRUE; range_handle_wm_initdialog(ef_hwnd, &print_args.range); |