[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: GTK Progress bar: assistance pls.
- From: Bin Chen <binary chen gmail com>
- To: vijayasarathy setsindia net
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GTK Progress bar: assistance pls.
- Date: Mon, 07 Jan 2008 15:31:56 +0800
在 2008-01-07一的 13:04 +0530,vijayasarathy setsindia net写道:
>
> Hey Bin Chen[or how do I call you :-)],
>
> First of all, thank you very much for your instant reply.
>
> Let me give a simple pseudo-code explaining my problem. Please see what I
> can do with this.
>
> Program Goal: Do work w1 "iterations" number of times, and keep showing
> progress of this whole work regularly.
>
> Pseudo code:
>
> for(i=0;i<iterations;i++)
> {
> do w1;
> fraction = (i+1)/iterations;
> Update progress bar using this fraction.
> }
There are somthing wrong with your programe. I use
gtk_progress_bar_set_fraction() can properly update the bar. Be
noticed that the number is in float number, if you ignore this there
will only be two numbers in integer, 0 and 1.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]