Re: updating gtk_progress_bar
- From: jordi <jovy wanadoo es>
- To: Jan-Marek Glogowski <glogow stud fbi fh-darmstadt de>
- Cc: GTK <gtk-list gnome org>
- Subject: Re: updating gtk_progress_bar
- Date: Sun, 22 Jul 2001 12:33:11 -0400
Jan-Marek Glogowski wrote:
> Hi Jordi
>
>
>
> Two possible solutions:
>
> 1. Create a GtkAdjustment and pass it to gtk_progress_bar_set_adjustment
> (something like gtk_adjustment(0, 0, filesize in blocks, 1, 1))
>
> 2. Pass the right value to the progress bar
> (gtk_progress_set_value( progress, current block / filesize in blocks )
> so that the value is between 0 and 1.
>
> Up to you
>
> Bye
>
> Jan-Marek
The code about de progress bar is like this :
var info : stat;
adj : pgtkadjustment;
...
fstat (file_name, info);
...
adj := pgtkadjustment (gtk_adjustment_new (0, 1, info.size, 0, 0, 0));
progressbar := gtk_progress_bar_new_with_adjustment (adj);
...
and later the code i've sent before.
I think that the trouble is that the program loses the control of the main loop
while is reading the file and can't redraw the widget, what can i do ?
every time
--
Salutacions.
Jordi.
http://perso.wanadoo.es/jovy
mailto:jovy wanadoo es
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]