Re: making buttons disable and enable
- From: Mihai BAZON <mbazon websci ro>
 
- To: Deepak Gupta <dgupta mahindrabt com>
 
- Cc: <gnome-gui-list gnome org>
 
- Subject: Re: making buttons disable and enable
 
- Date: Mon, 14 May 2001 15:05:17 +0300 (EEST)
 
Gtk+ is _not_ yet thread-safe, AFAIK (and I think it will not be so very
soon).  This means that you cannot make Gtk+ function calls from another
thread but the main thread.  Some people think this is a limitation, I
personally think it's good; it it were thread-safe, it would be much
slower, less portable, etc.  However, you can avoid problems by using
mutexes to protect Gtk+ calls, or (probably better) -- call Gtk+ from a
single thread.  This can be achieved using some sort of communication
mechanism between threads, and when another thread needs to call a Gtk+
function notify the main thread, which will do the shit..
I hope I'm not wrong (I had the same problems too, but I gave up before
solving them.. :)
Good luck!
--
/*   -*- Mishoo -*-         In the beginning there was nothing,
 *  mishoo websci ro      which exploded.   (The Big Bang Theory)  */
On Mon, 14 May 2001, Deepak Gupta wrote:
> hi to all
>         i'm stuck up with a problem. i'm not able to set the sensitivity of
> buttons on my main widow from a thread running along with the gtk_main(). if i
> try to do so, the gui crashes.
>         any suggestions???
>
> --
> Deepak
> dgupta mahindrabt com
>
>
>
> _______________________________________________
> gnome-gui-list mailing list
> gnome-gui-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-gui-list
>
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]