@@ -713,6 +715,7 @@ class GoogleAuthorizationView(QWebView):
...
@@ -713,6 +715,7 @@ class GoogleAuthorizationView(QWebView):
def_SH_SelectionChanged(self):
def_SH_SelectionChanged(self):
self.email=self.page().mainFrame().findFirstElement('input#Email').evaluateJavaScript('this.value')orself.email# the input changes to None during submit
self.email=self.page().mainFrame().findFirstElement('input#Email').evaluateJavaScript('this.value')orself.email# the input changes to None during submit
# TODO: Check if this is still needed -- Tijmen
def_SH_TitleChanged(self,title):
def_SH_TitleChanged(self,title):
self.setWindowTitle(title)
self.setWindowTitle(title)
iftitle==self.failure_token:
iftitle==self.failure_token:
...
@@ -725,6 +728,17 @@ class GoogleAuthorizationView(QWebView):
...
@@ -725,6 +728,17 @@ class GoogleAuthorizationView(QWebView):
self.finished.emit()
self.finished.emit()
self.accepted.emit(code,self.email)
self.accepted.emit(code,self.email)
def_SH_URLChanged(self,url):
if'127.0.0.1'inurl.host():
params=dict(parse_qsl(url.query()))
if'error'inparams:
self.hide()
self.finished.emit()
self.rejected.emit()
elif'code'inparams:
self.hide()
self.finished.emit()
self.accepted.emit(params['code'],self.email)
classGoogleAuthorizationStorage(Storage):
classGoogleAuthorizationStorage(Storage):
def__init__(self,filename):
def__init__(self,filename):
...
@@ -739,7 +753,7 @@ class GoogleAuthorizationStorage(Storage):
...
@@ -739,7 +753,7 @@ class GoogleAuthorizationStorage(Storage):