[Glade-users] Gdk-CRITICAL error
- From: amuys shortech com au (Andrae Muys)
- Subject: [Glade-users] Gdk-CRITICAL error
- Date: Thu, 22 Feb 2001 12:41:09 +1000
Irina Brubaker wrote:
Most of the time gui works just fine. However, sometimes the widgets do
not show updates. For example, I have a label widget which I
periodically update in a pthread, using
gtk_label_set_text(GTK_LABEL(load_label), new_load).
Someone will hopefully correct me if I'm wrong, but I'm certain that
you're not allowed to do this. IIRC all GUI code has to be in the same
thread. What I suspect you are seeing is the result of various
dataraces that occur if you don't. AFAIK the correct way to do this is
to call gtk_idle_add() and add a function that call's
gtk_label_set_text().
Of course I may be wrong and Gtk+ may be completely thread safe, but I
doubt it.
Andrae Muys
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]