--- a/src/eric7/Preferences/ConfigurationPages/EmailPage.py Thu Oct 20 10:22:41 2022 +0200 +++ b/src/eric7/Preferences/ConfigurationPages/EmailPage.py Thu Oct 20 19:19:00 2022 +0200 @@ -12,17 +12,13 @@ from PyQt6.QtCore import pyqtSlot +from eric7 import Preferences from eric7.EricWidgets import EricMessageBox -from eric7.EricWidgets.EricApplication import ericApp from eric7.EricGui.EricOverrideCursor import EricOverrideCursor -from eric7.EricNetwork.EricGoogleMailHelpers import getInstallCommand, RequiredPackages - from .ConfigurationPageBase import ConfigurationPageBase from .Ui_EmailPage import Ui_EmailPage -from eric7 import Globals, Preferences - class EmailPage(ConfigurationPageBase, Ui_EmailPage): """ @@ -233,8 +229,8 @@ except ImportError: helpStr = self.tr( "<p>The Google Mail Client API is not installed." - " Use <code>{0}</code> to install it.</p>" - ).format(getInstallCommand()) + " Use the <b>{0}</b> button to install it.</p>" + ).format(self.googleInstallButton.text()) from eric7.EricWidgets.EricSimpleHelpDialog import EricSimpleHelpDialog @@ -249,8 +245,9 @@ """ Private slot to install the required packages for use of Google Mail. """ - pip = ericApp().getObject("Pip") - pip.installPackages(RequiredPackages, interpreter=Globals.getPythonExecutable()) + from eric7.EricNetwork.EricGoogleMailHelpers import installGoogleAPIPackages + + installGoogleAPIPackages() self.__checkGoogleMail() @pyqtSlot() @@ -303,8 +300,8 @@ self.googleMailInfoLabel.setText( self.tr( "<p>The Google Mail Client API is not installed." - " Use <code>{0}</code> to install it.</p>" - ).format(getInstallCommand()) + " Use the <b>{0}</b> button to install it.</p>" + ).format(self.googleInstallButton.text()) ) self.googleMailInfoLabel.show() self.googleHelpButton.setEnabled(False)