use webrowser module to open URIs (had some difficulty with LaunchDefaultBrowser on OS X)

This commit is contained in:
blitzmann
2015-10-25 14:46:24 -04:00
parent 8f08f8efb8
commit 056e961ccc
2 changed files with 5 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ from wx.lib.wordwrap import wordwrap
import service
import config
import threading
import webbrowser
import gui.aboutData
import gui.chromeTabs
@@ -374,10 +375,10 @@ class MainFrame(wx.Frame):
dlg.ShowModal()
def goWiki(self, event):
wx.LaunchDefaultBrowser('https://github.com/DarkFenX/Pyfa/wiki')
webbrowser.open('https://github.com/DarkFenX/Pyfa/wiki')
def goForums(self, event):
wx.LaunchDefaultBrowser('https://forums.eveonline.com/default.aspx?g=posts&t=247609')
webbrowser.open('https://forums.eveonline.com/default.aspx?g=posts&t=247609')
def registerMenu(self):
menuBar = self.GetMenuBar()
@@ -506,7 +507,7 @@ class MainFrame(wx.Frame):
self.showCharacterMgmt(type=0)
else:
uri = sCrest.startServer()
wx.LaunchDefaultBrowser(uri)
webbrowser.open(uri)
else:
dlg=CrestMgmt(self)
dlg.Show()

View File

@@ -216,7 +216,7 @@ class EVE(APIConnection):
return "%s/authorize?response_type=%s&redirect_uri=%s&client_id=%s%s%s" % (
self._oauth_endpoint,
grant_type,
quote(self.redirect_uri, safe=''),
self.redirect_uri,
self.client_id,
"&scope=%s" % ' '.join(s) if scopes else '',
"&state=%s" % state if state else ''