From e65a605631ace12ceb6ebb9f6413934e16ba8339 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Sun, 11 Feb 2018 18:32:18 +1100 Subject: [PATCH 1/3] Set URL label tooltips --- install/onionshare.nsi | 2 ++ onionshare_gui/server_status.py | 17 ++++++++++------- share/images/info.png | Bin 0 -> 435 bytes share/locale/en.json | 9 +++++---- 4 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 share/images/info.png diff --git a/install/onionshare.nsi b/install/onionshare.nsi index 55ecdbcb..0a9e6cf2 100644 --- a/install/onionshare.nsi +++ b/install/onionshare.nsi @@ -203,6 +203,7 @@ Section "install" SetOutPath "$INSTDIR\share\images" File "${BINPATH}\share\images\favicon.ico" File "${BINPATH}\share\images\file_delete.png" + File "${BINPATH}\share\images\info.png" File "${BINPATH}\share\images\logo.png" File "${BINPATH}\share\images\logo_transparent.png" File "${BINPATH}\share\images\logo_grayscale.png" @@ -384,6 +385,7 @@ FunctionEnd Delete "$INSTDIR\share\html\index.html" Delete "$INSTDIR\share\images\favicon.ico" Delete "$INSTDIR\share\images\file_delete.png" + Delete "$INSTDIR\share\images\info.png" Delete "$INSTDIR\share\images\logo.png" Delete "$INSTDIR\share\images\logo_transparent.png" Delete "$INSTDIR\share\images\logo_grayscale.png" diff --git a/onionshare_gui/server_status.py b/onionshare_gui/server_status.py index ec046fa6..3dc29c9a 100644 --- a/onionshare_gui/server_status.py +++ b/onionshare_gui/server_status.py @@ -145,15 +145,18 @@ class ServerStatus(QtWidgets.QWidget): if self.status == self.STATUS_STARTED: self.url_description.show() + info_image = common.get_resource_path('images/info.png') + self.url_label.setText(strings._('gui_url_label', True).format(info_image)) + # Show a Tool Tip explaining the lifecycle of this URL if self.settings.get('save_private_key'): - self.url_label.setText(strings._('gui_url_label_persistent', True)) - self.url_label.setToolTip(strings._('gui_url_persistence_warning', True)) - elif self.settings.get('close_after_first_download'): - self.url_label.setText(strings._('gui_url_label_one_time', True)) - self.url_label.setToolTip('') + if self.settings.get('close_after_first_download'): + self.url_label.setToolTip(strings._('gui_url_label_onetime_and_persistent', True)) + else: + self.url_label.setToolTip(strings._('gui_url_label_persistent', True)) + if self.settings.get('close_after_first_download'): + self.url_label.setToolTip(strings._('gui_url_label_onetime', True)) else: - self.url_label.setText(strings._('gui_url_label', True)) - self.url_label.setToolTip('') + self.url_label.setToolTip(strings._('gui_url_label_stay_open', True)) self.url_label.show() self.url.setText('http://{0:s}/{1:s}'.format(self.app.onion_host, self.web.slug)) diff --git a/share/images/info.png b/share/images/info.png new file mode 100644 index 0000000000000000000000000000000000000000..4be4e65e25a9de5a72ab547ea0cb0a88ccb51d49 GIT binary patch literal 435 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$0wn*`OvwRKEa{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4UhtqZsbPuAQPYE0nReaf zHmT@qc)%3H6z;6QpqPFu(@jE>tkQj= z+fpZ;+B-ieOkj@mj*rW(m8Lz5n*8|6fu;Gv>-B7QeR`wE;kL|9*S6wN`^t#|E*E9m z%f99$>2>Wi)Bh&RnaewAN&l^+yqYERzB~gY<1iI9cv$SF6?+x zru*Z*sy5>{^Sh@6%cptHh$g5TZds;>#PL1_n=8KbLh*2~7ZLaFgNy literal 0 HcmV?d00001 diff --git a/share/locale/en.json b/share/locale/en.json index 2daff998..5f7f364d 100644 --- a/share/locale/en.json +++ b/share/locale/en.json @@ -134,10 +134,11 @@ "share_via_onionshare": "Share via OnionShare", "gui_save_private_key_checkbox": "Use a persistent address\n(unchecking will delete any saved address)", "gui_url_description": "Anyone with this link can download your files using Tor Browser:", - "gui_url_label": "Your Download Address", - "gui_url_label_persistent": "Your Persistent Download Address (what's this?)", - "gui_url_label_one_time": "Your One-Time Download Address", - "gui_url_persistence_warning": "Every share will have the same URL.

If you want to go back to using one-time URLs, turn off persistence in the Settings.", + "gui_url_label": "Your Download Address ", + "gui_url_label_persistent": "Every share will have the same URL.

If you want to go back to using one-time URLs, turn off persistence in the Settings.", + "gui_url_label_stay_open": "This URL will exist until you stop the share", + "gui_url_label_onetime": "This URL will only exist until the share is stopped or when the first download occurs.", + "gui_url_label_onetime_and_persistent": "This share will stop when first download occurs, but every future share will have the same URL.

If you want to go back to using one-time URLs, turn off persistence in the Settings.", "gui_status_indicator_stopped": "Ready to Share", "gui_status_indicator_working": "Starting...", "gui_status_indicator_started": "Sharing", From bc2b7179079b198a3305a66b87082ae5b4a8f574 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 13 Feb 2018 17:50:10 -0800 Subject: [PATCH 2/3] Fix bug where persistent tooltips were not displaying --- onionshare_gui/server_status.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/onionshare_gui/server_status.py b/onionshare_gui/server_status.py index 654c4c28..1bd18e2f 100644 --- a/onionshare_gui/server_status.py +++ b/onionshare_gui/server_status.py @@ -137,10 +137,11 @@ class ServerStatus(QtWidgets.QWidget): self.url_label.setToolTip(strings._('gui_url_label_onetime_and_persistent', True)) else: self.url_label.setToolTip(strings._('gui_url_label_persistent', True)) - if self.settings.get('close_after_first_download'): - self.url_label.setToolTip(strings._('gui_url_label_onetime', True)) else: - self.url_label.setToolTip(strings._('gui_url_label_stay_open', True)) + if self.settings.get('close_after_first_download'): + self.url_label.setToolTip(strings._('gui_url_label_onetime', True)) + else: + self.url_label.setToolTip(strings._('gui_url_label_stay_open', True)) self.url_label.show() self.url.setText('http://{0:s}/{1:s}'.format(self.app.onion_host, self.web.slug)) From 2077d09cbb821f283e98466edef11fb009228b53 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 13 Feb 2018 17:58:51 -0800 Subject: [PATCH 3/3] Update tooltip strings, and also copy to clipboard strings --- share/locale/en.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/share/locale/en.json b/share/locale/en.json index 76c36e0f..cda00fcb 100644 --- a/share/locale/en.json +++ b/share/locale/en.json @@ -44,8 +44,8 @@ "gui_copy_hidservauth": "Copy HidServAuth", "gui_downloads": "Downloads:", "gui_canceled": "Canceled", - "gui_copied_url_title": "Copied Onion address", - "gui_copied_url": "The Onion address has been copied to clipboard", + "gui_copied_url_title": "Copied OnionShare address", + "gui_copied_url": "The OnionShare address has been copied to clipboard", "gui_copied_hidservauth_title": "Copied HidServAuth", "gui_copied_hidservauth": "The HidServAuth line has been copied to clipboard", "gui_starting_server1": "Starting Tor onion service...", @@ -137,10 +137,10 @@ "gui_save_private_key_checkbox": "Use a persistent address\n(unchecking will delete any saved address)", "gui_url_description": "Anyone with this link can download your files using Tor Browser:", "gui_url_label": "Your Download Address ", - "gui_url_label_persistent": "Every share will have the same URL.

If you want to go back to using one-time URLs, turn off persistence in the Settings.", - "gui_url_label_stay_open": "This URL will exist until you stop the share", - "gui_url_label_onetime": "This URL will only exist until the share is stopped or when the first download occurs.", - "gui_url_label_onetime_and_persistent": "This share will stop when first download occurs, but every future share will have the same URL.

If you want to go back to using one-time URLs, turn off persistence in the Settings.", + "gui_url_label_persistent": "This share will not stop automatically

Every share will have the same address (to use one-time addresses, disable persistence in the Settings)", + "gui_url_label_stay_open": "This share will not stop automatically", + "gui_url_label_onetime": "This share will stop after the first download", + "gui_url_label_onetime_and_persistent": "This share will stop after the first download

Every share will have the same address (to use one-time addresses, disable persistence in the Settings)", "gui_status_indicator_stopped": "Ready to Share", "gui_status_indicator_working": "Starting...", "gui_status_indicator_started": "Sharing",