Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdfviewer.py
diff options
context:
space:
mode:
Diffstat (limited to 'pdfviewer.py')
-rw-r--r--pdfviewer.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pdfviewer.py b/pdfviewer.py
index 7557594..f30dbc0 100644
--- a/pdfviewer.py
+++ b/pdfviewer.py
@@ -503,12 +503,22 @@ class PDFTabPage(Gtk.HBox):
self._download = WebKit.Download.new(network_request)
self._download.set_destination_uri('file://' + dest_path)
- self._download.connect('notify::progress', self.__download_progress_cb)
+ # FIXME: workaround for SL #4385
+ # self._download.connect('notify::progress', self.__download_progress_cb)
+ self._download.connect('notify::current-size',
+ self.__current_size_changed_cb)
self._download.connect('notify::status', self.__download_status_cb)
self._download.connect('error', self.__download_error_cb)
self._download.start()
+ def __current_size_changed_cb(self, download, something):
+ current_size = download.get_current_size()
+ total_size = download.get_total_size()
+ progress = current_size / float(total_size)
+ self._browser.props.progress = progress
+ self._message_box.progress_icon.update(progress)
+
def __download_progress_cb(self, download, data):
progress = download.get_progress()
self._browser.props.progress = progress