update a progress bar from a thread
- From: nik600 <nik600 gmail com>
- To: gtk-app-devel-list gnome org
- Subject: update a progress bar from a thread
- Date: Mon, 15 May 2006 13:50:38 +0200
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(avanzamento<1){
avanzamento=(float)*(m->db->counter_shared)/(float)m->tot_pacchetti;
gtk_progress_bar_set_fraction ((GtkProgressBar
*)m->scroll_avanzamento_simulazione,avanzamento);
gtk_widget_show(m->scroll_avanzamento_simulazione);
sleep(1);
}
}
it works, but i can see the progress bar update only when i go with
the mouse over the progress bar, maybe i have to call another update
function?
i've also tried to make a gtk_widget_show_all of the windows, but
without any result...
thanks nik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]