Re: sensing window destruction




I was wondering how it is possible to sense when a widget is
closed by the user and send change a specific variable as a
result.
Either connect to "destroy" signal, or use g_object_weak_ref(). 
The handler can change a global variable.

If you store the pointer to the window in a global variable, you can also use g_object_weak_pointer() to have 
the pointer automatically NULLed when the window closes.  It actually uses a weak_ref, with an inbuilt 
function as the handler that simply assigns NULL to the gpointer variable you pass it.


Fredderic

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!





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