diff options
author | Miguel Jacq <mig@mig5.net> | 2019-03-24 16:48:56 +1100 |
---|---|---|
committer | Miguel Jacq <mig@mig5.net> | 2019-03-24 16:48:56 +1100 |
commit | 281af5fc1a93c7c68a790ac1a6dba00dd41231da (patch) | |
tree | 389db5c4476d4647629839cc976b7860a368b05f | |
parent | 5d3604829801b000948f006304edf81c373191f4 (diff) | |
download | onionshare-281af5fc1a93c7c68a790ac1a6dba00dd41231da.tar.gz onionshare-281af5fc1a93c7c68a790ac1a6dba00dd41231da.zip |
Show the URL description label whenever we are showing the URL itself
-rw-r--r-- | onionshare_gui/server_status.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/onionshare_gui/server_status.py b/onionshare_gui/server_status.py index 3000491e..7d86a368 100644 --- a/onionshare_gui/server_status.py +++ b/onionshare_gui/server_status.py @@ -201,6 +201,27 @@ class ServerStatus(QtWidgets.QWidget): """ Show the URL in the UI. """ + self.url_description.show() + + info_image = self.common.get_resource_path('images/info.png') + + if self.mode == ServerStatus.MODE_SHARE: + self.url_description.setText(strings._('gui_share_url_description').format(info_image)) + else: + self.url_description.setText(strings._('gui_receive_url_description').format(info_image)) + + # Show a Tool Tip explaining the lifecycle of this URL + if self.common.settings.get('save_private_key'): + if self.mode == ServerStatus.MODE_SHARE and self.common.settings.get('close_after_first_download'): + self.url_description.setToolTip(strings._('gui_url_label_onetime_and_persistent')) + else: + self.url_description.setToolTip(strings._('gui_url_label_persistent')) + else: + if self.mode == ServerStatus.MODE_SHARE and self.common.settings.get('close_after_first_download'): + self.url_description.setToolTip(strings._('gui_url_label_onetime')) + else: + self.url_description.setToolTip(strings._('gui_url_label_stay_open')) + self.url.setText(self.get_url()) self.url.show() self.copy_url_button.show() @@ -216,27 +237,6 @@ class ServerStatus(QtWidgets.QWidget): """ # Set the URL fields if self.status == self.STATUS_STARTED: - self.url_description.show() - - info_image = self.common.get_resource_path('images/info.png') - - if self.mode == ServerStatus.MODE_SHARE: - self.url_description.setText(strings._('gui_share_url_description').format(info_image)) - else: - self.url_description.setText(strings._('gui_receive_url_description').format(info_image)) - - # Show a Tool Tip explaining the lifecycle of this URL - if self.common.settings.get('save_private_key'): - if self.mode == ServerStatus.MODE_SHARE and self.common.settings.get('close_after_first_download'): - self.url_description.setToolTip(strings._('gui_url_label_onetime_and_persistent')) - else: - self.url_description.setToolTip(strings._('gui_url_label_persistent')) - else: - if self.mode == ServerStatus.MODE_SHARE and self.common.settings.get('close_after_first_download'): - self.url_description.setToolTip(strings._('gui_url_label_onetime')) - else: - self.url_description.setToolTip(strings._('gui_url_label_stay_open')) - self.show_url() if self.common.settings.get('save_private_key'): |