update a progress bar from a thread

2006-05-15 Thread nik600
hi i upgrade a progress bar from the body of a thread with the following code: void *body_monitor_avanzamento(void *args){ monitor_avanzamento *m=(monitor_avanzamento *)args; float avanzamento=0.0; while(avanzamento1){ avanzamento=(float)*(m-db-counter_shared)/(float)m-tot_pacchetti;

Xlib, thread and gnome

2006-05-15 Thread nik600
hi i am developing an application with gtk and thread. I've received some Xlib: unexpected async reply errors and looking on the web i've see that i must use this code: int main (int argc, char *argv[]) { GtkWidget *window; /* init threads */ g_thread_init(NULL); gdk_threads_init(); /* init