diff options
author | Dan Williams <dcbw@redhat.com> | 2007-03-14 16:52:34 (GMT) |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2007-03-14 16:52:34 (GMT) |
commit | 214c105f2edd4d43dfdce9bba928c5eccce7ff41 (patch) | |
tree | 3478483f0904b1706bd0aaaa935872431db7e4f8 /webactivity.py | |
parent | 3a4b3faa436ec55a04f5d7bb304f9377ebadba32 (diff) |
Don't signal 100% downloaded until completion
Diffstat (limited to 'webactivity.py')
-rwxr-xr-x | webactivity.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/webactivity.py b/webactivity.py index be441f8..8f3d11f 100755 --- a/webactivity.py +++ b/webactivity.py @@ -146,5 +146,10 @@ def download_progress_cb(download_manager, download): if not object_id: logging.debug("Unknown download object %r" % download) return - cb_service = clipboardservice.get_instance() - cb_service.set_object_percent(object_id, download.get_percent()) + + # don't send 100% unless it's really done, which we handle + # from download_completed_cb instead + percent = download.get_percent() + if percent < 100: + cb_service = clipboardservice.get_instance() + cb_service.set_object_percent(object_id, percent) |