Re: How to ask on exit "Do you really want to exit?"



On Tue, Oct 26, 2004 at 03:42:13PM +0300, sefairken beykent edu tr wrote:
When user clicks the close button at right bottom,i want my program to ask
"Do you really want to exit?",if no the program goes on to work.

I connected a destroy event to window.But what i must do exactly?.

Connect to "delete_event" of the window.  Display a dialog
in the handler with gtk_dialog_run(). Then return TRUE if
you don't want the window deleted.

Connect to "clicked" of the button, or "response" of the
dialog if it's a dialog (I suppose it is, since it has
buttons in the bottom). Display a dialog in the handler with
gtk_dialog_run(). Then don't destroy the main window if you
don't want to destroy it ;-)

Yeti


--
Dynamic IP address is not a crime.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]