From 85907976409ee755d92b988e93b8b99e03caa8fc Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 6 Feb 2018 17:47:05 -0800 Subject: [PATCH] Improve the UI of the quit warning --- onionshare_gui/onionshare_gui.py | 4 +++- share/locale/en.json | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index 02e3d625..64807418 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -555,9 +555,11 @@ class OnionShareGui(QtWidgets.QMainWindow): common.log('OnionShareGui', 'closeEvent') try: if self.server_status.status != self.server_status.STATUS_STOPPED: + common.log('OnionShareGui', 'closeEvent, opening warning dialog') dialog = QtWidgets.QMessageBox() - dialog.setWindowTitle("OnionShare") + dialog.setWindowTitle(strings._('gui_quit_title', True)) dialog.setText(strings._('gui_quit_warning', True)) + dialog.setIcon(QtWidgets.QMessageBox.Critical) quit_button = dialog.addButton(strings._('gui_quit_warning_quit', True), QtWidgets.QMessageBox.YesRole) dont_quit_button = dialog.addButton(strings._('gui_quit_warning_dont_quit', True), QtWidgets.QMessageBox.NoRole) dialog.setDefaultButton(dont_quit_button) diff --git a/share/locale/en.json b/share/locale/en.json index a3f577a4..c53311fc 100644 --- a/share/locale/en.json +++ b/share/locale/en.json @@ -56,9 +56,10 @@ "gui_download_progress_starting": "{0:s}, %p% (Computing ETA)", "gui_download_progress_eta": "{0:s}, ETA: {1:s}, %p%", "version_string": "Onionshare {0:s} | https://onionshare.org/", - "gui_quit_warning": "Are you sure you want to quit?\nThe address you are sharing won't exist anymore.", + "gui_quit_title": "Transfer in Progress", + "gui_quit_warning": "You're in the process of sending files. Are you sure you want to quit OnionShare?", "gui_quit_warning_quit": "Quit", - "gui_quit_warning_dont_quit": "Don't Quit", + "gui_quit_warning_dont_quit": "Cancel", "error_rate_limit": "An attacker might be trying to guess your address. To prevent this, OnionShare has automatically stopped the server. To share the files you must start it again and share the new address.", "zip_progress_bar_format": "Crunching files: %p%", "error_stealth_not_supported": "To create stealth onion services, you need at least Tor 0.2.9.1-alpha (or Tor Browser 6.5) and at least python3-stem 1.5.0.",