Re: Problem when closing a program



On Thu, 21 May 2009 10:27:14 -0500
Oscar Dávila <odavilar gmail com> wrote:
> Thanks, it works for my exit button but when i close my window with
> the "x" in the right top window it dont finish the loop. Thanks again.
> 
> On Wed, May 20, 2009 at 7:10 PM, Chris Vine
> <chris cvine freeserve co uk>wrote:
> 
> > On Wed, 20 May 2009 11:37:21 -0500
> > Oscar Dávila <odavilar gmail com> wrote:
> > > How can i close a program? the thing is i was using
> > > Gtk::Main::run(*window) and when i use hide in the main window the
> > > program closed but now im using Gtk::Main::run()
> > > because i want to hide de main window to open an other window and
> > > now when i close (hide) the main window to finish the program it
> > > dont finish, it keeps running, the main window hides but the
> > > program stills running in terminal.
> >
> > Use Gtk::Main::quit() to exit the main event loop.

You need to call it in a delete_event handler.  The delete event is
what you get when you click the 'x' button in the top right of the
window.

Chris



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