[packagekit] how make a percercent on downloading ....
hughsient at gmail.com
Fri Feb 13 01:45:47 PST 2009
On Fri, 2009-02-13 at 02:29 -0600, zodman wrote:
> How can i make a bar percent for represent the download of changeset
> some like:
> DownloadFiles [ ========== ] #%%
Okay, PackageKit doesn't really have the notion of percentage-tasks.
PackageKit has three concepts:
* StatusChanged (tell the UI what you are doing)
* PercentageChanged (including all the operations of the transactions)
* SubPercentageChanged (which is a small part of the transaction, e.g.
Percentage is what we show on the UI, and also what we use for the time
estimation, so it's important you use that too.
What you should be doing is something like this:
STATUS cleaning up
Now, a sub task doesn't have to be "download everything", a sub-task can
be download package A, and another sub-task for download package B.
PackageKit doesn't define what a sub task it, as that would be different
for all the backends.
You should also try to do as many PercentageChanged events as possible,
as this makes the time remaining calculations more accurate, and also
makes the progress bar move smoothly from left to right without
More information about the PackageKit