aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/capture_file_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-05-14 21:53:57 +0000
committerGuy Harris <guy@alum.mit.edu>2013-05-14 21:53:57 +0000
commit89afc91ccfd137785840d9ced9ec1929e6a13a5b (patch)
treedc9b39f072b5df6440a12c570dbab907c46cc974 /ui/gtk/capture_file_dlg.c
parent732380177904489e2d45d1b418080e0187b71d11 (diff)
Give file_selection_new() an argument to specify the parent window of
the file selection dialog. Call gtk_file_chooser_set_do_overwrite_confirmation() in file_selection_new() for FILE_SELECTION_SAVE file selection dialogs, rather than doing it in the individual callers of file_selection_new(). Use gtk_dialog_set_alternative_button_order() in file_selection_new() to set the alternative button order, rather than using #ifdefs. Use file_selection_new() and file_selection_run() in the graph analysis code. (We should clean up other code that uses file_selection_new() to use file_selection_run(), and clean up other code that uses gtk_file_chooser_dialog_new() to use file_selection_new() and file_selection_run().) svn path=/trunk/; revision=49308
Diffstat (limited to 'ui/gtk/capture_file_dlg.c')
-rw-r--r--ui/gtk/capture_file_dlg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c
index e56b762364..c85e4c3027 100644
--- a/ui/gtk/capture_file_dlg.c
+++ b/ui/gtk/capture_file_dlg.c
@@ -493,6 +493,7 @@ gtk_open_file(GtkWidget *w, GString *file_name, GString *display_filter)
return FALSE;
file_open_w = file_selection_new("Wireshark: Open Capture File",
+ GTK_WINDOW(top_level),
FILE_SELECTION_OPEN);
/* it's annoying, that the file chooser dialog is already shown here,
so we cannot use the correct gtk_window_set_default_size() to resize it */
@@ -760,7 +761,8 @@ gtk_merge_file(GtkWidget *w, GString *file_name, GString *display_filter, int *m
/* Default to saving all packets, in the file's current format. */
file_merge_w = file_selection_new("Wireshark: Merge with Capture File",
- FILE_SELECTION_OPEN);
+ GTK_WINDOW(top_level),
+ FILE_SELECTION_OPEN);
/* it's annoying, that the file chooser dialog is already shown here,
so we cannot use the correct gtk_window_set_default_size() to resize it */
gtk_widget_set_size_request(file_merge_w, DEF_WIDTH, DEF_HEIGHT);
@@ -1664,9 +1666,8 @@ gtk_save_as_file(GtkWidget *w _U_, capture_file *cf, GString *file_name, int *fi
/* build the file selection */
file_save_as_w = file_selection_new("Wireshark: Save Capture File As",
+ GTK_WINDOW(top_level),
FILE_SELECTION_SAVE);
- gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_save_as_w),
- TRUE);
/* Container for each row of widgets */
@@ -1928,9 +1929,8 @@ gtk_export_specified_packets_file(GtkWidget *w _U_, GString *file_name, int *fil
/* build the file selection */
file_export_specified_packets_w = file_selection_new("Wireshark: Export Specified Packets",
+ GTK_WINDOW(top_level),
FILE_SELECTION_SAVE);
- gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_export_specified_packets_w),
- TRUE);
/* Container for each row of widgets */
@@ -2160,6 +2160,7 @@ file_color_import_cmd_cb(GtkWidget *color_filters, gpointer filter_list _U_)
activate it (i.e., it doesn't cause us to try to open the file). */
file_color_import_w = file_selection_new("Wireshark: Import Color Filters",
+ GTK_WINDOW(top_level),
FILE_SELECTION_OPEN);
/* Container for each row of widgets */
@@ -2253,9 +2254,8 @@ file_color_export_cmd_cb(GtkWidget *w _U_, gpointer filter_list)
color_selected = FALSE;
file_color_export_w = file_selection_new("Wireshark: Export Color Filters",
+ GTK_WINDOW(top_level),
FILE_SELECTION_SAVE);
- gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_color_export_w),
- TRUE);
/* Container for each row of widgets */
main_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE);