aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/follow_stream.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/follow_stream.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/follow_stream.c')
-rw-r--r--ui/gtk/follow_stream.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/ui/gtk/follow_stream.c b/ui/gtk/follow_stream.c
index 41969e8760..f6c7905a7e 100644
--- a/ui/gtk/follow_stream.c
+++ b/ui/gtk/follow_stream.c
@@ -524,22 +524,16 @@ follow_print_stream(GtkWidget * w _U_, gpointer data)
*/
static void
-follow_save_as_cmd_cb(GtkWidget *w _U_, gpointer data)
+follow_save_as_cmd_cb(GtkWidget *w, gpointer data)
{
- GtkWidget *new_win;
+ GtkWidget *caller = gtk_widget_get_toplevel(w);
+ GtkWidget *new_win;
follow_info_t *follow_info = (follow_info_t *)data;
-#if 0 /* XXX: GtkFileChooserDialog/gtk_dialog_run currently being used is effectively modal so this is not req'd */
- if (follow_info->follow_save_as_w != NULL) {
- /* There's already a dialog box; reactivate it. */
- reactivate_window(follow_info->follow_save_as_w);
- return;
- }
-#endif
new_win = file_selection_new("Wireshark: Save Follow Stream As",
+ GTK_WINDOW(caller),
FILE_SELECTION_SAVE);
follow_info->follow_save_as_w = new_win;
- gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(new_win), TRUE);
/* Tuck away the follow_info object into the window */
g_object_set_data(G_OBJECT(new_win), E_FOLLOW_INFO_KEY, follow_info);