Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xwebactivity.py9
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)