[Pkg-privacy-commits] [onionshare] 02/256: reorganize, add comment
Ulrike Uhlig
ulrike at moszumanska.debian.org
Fri May 26 12:53:00 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 d0f085f7560c2c8f70b65b2e41745b410f462f2d
Author: choltz95 <chesterholtz at gmail.com>
Date: Tue Aug 2 16:43:40 2016 +0000
reorganize, add comment
---
onionshare_gui/downloads.py | 2 +-
onionshare_gui/onionshare_gui.py | 21 +++++++++++----------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/onionshare_gui/downloads.py b/onionshare_gui/downloads.py
index 7b6016c..7729f8c 100644
--- a/onionshare_gui/downloads.py
+++ b/onionshare_gui/downloads.py
@@ -56,7 +56,7 @@ class Download(object):
elapsed = time.time() - self.started
if elapsed < 10:
# Wait a couple of seconds for the download rate to stabilize.
- # This prevents an "Windows copy dialog"-esque experience at
+ # This prevents a "Windows copy dialog"-esque experience at
# the beginning of the download.
pb_fmt = strings._('gui_download_progress_starting').format(
helpers.human_readable_filesize(downloaded_bytes))
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index bad561a..146856e 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -98,6 +98,13 @@ class OnionShareGui(QtWidgets.QMainWindow):
# downloads
self.downloads = Downloads()
+ self.downloads_layout = QtWidgets.QGroupBox()
+ self.downloads_layout.setLayout(self.downloads)
+ self.downloads_layout_container = QtWidgets.QScrollArea()
+ self.downloads_layout_container.setWidget(self.downloads_layout)
+ self.downloads_layout_container.setWidgetResizable(True)
+ self.downloads_layout_container.setFixedHeight(80)
+ self.vbar = self.downloads_layout_container.verticalScrollBar()
# options
self.options = Options(web, self.app)
@@ -108,19 +115,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
version_label = QtWidgets.QLabel('v{0:s}'.format(helpers.get_version()))
version_label.setStyleSheet('color: #666666; padding: 0 10px;')
self.status_bar.addPermanentWidget(version_label)
- self.setStatusBar(self.status_bar)
+ self.setStatusBar(self.status_bar)
# main layout
self.layout = QtWidgets.QVBoxLayout()
-
- self.downloads_layout = QtWidgets.QGroupBox()
- self.downloads_layout.setLayout(self.downloads)
- self.downloads_layout_container = QtWidgets.QScrollArea()
- self.downloads_layout_container.setWidget(self.downloads_layout)
- self.downloads_layout_container.setWidgetResizable(True)
- self.downloads_layout_container.setFixedHeight(80)
- self.vbar = self.downloads_layout_container.verticalScrollBar()
-
self.layout.addLayout(self.file_selection)
self.layout.addLayout(self.server_status)
self.layout.addWidget(self.filesize_warning)
@@ -219,7 +217,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
events.append(r)
except web.queue.Empty:
done = True
+
+ # scroll to the bottom of the dl progress bar log pane
self.vbar.setValue(self.vbar.maximum())
+
for event in events:
if event["type"] == web.REQUEST_LOAD:
self.status_bar.showMessage(strings._('download_page_loaded', True))
--
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