Re: Save dialog upon exiting
- From: Andrew Burton <adb iinet net au>
- To: Robert Pyzalski <rob geology wisc edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Save dialog upon exiting
- Date: Sat, 21 Feb 2004 15:24:04 +1100
On Sat, 2004-02-21 at 05:01, Robert Pyzalski wrote:
Hello GTK programmers,
I've got a program that pops up a modal dialog upon exiting asking wether
to save changes. The dialog is called using gtk_dialog_run().
The delete_event handler calls this dialog:
g_signal_connect_swapped(G_OBJECT(main_win), "delete_event",
G_CALLBACK(Exit_Program), G_OBJECT(main_win));
static gboolean Exit_Program()
{ if (!Save_Changes_Warning())
return TRUE;
gtk_main_quit();
return FALSE;
}
This works except for one annoyance. If this callback is called from the
menu everything works fine. If this is called when a user clicks the main
window's "X" or closes the program from the window frame's menu the main
program window gets buried underneath all of the other open windows. Does
anyone know what I'm doing wrong?
Robert P.
Why wouldn't you save the settings automatically, rather than hit the
user with a dialog? One less thing to confuse them with. "Ah, a dialog
box, how do I make it go away, I'll hit no."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]