Make what's this links use the same string, and change their style

This commit is contained in:
Micah Lee 2018-09-17 16:11:52 -07:00
parent cddc7f8c57
commit 359e470383
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
3 changed files with 16 additions and 10 deletions

View File

@ -346,6 +346,11 @@ class Common(object):
background-color: #ffffff;
color: #000000;
padding: 10px;
}""",
'settings_whats_this': """
QLabel {
font-size: 12px;
}"""
}

View File

@ -58,7 +58,8 @@ class SettingsDialog(QtWidgets.QDialog):
self.public_mode_checkbox = QtWidgets.QCheckBox()
self.public_mode_checkbox.setCheckState(QtCore.Qt.Unchecked)
self.public_mode_checkbox.setText(strings._("gui_settings_public_mode_checkbox", True))
public_mode_label = QtWidgets.QLabel(strings._("gui_settings_public_mode_details", True))
public_mode_label = QtWidgets.QLabel(strings._("gui_settings_whats_this", True).format("https://github.com/micahflee/onionshare/wiki/Public-Mode"))
public_mode_label.setStyleSheet(self.common.css['settings_whats_this'])
public_mode_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
public_mode_label.setOpenExternalLinks(True)
public_mode_label.setMinimumSize(public_mode_label.sizeHint())
@ -74,7 +75,8 @@ class SettingsDialog(QtWidgets.QDialog):
self.shutdown_timeout_checkbox = QtWidgets.QCheckBox()
self.shutdown_timeout_checkbox.setCheckState(QtCore.Qt.Checked)
self.shutdown_timeout_checkbox.setText(strings._("gui_settings_shutdown_timeout_checkbox", True))
shutdown_timeout_label = QtWidgets.QLabel(strings._("gui_settings_shutdown_timeout_details", True))
shutdown_timeout_label = QtWidgets.QLabel(strings._("gui_settings_whats_this", True).format("https://github.com/micahflee/onionshare/wiki/Using-the-Auto-Stop-Timer"))
shutdown_timeout_label.setStyleSheet(self.common.css['settings_whats_this'])
shutdown_timeout_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
shutdown_timeout_label.setOpenExternalLinks(True)
shutdown_timeout_label.setMinimumSize(public_mode_label.sizeHint())
@ -91,7 +93,8 @@ class SettingsDialog(QtWidgets.QDialog):
self.use_legacy_v2_onions_checkbox.setCheckState(QtCore.Qt.Unchecked)
self.use_legacy_v2_onions_checkbox.setText(strings._("gui_use_legacy_v2_onions_checkbox", True))
self.use_legacy_v2_onions_checkbox.clicked.connect(self.use_legacy_v2_onions_checkbox_clicked)
use_legacy_v2_onions_label = QtWidgets.QLabel(strings._("gui_use_legacy_v2_onions_label", True))
use_legacy_v2_onions_label = QtWidgets.QLabel(strings._("gui_settings_whats_this", True).format("https://github.com/micahflee/onionshare/wiki/Legacy-Addresses"))
use_legacy_v2_onions_label.setStyleSheet(self.common.css['settings_whats_this'])
use_legacy_v2_onions_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
use_legacy_v2_onions_label.setOpenExternalLinks(True)
use_legacy_v2_onions_layout = QtWidgets.QHBoxLayout()
@ -107,7 +110,8 @@ class SettingsDialog(QtWidgets.QDialog):
self.save_private_key_checkbox.setCheckState(QtCore.Qt.Unchecked)
self.save_private_key_checkbox.setText(strings._("gui_save_private_key_checkbox", True))
self.save_private_key_checkbox.clicked.connect(self.save_private_key_checkbox_clicked)
save_private_key_label = QtWidgets.QLabel(strings._("gui_save_private_key_label", True))
save_private_key_label = QtWidgets.QLabel(strings._("gui_settings_whats_this", True).format("https://github.com/micahflee/onionshare/wiki/Using-a-Persistent-URL"))
save_private_key_label.setStyleSheet(self.common.css['settings_whats_this'])
save_private_key_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
save_private_key_label.setOpenExternalLinks(True)
save_private_key_layout = QtWidgets.QHBoxLayout()
@ -123,7 +127,8 @@ class SettingsDialog(QtWidgets.QDialog):
self.stealth_checkbox.setCheckState(QtCore.Qt.Unchecked)
self.stealth_checkbox.setText(strings._("gui_settings_stealth_option", True))
self.stealth_checkbox.clicked.connect(self.stealth_checkbox_clicked_connect)
use_stealth_label = QtWidgets.QLabel(strings._("gui_settings_stealth_option_details", True))
use_stealth_label = QtWidgets.QLabel(strings._("gui_settings_whats_this", True).format("https://github.com/micahflee/onionshare/wiki/Stealth-Onion-Services"))
use_stealth_label.setStyleSheet(self.common.css['settings_whats_this'])
use_stealth_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
use_stealth_label.setOpenExternalLinks(True)
use_stealth_label.setMinimumSize(use_stealth_label.sizeHint())

View File

@ -71,8 +71,8 @@
"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.",
"error_ephemeral_not_supported": "OnionShare requires at least Tor 0.2.7.1 and at least python3-stem 1.4.0.",
"gui_settings_window_title": "Settings",
"gui_settings_whats_this": "<a href='{0:s}'>what's this?</a>",
"gui_settings_stealth_option": "Create stealth onion services (legacy)",
"gui_settings_stealth_option_details": "(<a href=\"https://github.com/micahflee/onionshare/wiki/Stealth-Onion-Services\">what's this?</a>)",
"gui_settings_stealth_hidservauth_string": "You have saved the private key for reuse, so your HidServAuth string is also reused.\nClick below to copy the HidServAuth.",
"gui_settings_autoupdate_label": "Check for upgrades",
"gui_settings_autoupdate_option": "Notify me when upgrades are available",
@ -109,7 +109,6 @@
"gui_settings_button_cancel": "Cancel",
"gui_settings_button_help": "Help",
"gui_settings_shutdown_timeout_checkbox": "Use auto-stop timer",
"gui_settings_shutdown_timeout_details": "(<a href=\"https://github.com/micahflee/onionshare/wiki/Using-the-Auto-Stop-Timer\">what's this?</a>)",
"gui_settings_shutdown_timeout": "Stop the share at:",
"settings_saved": "Settings saved to {}",
"settings_error_unknown": "Can't connect to Tor controller because the settings don't make sense.",
@ -140,9 +139,7 @@
"gui_server_timeout_expired": "The chosen timeout has already expired.\nPlease update the timeout and then you may start sharing.",
"share_via_onionshare": "Share via OnionShare",
"gui_use_legacy_v2_onions_checkbox": "Use legacy addresses",
"gui_use_legacy_v2_onions_label": "(<a href=\"https://github.com/micahflee/onionshare/wiki/Legacy-Addresses\">what's this?</a>)",
"gui_save_private_key_checkbox": "Use a persistent address (legacy)",
"gui_save_private_key_label": "(<a href=\"https://github.com/micahflee/onionshare/wiki/Using-a-Persistent-URL\">what's this?</a>)",
"gui_share_url_description": "<b>Anyone</b> with this link can <b>download</b> your files using the <b>Tor Browser</b>: <img src='{}' />",
"gui_receive_url_description": "<b>Anyone</b> with this link can <b>upload</b> files to your computer using the <b>Tor Browser</b>: <img src='{}' />",
"gui_url_label_persistent": "This share will not expire automatically unless a timer is set.<br><br>Every share will have the same address (to use one-time addresses, disable persistence in Settings)",
@ -175,7 +172,6 @@
"gui_settings_downloads_button": "Browse",
"gui_settings_receive_allow_receiver_shutdown_checkbox": "Receive mode can be stopped by the sender",
"gui_settings_public_mode_checkbox": "Public mode",
"gui_settings_public_mode_details": "(<a href=\"https://github.com/micahflee/onionshare/wiki/Public-Mode\">what's this?</a>)",
"systray_close_server_title": "OnionShare Server Closed",
"systray_close_server_message": "A user closed the server",
"systray_page_loaded_title": "OnionShare Page Loaded",