[Pkg-privacy-commits] [onionshare] 05/256: small refactoring

Ulrike Uhlig ulrike at moszumanska.debian.org
Fri May 26 12:53:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

ulrike pushed a commit to branch master
in repository onionshare.

commit 3b11f4d38249823c56f3a4874c5e886ca2de3619
Author: Srinivas Devaki <mr.eightnoteight at gmail.com>
Date:   Wed Aug 24 02:15:58 2016 +0530

    small refactoring
---
 onionshare_gui/onionshare_gui.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index d8ada3c..149f7e8 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -168,20 +168,19 @@ class OnionShareGui(QtWidgets.QMainWindow):
         t.daemon = True
         t.start()
 
+        # add progress bar to the status bar, indicating the crunching of files.
         self._zip_progress_bar = ZipProgressBar(0)
+        self._zip_progress_bar.total_files_size = OnionShareGui._compute_total_size(
+            self.file_selection.file_list.filenames)
         self.status_bar.clearMessage()
         self.status_bar.insertWidget(0, self._zip_progress_bar)
 
         # prepare the files for sending in a new thread
         def finish_starting_server(self):
-            # prepare files to share
-            progress_bar = self._zip_progress_bar
-            progress_bar.total_files_size = OnionShareGui._compute_total_size(
-                self.file_selection.file_list.filenames)
-
             def _set_processed_size(x):
-                progress_bar.processed_size = x
+                self._zip_progress_bar.processed_size = x
 
+            # prepare files to share
             web.set_file_info(self.file_selection.file_list.filenames, processed_size_callback=_set_processed_size)
 
             self.app.cleanup_filenames.append(web.zip_filename)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git



More information about the Pkg-privacy-commits mailing list