eric7/EricNetwork/EricGoogleMail.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8354
12ebd3934fef
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
18 from requests_oauthlib import OAuth2Session 18 from requests_oauthlib import OAuth2Session
19 19
20 from PyQt6.QtCore import pyqtSlot, pyqtSignal, QObject, QUrl, QUrlQuery 20 from PyQt6.QtCore import pyqtSlot, pyqtSignal, QObject, QUrl, QUrlQuery
21 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout 21 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout
22 22
23 from E5Gui.E5TextInputDialog import E5TextInputDialog 23 from E5Gui.EricTextInputDialog import EricTextInputDialog
24 24
25 import Globals 25 import Globals
26 26
27 from .EricGoogleMailHelpers import ( 27 from .EricGoogleMailHelpers import (
28 CLIENT_SECRET_FILE, SCOPES, TOKEN_FILE, APPLICATION_NAME 28 CLIENT_SECRET_FILE, SCOPES, TOKEN_FILE, APPLICATION_NAME
191 self.__browser.show() 191 self.__browser.show()
192 self.__browser.load(QUrl(authorizationUrl)) 192 self.__browser.load(QUrl(authorizationUrl))
193 else: 193 else:
194 from PyQt6.QtGui import QDesktopServices 194 from PyQt6.QtGui import QDesktopServices
195 QDesktopServices.openUrl(QUrl(authorizationUrl)) 195 QDesktopServices.openUrl(QUrl(authorizationUrl))
196 ok, authCode = E5TextInputDialog.getText( 196 ok, authCode = EricTextInputDialog.getText(
197 None, 197 None,
198 self.tr("OAuth2 Authorization Code"), 198 self.tr("OAuth2 Authorization Code"),
199 self.tr("Enter the OAuth2 authorization code:")) 199 self.tr("Enter the OAuth2 authorization code:"))
200 if ok and authCode: 200 if ok and authCode:
201 self.__processAuthorization(authCode) 201 self.__processAuthorization(authCode)

eric ide

mercurial