closing a spawned window



Hello,

I have an application which spawns another toplevel window.  I would
like the user to be able to close this window by clicking on
File->Close.  I currently have the callback for that menuitem call
another function which does some cleanup (Saving date, etc), and then I
wish to close the window.  However, I don't know what to pass to
gtk_widget_destroy().  The only data that's available in my callback is
the GtkMenuItem that was clicked.  How do I get the widget that I need
to delete the toplevel window?

I often have problems like these.  I have a button whose callback needs
data about some other widget elsewhere in my program.  In general, how
do I pass this data to my callback or retrieve the data from within the
callback?

Thanks!  I hope my question was clear.  Please forgive me if the answer
is obvious.

Ron



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