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: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Mon, 29 Dec 2003 11:50:39 +0100
Guy Harris wrote:

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.

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev

Hi,

We should use a modal dialog box, asking the question: "You have not saved...".

But the problem with this is, we simply don't have such a dialog box. The current dialog has no
function to wait for the button pressed.


     gtk_dialog_run


from GTK2 could do exactly that job. I have tried to backport this function to GTK1 but didn't succeeded.

Regards, ULFL