RE: gtk progress bar and gdk_flush()
- From: "Tom Liu" <tom liu flextrade com>
- To: "'Carlos Pereira'" <carlos pehoe civil ist utl pt>, <gtk-app-devel-list gnome org>
- Subject: RE: gtk progress bar and gdk_flush()
- Date: Fri, 24 Oct 2003 12:43:42 -0400
Thank you for your answer, But the thing is that you update the progress
bar in a time_out call back.
I have to put the progress bar in a long loop, didn't return to
gtk_main.
Which most progress bar should been used in a long loop task to show how
many percentage is done, after the task finish, return to main loop.
Thanks.
-----Original Message-----
From: gtk-app-devel-list-admin gnome org
[mailto:gtk-app-devel-list-admin gnome org] On Behalf Of Carlos Pereira
Sent: Friday, October 24, 2003 12:22 PM
To: gtk-app-devel-list gnome org
Subject: Re: gtk progress bar and gdk_flush()
I am working on the progress bar, I can't my progress bar updated in a
loop:
Even the gdk_flush() can't make it update on screen.
This works on Gtk1.2 (continuous mode):
Carlos
----------------------------------------
int app_gtk_statusbar_progress (gpointer data)
{
double new_value;
GtkAdjustment *adj;
new_value = gtk_progress_get_value (GTK_PROGRESS (data)) + 1;
adj = GTK_PROGRESS (data)->adjustment;
if (new_value > adj->upper) new_value = adj->lower;
gtk_progress_set_value (GTK_PROGRESS (data), new_value);
return TRUE;
}
timer_progress = gtk_timeout_add (100,
app_gtk_statusbar_progress, progress_bar);
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]