[sugar] Document sharing issues
Chris Ball
cjb at laptop.org
Mon Apr 21 12:11:39 EDT 2008
Hi James,
> 3). Because downloading documents is so slow, I have modified my
> Read toolbar to have a running count of bytes downloaded so the
> user doesn't have to stare at an unchanging screen for several
> minutes wondering if anything is going on. In the core Read code I
> modified to do this there is a comment that it would be good to
> signal the file size of the file being sent, so the user could see
> a progress bar. The author never got around to doing that, so I
> don't know how to do that either. How would I go about it?
You should be able to pull it out of the underlying GlibURLDownloader
(getter) headers from inside _download_progress_cb(), like so:
size = getter._info.headers["Content-Length"]
But, what we should really do is provide an accessor in sugar/network.py.
The advantage of the above is that, even though it's groveling inside
the downloader internals, it won't require introducing a new API
dependency between activities and sugar. Sugar gang, any thoughts?
- Chris.
--
Chris Ball <cjb at laptop.org>
More information about the Sugar
mailing list