Re: gnome-mdi and signals..



Michael Elkins wrote:
> 
> I'm writing an MDI app and I'm a little confused on how signals work with it.
> For instance, say each view has a flag in it noting whether or not changes
> have been made.   What I want to do is catch the delete_event signal for
> the GnomeApp that the view is currently contained in so that I can pop up
> a dialog asking if changes should be saved if any of the children in that
> particular GnomeApp have been modified.  What I don't understand is how the
> GnomeMDI object knows when one of its children has been deleted..?
you don't have to know when the window is being deleted. you can pop up
the
dialog in the "remove_child" signal handler (the signal is emitted when
the
child is being removed from the MDI). take a look at gnome-utils/ghex or
gnome-libs/gnome-hello/gnome-hello-7-mdi.c sources for an example.
of course, you could also catch the delete_event signal of each GnomeApp
in the "app_created" signal handler, but I see no reason for this.

jaKa

-- 
email: jaka.mocnik@kiss.uni-lj.si
w3:    http://pluton.ijs.si/~jaka



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