mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-26 19:22:59 -03:00
Refactor help button to use QDesktopServices.openUrl()
This commit is contained in:
parent
aa7e609e14
commit
8bc280ff7a
1 changed files with 2 additions and 8 deletions
|
@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
from PyQt5 import QtCore, QtWidgets, QtGui
|
from PyQt5 import QtCore, QtWidgets, QtGui
|
||||||
import os, sys, platform, datetime, webbrowser
|
import sys, platform, datetime
|
||||||
|
|
||||||
from onionshare import strings, common
|
from onionshare import strings, common
|
||||||
from onionshare.settings import Settings
|
from onionshare.settings import Settings
|
||||||
|
@ -499,13 +499,7 @@ class SettingsDialog(QtWidgets.QDialog):
|
||||||
"""
|
"""
|
||||||
common.log('SettingsDialog', 'help_clicked')
|
common.log('SettingsDialog', 'help_clicked')
|
||||||
help_site = 'https://github.com/micahflee/onionshare/wiki'
|
help_site = 'https://github.com/micahflee/onionshare/wiki'
|
||||||
system = platform.system()
|
QtGui.QDesktopServices.openUrl(QtCore.QUrl(help_site))
|
||||||
if system == 'Darwin':
|
|
||||||
# Work around bug in webbrowser on OS X
|
|
||||||
# see http://bugs.python.org/issue30392
|
|
||||||
os.system('open {}'.format(help_site))
|
|
||||||
else:
|
|
||||||
webbrowser.open(help_site)
|
|
||||||
|
|
||||||
def settings_from_fields(self):
|
def settings_from_fields(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue