aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2017-05-22 16:44:10 -0700
committerMicah Lee <micah@micahflee.com>2017-05-22 16:44:10 -0700
commite97d1e6ce3a9863b2111b257d19b2da4b5519eb0 (patch)
tree5349da5bcd9a06a86300c700967e81a202d92839
parentb170ec536e0b9376b2c65cddde132f7f575693a5 (diff)
parent8bc280ff7a48c7b4311e63552b1e93baaa446bfa (diff)
downloadonionshare-e97d1e6ce3a9863b2111b257d19b2da4b5519eb0.tar.gz
onionshare-e97d1e6ce3a9863b2111b257d19b2da4b5519eb0.zip
Merge branch 'add_help_button' of https://github.com/mig5/onionshare into mig5-add_help_button
-rw-r--r--onionshare_gui/settings_dialog.py11
-rw-r--r--share/locale/en.json1
2 files changed, 12 insertions, 0 deletions
diff --git a/onionshare_gui/settings_dialog.py b/onionshare_gui/settings_dialog.py
index c8df0f6c..f2a80272 100644
--- a/onionshare_gui/settings_dialog.py
+++ b/onionshare_gui/settings_dialog.py
@@ -219,7 +219,10 @@ class SettingsDialog(QtWidgets.QDialog):
self.save_button.clicked.connect(self.save_clicked)
self.cancel_button = QtWidgets.QPushButton(strings._('gui_settings_button_cancel', True))
self.cancel_button.clicked.connect(self.cancel_clicked)
+ self.help_button = QtWidgets.QPushButton(strings._('gui_settings_button_help', True))
+ self.help_button.clicked.connect(self.help_clicked)
buttons_layout = QtWidgets.QHBoxLayout()
+ buttons_layout.addWidget(self.help_button)
buttons_layout.addStretch()
buttons_layout.addWidget(self.save_button)
buttons_layout.addWidget(self.cancel_button)
@@ -502,6 +505,14 @@ class SettingsDialog(QtWidgets.QDialog):
common.log('SettingsDialog', 'cancel_clicked')
self.close()
+ def help_clicked(self):
+ """
+ Help button clicked.
+ """
+ common.log('SettingsDialog', 'help_clicked')
+ help_site = 'https://github.com/micahflee/onionshare/wiki'
+ QtGui.QDesktopServices.openUrl(QtCore.QUrl(help_site))
+
def settings_from_fields(self):
"""
Return a Settings object that's full of values from the settings dialog.
diff --git a/share/locale/en.json b/share/locale/en.json
index 1a87dd20..31758de5 100644
--- a/share/locale/en.json
+++ b/share/locale/en.json
@@ -89,6 +89,7 @@
"gui_settings_cookie_label": "Cookie path",
"gui_settings_button_save": "Save",
"gui_settings_button_cancel": "Cancel",
+ "gui_settings_button_help": "Help",
"settings_saved": "Settings saved to {}",
"settings_error_unknown": "Can't connect to Tor controller because the settings don't make sense.",
"settings_error_automatic": "Can't connect to Tor controller. Is Tor Browser running in the background? If you don't have it you can get it from:\nhttps://www.torproject.org/.",