aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/file_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-07-03 09:34:27 +0000
committerGuy Harris <guy@alum.mit.edu>2000-07-03 09:34:27 +0000
commite4a9d0f426c411c0555b7e940e5dbeb02f08e473 (patch)
treebe688addd1d5ff7be4be52caedf00e8030edb56e /gtk/file_dlg.c
parent9e42b3a4edee724033766982c633e70bc621be87 (diff)
downloadwireshark-e4a9d0f426c411c0555b7e940e5dbeb02f08e473.tar.gz
wireshark-e4a9d0f426c411c0555b7e940e5dbeb02f08e473.tar.bz2
wireshark-e4a9d0f426c411c0555b7e940e5dbeb02f08e473.zip
If the user clicks the "Cancel" button in a progress-bar dialog box for
reading a capture file, we should just clean up and return so that Ethereal continues running with no capture file loaded, unless the read is being done as a result of Ethereal being run with the "-r" flag, in which case we still exit (although we may eventually choose to continue running with no capture file loaded even in that case). svn path=/trunk/; revision=2104
Diffstat (limited to 'gtk/file_dlg.c')
-rw-r--r--gtk/file_dlg.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/gtk/file_dlg.c b/gtk/file_dlg.c
index 365bd914b0..81c3861195 100644
--- a/gtk/file_dlg.c
+++ b/gtk/file_dlg.c
@@ -1,7 +1,7 @@
/* file_dlg.c
* Dialog boxes for handling files
*
- * $Id: file_dlg.c,v 1.26 2000/06/27 07:13:25 guy Exp $
+ * $Id: file_dlg.c,v 1.27 2000/07/03 09:34:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -231,9 +231,11 @@ file_open_ok_cb(GtkWidget *w, GtkFileSelection *fs) {
break;
case READ_ABORTED:
- /* Exit by leaving the main loop, so that any quit functions
- we registered get called. */
- gtk_main_quit();
+ /* The user bailed out of re-reading the capture file; the
+ capture file has been closed - just free the capture file name
+ string and return (without changing the last containing
+ directory). */
+ g_free(cf_name);
return;
}
@@ -531,9 +533,11 @@ file_reload_cmd_cb(GtkWidget *w, gpointer data) {
break;
case READ_ABORTED:
- /* Exit by leaving the main loop, so that any quit functions
- we registered get called. */
- gtk_main_quit();
+ /* The user bailed out of re-reading the capture file; the
+ capture file has been closed - just free the capture file name
+ string and return (without changing the last containing
+ directory). */
+ g_free(filename);
return;
}
} else {