Re: C++ call constructor via GtkItemFactoryEntry



Jeff Franks <jcf tpg com au> writes:

William L. Thomson Jr. wrote:

This connects ManageInvoices::destroy to the 'destroy' signal but
you'll also need to connect to the 'delete_event' signal as this is
the one that's called when the user closes a toplevel window via the
Window Manager. You will have to be careful though because the
'delete_event' also emits a destroy_signal. That means the destroy
function will be called twice, once by the 'delete_event' emission and
once by the 'destroy' signal emitted by 'delete_event',  whenever the
window is closed via the Window Manager.

But if the delete_event default handler emits the destroy_event, why
is it not sufficient to have the destructor connected to the destroy
event? Does it emit destroy_event only sometimes and sometimes not?

What is the rationale of having two events, one called delete and
andother called destroy? What is the difference?

Regards,
Enrique



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