[Pkg-anonymity-tools] [onionshare] 120/140: split starting server status message into three verbose chunks
Ulrike Uhlig
u-guest at moszumanska.debian.org
Mon Sep 29 20:33:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch master
in repository onionshare.
commit 43a24a19d2d420aa444b35d43133b6ca0acbc425
Author: Micah Lee <micah at micahflee.com>
Date: Mon Sep 22 19:19:24 2014 +0000
split starting server status message into three verbose chunks
---
locale/en.json | 4 +++-
onionshare_gui/onionshare_gui.py | 15 +++++++++------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/locale/en.json b/locale/en.json
index c6fd73a..b0a0c3b 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -37,6 +37,8 @@
"gui_copy_url": "Copy URL",
"gui_downloads": "Downloads:",
"gui_copied_url": "Copied URL to clipboard",
- "gui_starting_server": "Please wait, starting server...",
+ "gui_starting_server1": "Starting Tor hidden service...",
+ "gui_starting_server2": "Crunching files...",
+ "gui_starting_server3": "Waiting for Tor hidden service...",
"gui_please_wait": "Please wait..."
}
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index 17c4daa..68727ee 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -45,7 +45,7 @@ class Application(QtGui.QApplication):
class OnionShareGui(QtGui.QWidget):
start_server_finished = QtCore.pyqtSignal()
stop_server_finished = QtCore.pyqtSignal()
- server_starting = QtCore.pyqtSignal()
+ starting_server_step2 = QtCore.pyqtSignal()
def __init__(self, qtapp, app):
super(OnionShareGui, self).__init__()
@@ -73,12 +73,12 @@ class OnionShareGui(QtGui.QWidget):
self.stop_server_finished.connect(self.server_status.stop_server_finished)
self.file_selection.file_list.files_updated.connect(self.server_status.update)
self.server_status.url_copied.connect(self.copy_url)
+ self.starting_server_step2.connect(self.start_server_step2)
# filesize warning
self.filesize_warning = QtGui.QLabel()
self.filesize_warning.setStyleSheet('padding: 10px 0; font-weight: bold; color: #333333;')
self.filesize_warning.hide()
- self.server_starting.connect(self.server_start_update)
# downloads
self.downloads = Downloads()
@@ -106,7 +106,9 @@ class OnionShareGui(QtGui.QWidget):
QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.check_for_requests)
self.timer.start(500)
- def server_start_update(self):
+ def start_server_step2(self):
+ self.status_bar.showMessage(strings._('gui_starting_server3', True))
+
# warn about sending large files over Tor
if web.zip_filesize >= 157286400: # 150mb
self.filesize_warning.setText(strings._("large_filesize", True))
@@ -114,7 +116,7 @@ class OnionShareGui(QtGui.QWidget):
def start_server(self):
# start the hidden service
- self.status_bar.showMessage(strings._('gui_starting_server', True).format(self.app.port))
+ self.status_bar.showMessage(strings._('gui_starting_server1', True))
try:
self.app.choose_port()
print strings._("connecting_ctrlport").format(self.app.port)
@@ -140,7 +142,7 @@ class OnionShareGui(QtGui.QWidget):
# prepare files to share
web.set_file_info(self.file_selection.file_list.filenames)
self.app.cleanup_filenames.append(web.zip_filename)
- self.server_starting.emit()
+ self.starting_server_step2.emit()
# wait for hs
self.app.wait_for_hs()
@@ -148,6 +150,7 @@ class OnionShareGui(QtGui.QWidget):
# done
self.start_server_finished.emit()
+ self.status_bar.showMessage(strings._('gui_starting_server2', True))
t = threading.Thread(target=finish_starting_server, kwargs={'self':self})
t.daemon = True
t.start()
@@ -190,7 +193,7 @@ class OnionShareGui(QtGui.QWidget):
# close on finish?
if not web.get_stay_open():
self.server_status.stop_server()
-
+
elif event["path"] != '/favicon.ico':
self.status_bar.showMessage('{0}: {1}'.format(strings._('other_page_loaded', True), event["path"]))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/onionshare.git
More information about the Pkg-anonymity-tools
mailing list