threads and gui
- From: "Amadeus W. M." <amadeus84 cablespeed com>
- To: gtkmm-list gnome org
- Subject: threads and gui
- Date: Thu, 10 Aug 2006 22:49:07 -0400
I have a gtkmm application which spawns off a non-gui WorkThread.
The WorkThread does some (heavy) computation and draws onto the gui.
I'm doing that with a Glib::Dispatcher, etc. and it works fine.
What I want to do is to block some widgets on the gui, to
prevent the user from doing funny things to the gui while the
WorkThread thread is running.
I can set_sensitive(0) the widgets I want, just before creating
the thread. But how do I set them back to sensitive when the
thread is done? If I put a WorkThread->join() somewhere after
the thread was created, the gui obviously doesn't get
updated, waiting for the WorkThread. Do I need a second
Dispatcher at the end of the WorkThread to tell the gui to set
the widgets sensitive?
] [Thread Prev