mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-19 06:40:22 -04:00
Merge branch 'mig5-add_help_button'
This commit is contained in:
commit
81edfa75af
2 changed files with 12 additions and 0 deletions
|
@ -219,7 +219,10 @@ class SettingsDialog(QtWidgets.QDialog):
|
||||||
self.save_button.clicked.connect(self.save_clicked)
|
self.save_button.clicked.connect(self.save_clicked)
|
||||||
self.cancel_button = QtWidgets.QPushButton(strings._('gui_settings_button_cancel', True))
|
self.cancel_button = QtWidgets.QPushButton(strings._('gui_settings_button_cancel', True))
|
||||||
self.cancel_button.clicked.connect(self.cancel_clicked)
|
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 = QtWidgets.QHBoxLayout()
|
||||||
|
buttons_layout.addWidget(self.help_button)
|
||||||
buttons_layout.addStretch()
|
buttons_layout.addStretch()
|
||||||
buttons_layout.addWidget(self.save_button)
|
buttons_layout.addWidget(self.save_button)
|
||||||
buttons_layout.addWidget(self.cancel_button)
|
buttons_layout.addWidget(self.cancel_button)
|
||||||
|
@ -502,6 +505,14 @@ class SettingsDialog(QtWidgets.QDialog):
|
||||||
common.log('SettingsDialog', 'cancel_clicked')
|
common.log('SettingsDialog', 'cancel_clicked')
|
||||||
self.close()
|
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):
|
def settings_from_fields(self):
|
||||||
"""
|
"""
|
||||||
Return a Settings object that's full of values from the settings dialog.
|
Return a Settings object that's full of values from the settings dialog.
|
||||||
|
|
|
@ -89,6 +89,7 @@
|
||||||
"gui_settings_cookie_label": "Cookie path",
|
"gui_settings_cookie_label": "Cookie path",
|
||||||
"gui_settings_button_save": "Save",
|
"gui_settings_button_save": "Save",
|
||||||
"gui_settings_button_cancel": "Cancel",
|
"gui_settings_button_cancel": "Cancel",
|
||||||
|
"gui_settings_button_help": "Help",
|
||||||
"settings_saved": "Settings saved to {}",
|
"settings_saved": "Settings saved to {}",
|
||||||
"settings_error_unknown": "Can't connect to Tor controller because the settings don't make sense.",
|
"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/.",
|
"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/.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue