Re: C++ call constructor via GtkItemFactoryEntry



William L. Thomson Jr. wrote:

I decided to use g_signal_connect(GTK_OBJECT(window),"destroy",&ManageInvoices::destroy,(void*)"WM destroy");

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.

Jeff Franks




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