Re: How to run single instance of a window?



Daniel Carrera <dcarrera math toronto edu> writes:

> Since the index has to be a global variable anyways, why not make the
> window a global instead.
> 
> It starts out as NULL.  Connect the 'destroy' or 'delete_event' signal to
> a function that sets the window back to NULL after destroying it.

the simplest way to do this is to write:

 g_object_add_weak_pointer (G_OBJECT (window), &window);

This will cause the window variable to be NULL-ified when the window
object is destroyed.


Salut, Sven



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