Re: destroy_signal



Hi,

Monserrat Seisdedos Nuñez <mseisdedos cirsa com> writes:

> I have a window, it has the X button to destroy it.
> but i want the X button to just hide it not to destroy it. In the destroy
> callback i wrote down:
> 
> gtk_window_hide(window);
> 
> but it seems to destroy the window as well.
> 
> Maybe i can mask the destroy signal for this window, can anybody help me?

you need to connect to "delete_event" and return TRUE from your event
handler to stop the signal emission. Or, even simpler, connect
"delete_event" to gtk_widget_hide_on_delete() which does just that:
hide the widget and return TRUE.


Salut, Sven



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