Re: question about the "destroy" signal



Catch the "delete_event" signal instead.

When you try to close a window, the window manager sends a
"delete_event".  You can connect that signal to a function.  If this
function returns TRUE, the window is not closed.  If the function returns
FALSE, then Gtk sends a "destroy" event, which always destroys the
widget.

Daniel.


On Wed, 7 Aug 2002, Johnathan Wang wrote:

> I would like to catch the "destroy" signal of a window and simply hide
> the window. However connecting the "destroy" signal of a window to a
> function that simply calls gtk_widget_hide on the window object does not
> seem to work.
> Can anyone explain why this happens? Is it because the "destroy" signal
> causes the window object to be destroyed?
> If so, what can be done to disable the destroy signal?
> Thanks for the help,
> John
>
>




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