encode one way for CLI, encode another for GUI (#141)

This commit is contained in:
Micah Lee 2014-09-16 02:09:37 +00:00
parent fec0c9ad65
commit 89581b0a03
6 changed files with 21 additions and 18 deletions

View file

@ -100,7 +100,7 @@ class OnionShareGui(QtGui.QWidget):
def start_server(self):
# start the hidden service
self.status_bar.showMessage(strings._('gui_starting_server').format(self.app.port))
self.status_bar.showMessage(strings._('gui_starting_server', True).format(self.app.port))
try:
self.app.choose_port()
print strings._("connecting_ctrlport").format(self.app.port)
@ -161,7 +161,7 @@ class OnionShareGui(QtGui.QWidget):
for event in events:
if event["type"] == web.REQUEST_LOAD:
self.status_bar.showMessage(strings._('download_page_loaded'))
self.status_bar.showMessage(strings._('download_page_loaded', True))
elif event["type"] == web.REQUEST_DOWNLOAD:
self.downloads.add_download(event["data"]["id"], web.zip_filesize)
@ -176,10 +176,10 @@ class OnionShareGui(QtGui.QWidget):
self.server_status.stop_server()
elif event["path"] != '/favicon.ico':
self.status_bar.showMessage('{0}: {1}'.format(strings._('other_page_loaded'), event["path"]))
self.status_bar.showMessage('{0}: {1}'.format(strings._('other_page_loaded', True), event["path"]))
def copy_url(self):
self.status_bar.showMessage(strings._('gui_copied_url'), 2000)
self.status_bar.showMessage(strings._('gui_copied_url', True), 2000)
def clear_message(self):
self.status_bar.clearMessage()
@ -221,7 +221,7 @@ def main():
valid = True
for filename in filenames:
if not os.path.exists(filename):
alert(strings._("not_a_file").format(filename))
alert(strings._("not_a_file", True).format(filename))
valid = False
if not valid:
sys.exit()