Ethereal-dev: Re: [Ethereal-dev] Changes to save the capture file on quit

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 28 Dec 2003 15:58:14 -0800
On Sun, Dec 28, 2003 at 05:05:52PM -0800, Richard Sharpe wrote:
> Currently, File->Quit is handled by the following:
> 
> 	void
> 	file_quit_cmd_cb (GtkWidget *widget _U_, gpointer data _U_)
> 	{	
>         	do_quit();
> 	}
> 
> I suspect that we should add, before do_quit() the following
> 
> 		if (!cfile.user_saved) {
> 			file_save_as_cmd_cb(widget, data);
> 		}

Does "file_save_as_cmd_cb()" pop up a message box saying "you have not
saved your capture; do you want to save it before quitting?", or
something such as that, along with buttons saying:

	Quit without Saving

	Cancel

	Save

such that

	if the user clicks the Quit without Saving button, Ethereal
	will exit without saving the capture;

	if the user clicks the Cancel button, Ethereal won't quit at
	all;

	if the user clicks the "Save" button, a "Save As..." dialog box
	will be popped up?

If so, then that'd be the right thing to do.

If not, the above would be the right thing to do instead.

The same should be done if you attempt to close the main Ethereal
window.