Re: Removing widgets in the main loop from another thread

2009-05-14 Thread Damon Register
Chris Vine wrote: object whose method is being executed via Glib::Dispatcher. Deriving that object from sigc::trackable would avoid executing (via a signal) one of its non-static methods after it has ceased to exist; but it would not prevent a segfault when the main loop tries to look-up the

Re: Removing widgets in the main loop from another thread

2009-05-14 Thread Chris Vine
On Thu, 14 May 2009 11:17:52 -0400 Damon Register damon.w.regis...@lmco.com wrote: I am working on a small test app in order to understand how to use Glib::Thread. I have read the Glib::Thread reference at http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1Thread.html and

Removing widgets in the main loop from another thread

2009-02-26 Thread Robert Gründler
Hi all, i'm trying to add/remove widgets dynamically to a gtk::window from a separate thread. The classes i'm creating hold a singleton to the object that runs the main loop in the separate thread, and i communicate with the main loop thread using the Glib::Dispatcher class. The widgets will

Re: Removing widgets in the main loop from another thread

2009-02-26 Thread Chris Vine
On Thu, 26 Feb 2009 13:55:20 +0100 Robert Gründler doo...@gmail.com wrote: Hi all, i'm trying to add/remove widgets dynamically to a gtk::window from a separate thread. The classes i'm creating hold a singleton to the object that runs the main loop in the separate thread, and i communicate

Re: Removing widgets in the main loop from another thread

2009-02-26 Thread Chris Vine
On Thu, 26 Feb 2009 13:48:52 + Chris Vine ch...@cvine.freeserve.co.uk wrote: 3. You don't need to worry about an object ceasing to exist before a Glib::Dispatcher emission is executed via the main loop on one of its non-static methods if you derive the object from sigc::trackable. The

Re: Removing widgets in the main loop from another thread

2009-02-26 Thread Robert Gründler
Because your arrangement doesn't on the face of it make sense, there is probably more to it than at first appears. I therefore just make three points which may or may not be relevant to your question: 1. You cannot (without great difficulty) have different Gtk::Window objects created and/or

Re: Removing widgets in the main loop from another thread

2009-02-26 Thread Chris Vine
On Thu, 26 Feb 2009 17:20:04 +0100 Robert Gründler doo...@gmail.com wrote: Because your arrangement doesn't on the face of it make sense, there is probably more to it than at first appears. I therefore just make three points which may or may not be relevant to your question: 1. You